Field Theory CLI
Sync X bookmarks locally and make them searchable for shell-based agent workflows.
What does this agent do, and when should you use it?
Field Theory CLI is a local-first command-line tool for X bookmarks and a companion to the Field Theory Mac app. It stores bookmark data as JSONL, builds a SQLite FTS5 index, and provides search, filtering, statistics, visualization, and classification commands. It can export bookmarks to Markdown, compile an interlinked knowledge base, and answer questions against that knowledge base through `ft ask`. The CLI also manages local Library pages under `~/.fieldtheory/library` and portable commands under `~/.fieldtheory/commands`. Claude Code, Codex, and other agents with shell access can use the installed `/fieldtheory` skill to work with this local context.
With ft sync, the CLI reads session cookies from a supported browser's local cookie database when that browser is logged into X, then downloads bookmarks through X's internal GraphQL API. Alternatively, ft auth followed by ft sync --api uses OAuth API sync. It writes raw data to ~/.fieldtheory/bookmarks/bookmarks.jsonl and uses the SQLite FTS5 index in bookmarks.db for BM25-ranked ft search <query> results. ft classify and ft classify-domains classify bookmarks with an LLM; ft md exports per-bookmark Markdown; ft wiki compiles an interlinked knowledge base; and ft lint checks or fixes fixable wiki issues. The ft library commands search, create, SHA-256-protected update, trash, and open Library pages, while ft commands creates, lists, and validates portable commands.
- An X power user wants a daily local bookmark sync and needs `ft search` to retrieve previously saved distributed-systems material.
- A researcher wants to export bookmarked material as Markdown and use `ft wiki` plus `ft ask` to organize it into a searchable knowledge base.
- A developer using Claude Code or Codex wants an agent to consult personal bookmarks and the local Field Theory Library while working on a task.
- A Field Theory Mac app user needs to create or safely update Library pages from a terminal, then open them in the packaged app.
- A user maintaining several local repositories wants to use `ft possible`, saved bookmark seeds, and a repository set to create opportunity prompts and background jobs.
What are this agent's strengths and limitations?
- The default sync uses a local browser session without requiring an X API, while `ft auth` and `ft sync --api` provide an OAuth route.
- Its JSONL cache, SQLite FTS5/BM25 index, and Markdown exports are all stored locally under `~/.fieldtheory`.
- It covers a concrete bookmark-to-knowledge-base workflow: sync, media completion, classification, wiki compilation, questioning, and linting.
- It installs a `/fieldtheory` skill for Claude Code and Codex and manages portable commands intended for Field Theory and agents.
- Its core source is X bookmarks; default sync depends on a browser logged into X and X's internal GraphQL API.
- Although most bookmark functions are documented across platforms, the product is designed for Mac and its Library-opening and app-install features are tied to the macOS ecosystem.
- Browser support and recovery steps vary by platform; Firefox on Windows requires Node.js 22.5+ or `sqlite3` on PATH.
- LLM classification is documented, but the available models, pricing, and offline classification option are not specified.
How do you install or deploy this agent?
Node.js 20+ is required. Install with:npm install -g fieldtheory
For default session sync, use a supported Chrome-family browser or Firefox that is logged into X, then run:ft sync
For cross-platform OAuth sync, run:ft authft sync --api
How do you use this agent?
Sync and search:ft syncft search "distributed systems"
Explore the collection:ft vizft categoriesft stats
Export and build a knowledge base:ft mdft wikift ask "your question"
Check or fix fixable wiki issues:ft lint
To make the local context available to Claude Code or Codex, run:ft skill install
How does this agent compare with similar options?
The repository documents two sync paths: default ft sync uses a browser session and X's internal GraphQL API, while ft auth with ft sync --api uses the official v2 OAuth API and is described as cross-platform. The CLI is separate from the Field Theory Mac app, Codex plugin, and release-feed repositories: CLI issues belong here, while app-source and plugin issues belong in their respective projects.