[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74941":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},74941,"fieldtheory-cli","afar1\u002Ffieldtheory-cli","afar1","Field Theory CLI for bookmarks, Library, commands, and agent workflows","https:\u002F\u002Ffieldtheory.dev\u002Fcli",null,"TypeScript",1902,198,6,24,0,15,57,195,45,104.9,"MIT License",false,"main",[],"2026-06-12 04:01:16","# Field Theory CLI\n\nSync and store locally all of your X\u002FTwitter bookmarks. Search, classify, and make them available to Claude Code, Codex, or any agent with shell access.\n\nFree and open source. Designed for Mac.\n\n## Install\n\n```bash\nnpm install -g fieldtheory\n```\n\nRequires Node.js 20+. A Chrome-family browser or Firefox is recommended for session sync; OAuth is available for all platforms.\n\n## Quick start\n\n```bash\n# 1. Sync your bookmarks (needs a supported browser logged into X)\nft sync\n\n# 2. Search them\nft search \"distributed systems\"\n\n# 3. Explore\nft viz\nft categories\nft stats\n```\n\nOn first run, `ft sync` extracts your X session from your browser and downloads your bookmarks into `~\u002F.fieldtheory\u002Fbookmarks\u002F`.\n\n## Commands\n\n### Sync\n\n| Command | Description |\n|---------|-------------|\n| `ft sync` | Download and sync bookmarks, then fetch any missing media (photos, video posters, capped videos). No API required. |\n| `ft sync --no-media` | Sync bookmarks only; skip the media download pass |\n| `ft sync --skip-profile-images` | Sync bookmarks and post media but skip author profile images |\n| `ft sync --rebuild` | Full re-crawl of all bookmarks |\n| `ft sync --continue` | Resume a paused or interrupted sync from the saved cursor |\n| `ft sync --gaps` | Backfill quoted tweets, expand truncated\u002FX Article text, enrich linked articles, and fill any media gaps |\n| `ft sync --folders` | Also sync X bookmark folder tags (read-only mirror of X state) |\n| `ft sync --folder \u003Cname>` | Sync a single folder by name (exact or unambiguous prefix) |\n| `ft sync --classify` | Sync then classify new bookmarks with LLM |\n| `ft sync --api` | Sync via OAuth API (cross-platform) |\n| `ft auth` | Set up OAuth for API-based sync (optional) |\n\n### Search and browse\n\n| Command | Description |\n|---------|-------------|\n| `ft search \u003Cquery>` | Full-text search with BM25 ranking |\n| `ft list` | Filter by author, date, category, domain, or folder |\n| `ft list --folder \u003Cname>` | Show bookmarks in an X bookmark folder |\n| `ft show \u003Cid>` | Show one bookmark in detail |\n| `ft sample \u003Ccategory>` | Random sample from a category |\n| `ft stats` | Top authors, languages, date range |\n| `ft viz` | Terminal dashboard with sparklines, categories, and domains |\n| `ft categories` | Show category distribution |\n| `ft domains` | Subject domain distribution |\n| `ft folders` | Show X bookmark folder distribution (requires `ft sync --folders` first) |\n\n### Classification\n\n| Command | Description |\n|---------|-------------|\n| `ft classify` | Classify by category and domain using LLM |\n| `ft classify --regex` | Classify by category using simple regex |\n| `ft classify-domains` | Classify by subject domain only (LLM) |\n| `ft classify --engine \u003Cname>` | Override the LLM engine for one run (also works on `ft sync --classify` and `ft classify-domains`) |\n| `ft model` | View or change the default LLM engine |\n\n### Knowledge base\n\n| Command | Description |\n|---------|-------------|\n| `ft md` | Export bookmarks as individual markdown files, including enriched article text |\n| `ft md --changed` | Re-export only markdown files whose source bookmark data changed |\n| `ft wiki` | Compile a Karpathy-style interlinked knowledge base |\n| `ft ask \u003Cquestion>` | Ask questions against the knowledge base |\n| `ft ask \u003Cquestion> --save` | Ask and save the answer as a concept page |\n| `ft lint` | Health-check the wiki for broken links and missing pages |\n| `ft lint --fix` | Auto-fix fixable wiki issues |\n\n### Possibility runs\n\n| Command | Description |\n|---------|-------------|\n| `ft seeds search \"\u003Cquery>\" --create` | Save a bookmark-grounded seed |\n| `ft repos add \u003Cpath>` | Add a repo to the default repo set |\n| `ft possible` | Interactive seed + repo + frame wizard |\n| `ft possible run --defaults` | Re-run with the most-recently-used seed and saved repos |\n| `ft possible run --background` | Start a run as a background job |\n| `ft possible prompt \u003Cnode-id>` | Print the goal prompt for one plotted node |\n| `ft possible nightly install` | Install a nightly Possible run on macOS |\n\n### Field Theory app companion\n\n| Command | Description |\n|---------|-------------|\n| `ft paths --json` | Show canonical bookmarks, Library, Commands, and compatibility paths |\n| `ft status --json` | Show bookmark\u002Fclassification status plus Field Theory paths |\n| `ft library search \u003Cquery>` | Search local Field Theory Library markdown |\n| `ft library show \u003Cpath>` | Print a Library page and its version metadata with `--json` |\n| `ft library create \u003Cpath> --stdin` | Create a new Library page under `~\u002F.fieldtheory\u002Flibrary` |\n| `ft library update \u003Cpath> --stdin --expected-sha256 \u003Chash>` | Replace a Library page with conflict protection |\n| `ft library delete \u003Cpath>` | Move a Library page to Trash; the Mac app owns remote sync tombstones |\n| `ft library open \u003Cpath>` | Open a Library page in the Field Theory Mac app |\n| `ft commands list` | List portable commands under `~\u002F.fieldtheory\u002Fcommands` |\n| `ft commands new \u003Cname>` | Create a reusable portable command |\n| `ft commands validate [name]` | Check command shape and guardrails |\n| `ft install app` | Download and install the latest Field Theory Mac app from `afar1\u002Ffield-releases` |\n\n`ft library open` targets the packaged Field Theory app by bundle id (`com.fieldtheory.app`) instead of trusting the system-wide `fieldtheory:\u002F\u002F` handler. That avoids accidentally opening a generic Electron development app when another checkout registered the same URL scheme.\n\nFor local Field Theory app development, point the CLI at the dev checkout:\n\n```bash\nexport FT_APP_DEV_DIR=\u002FUsers\u002Fyou\u002Fdev\u002Ffieldtheory\u002Fmac-app\nft library open notes\u002Fexample.md\n```\n\nPackaged variants can override the bundle id with `FT_APP_BUNDLE_ID`. Advanced development launchers can set `FT_APP_OPEN_COMMAND` to an executable that receives the deep-link URL as its first argument.\n\n### Agent integration\n\n| Command | Description |\n|---------|-------------|\n| `ft skill install` | Install `\u002Ffieldtheory` skill for Claude Code and Codex |\n| `ft skill show` | Print skill content to stdout |\n| `ft skill uninstall` | Remove installed skill files |\n\n### Utilities\n\n| Command | Description |\n|---------|-------------|\n| `ft index` | Rebuild search index from JSONL cache (preserves classifications) |\n| `ft fetch-media` | Backfill\u002Fdownload X media assets for existing bookmarks (default: all pending bookmarks) |\n| `ft fetch-media --skip-profile-images` | Download post media without author profile images |\n| `ft status` | Show sync\u002Fclassification status and data location |\n| `ft path` | Print data directory path |\n\n## Agent integration\n\nInstall the `\u002Ffieldtheory` skill so your agent automatically searches your bookmarks when relevant:\n\n```bash\nft skill install     # Auto-detects Claude Code and Codex\n```\n\nThen ask your agent:\n\n> \"What have I bookmarked about cancer research in the last three years and how has it progressed?\"\n\n> \"I bookmarked a number of new open source AI memory tools. Pick the best one and figure out how to incorporate it in this repo.\"\n\n> \"Your goal is to look at AI agent bookmarks and come up with a roadmap plotted in the grid of what I should do next across the Field Theory CLI and Mac app projects.\"\n\n> \"Every day please sync any new X bookmarks using the Field Theory CLI.\"\n\nWorks with Claude Code, Codex, or any agent with shell access.\n\n## Scheduling\n\nSync with cron:\n\n```bash\n# Sync every morning at 7am\n0 7 * * * ft sync\n\n# Sync and classify every morning\n0 7 * * * ft sync --classify\n```\n\nRun Possible every night on macOS with LaunchAgent:\n\n```bash\nft seeds search \"agents\" --days 90 --limit 8 --frame leverage-specificity --create\nft repos add ~\u002Fdev\u002Ffieldtheory\nft repos add ~\u002Fdev\u002Ffieldtheory-cli\n\nft possible nightly install --time 02:00 --defaults --model opus --effort medium --nodes 5\nft possible nightly show\n```\n\nNightly schedules are stored under `~\u002F.fieldtheory\u002Fideas\u002Fnightly\u002F`. Each tick starts a normal background job under `~\u002F.fieldtheory\u002Fideas\u002Fjobs\u002F`, using your local logged-in CLI sessions and the current `PATH` captured in the LaunchAgent plist.\n\n`ft` respects standard proxy environment variables for network requests: `HTTPS_PROXY`, `HTTP_PROXY`, `ALL_PROXY`, and `NO_PROXY`.\n\n## Data\n\nData is stored locally under `~\u002F.fieldtheory\u002F`:\n\n```\n~\u002F.fieldtheory\u002Fbookmarks\u002F\n  bookmarks.jsonl         # raw bookmark cache (one per line)\n  bookmarks.db            # SQLite FTS5 search index\n  bookmarks-meta.json     # sync metadata\n  oauth-token.json        # OAuth token (if using API mode, chmod 600)\n\n~\u002F.fieldtheory\u002Flibrary\u002F\n  index.md                # markdown knowledge base (ft wiki \u002F ft md)\n\n~\u002F.fieldtheory\u002Fcommands\u002F\n  *.md                    # portable commands used by Field Theory and agents\n\n~\u002F.fieldtheory\u002Fideas\u002F\n  seeds\u002Fruns\u002Fnodes\u002F       # Possible seeds, runs, and node prompt artifacts\n  batches\u002Fjobs\u002Fnightly\u002F   # Multi-repo batches, background jobs, and schedules\n```\n\nOverride locations with `FT_DATA_DIR`, `FT_LIBRARY_DIR`, and `FT_COMMANDS_DIR`:\n\n```bash\nexport FT_DATA_DIR=\u002Fpath\u002Fto\u002Fcustom\u002Fdir\nexport FT_LIBRARY_DIR=\u002Fpath\u002Fto\u002Fcustom\u002Flibrary\nexport FT_COMMANDS_DIR=\u002Fpath\u002Fto\u002Fcustom\u002Fcommands\n```\n\nTo remove bookmark and Library data: `rm -rf ~\u002F.fieldtheory\u002Fbookmarks ~\u002F.fieldtheory\u002Flibrary`\n\n## Categories\n\n| Category | What it catches |\n|----------|----------------|\n| **tool** | GitHub repos, CLI tools, npm packages, open-source projects |\n| **security** | CVEs, vulnerabilities, exploits, supply chain |\n| **technique** | Tutorials, demos, code patterns, \"how I built X\" |\n| **launch** | Product launches, announcements, \"just shipped\" |\n| **research** | ArXiv papers, studies, academic findings |\n| **opinion** | Takes, analysis, commentary, threads |\n| **commerce** | Products, shopping, physical goods |\n\nUse `ft classify` for LLM-powered classification that catches what regex misses.\n\n## Windows Notes\n\nIn PowerShell, use `fieldtheory` or `ft.cmd` instead of `ft` because `ft` is already a built-in alias for `Format-Table`.\n\nIf browser session sync cannot find the right profile, pass the browser and profile explicitly:\n\n```powershell\nfieldtheory sync --browser chrome --chrome-profile-directory \"Default\"\nfieldtheory sync --browser edge --chrome-profile-directory \"Default\"\n```\n\nFor Firefox, if profile detection misses the profile, pass the profile directory explicitly with `--firefox-profile-dir`.\n\nIf cookie extraction still fails, close the browser completely and retry. As a last resort, pass cookies manually:\n\n```powershell\nfieldtheory sync --cookies \u003Cct0> \u003Cauth_token>\n```\n\nTreat `ct0` and `auth_token` like passwords. Do not paste them into logs, issues, or chat.\n\n## Platform support\n\n| Feature | macOS | Linux | Windows |\n|---------|-------|-------|---------|\n| Session sync (`ft sync`) | Chrome, Chromium, Brave, Edge, Helium, Comet, Dia, Firefox | Chrome, Chromium, Brave, Edge, Firefox | Chrome, Chromium, Brave, Edge, Firefox |\n| OAuth API sync (`ft sync --api`) | Yes | Yes | Yes |\n| Search, list, classify, viz, wiki | Yes | Yes | Yes |\n\nSession sync extracts cookies from your browser's local database. Use `ft sync --browser \u003Cname>` to pick a browser. On Windows, Firefox requires Node.js 22.5+ or `sqlite3` on PATH. For unsupported browsers or platforms, use `ft auth` + `ft sync --api`.\n\n## Security\n\n**Your data stays local.** No telemetry, no analytics, nothing phoned home. The CLI only makes network requests to X's API during sync.\n\n**Chrome session sync** reads cookies from Chrome's local database, uses them for the sync request, and discards them. Cookies are never stored separately.\n\n**OAuth tokens** are stored with `chmod 600` (owner-only). Treat `~\u002F.fieldtheory\u002Fbookmarks\u002Foauth-token.json` like a password.\n\n**The default sync uses X's internal GraphQL API**, the same API that x.com uses in your browser. For the official v2 API, use `ft auth` + `ft sync --api`.\n\n## License\n\nMIT — [fieldtheory.dev\u002Fcli](https:\u002F\u002Ffieldtheory.dev\u002Fcli)\n\n## Star History\n\n\u003Ca href=\"https:\u002F\u002Fwww.star-history.com\u002F?repos=afar1%2Ffieldtheory-cli&type=date&legend=top-left\">\n \u003Cpicture>\n   \u003Csource media=\"(prefers-color-scheme: dark)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=afar1\u002Ffieldtheory-cli&type=date&theme=dark&legend=top-left\" \u002F>\n   \u003Csource media=\"(prefers-color-scheme: light)\" srcset=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=afar1\u002Ffieldtheory-cli&type=date&legend=top-left\" \u002F>\n   \u003Cimg alt=\"Star History Chart\" src=\"https:\u002F\u002Fapi.star-history.com\u002Fchart?repos=afar1\u002Ffieldtheory-cli&type=date&legend=top-left\" \u002F>\n \u003C\u002Fpicture>\n\u003C\u002Fa>\n","Field Theory CLI 是一个用于同步和本地存储你的X\u002FTwitter书签的命令行工具。它使用TypeScript编写，支持通过浏览器会话或OAuth API进行书签同步，并提供强大的搜索、分类和可视化功能。核心特性包括无需API即可下载书签及关联媒体文件，以及利用LLM（大语言模型）对书签内容进行自动分类。此外，该工具还提供了丰富的命令选项来帮助用户更好地管理和探索自己的书签库。适用于需要高效管理个人Twitter\u002FX书签并希望在本地进行访问、分析的研究者或开发者，尤其是Mac用户。",2,"2026-06-11 03:51:31","high_star"]