| name | fieldtheory-cli |
| description | Sync, search, and classify X/Twitter bookmarks locally with full-text search, LLM classification, and agent integration |
| triggers | ["sync my twitter bookmarks","search my x bookmarks for","classify my bookmarks","export bookmarks to markdown","search my fieldtheory bookmarks","install fieldtheory skill","create a knowledge base from bookmarks","run possible on my bookmarks"] |
fieldtheory-cli
Skill by ara.so — Devtools Skills collection.
Field Theory CLI syncs and stores all your X/Twitter bookmarks locally. Search, classify, export to markdown, build knowledge bases, and make bookmarks available to AI agents with shell access.
What it does
- Syncs X bookmarks to
~/.fieldtheory/bookmarks/ (no API key needed by default)
- Full-text search with BM25 ranking via SQLite FTS5
- LLM classification by category (tool, security, technique, launch, research, opinion, commerce) and subject domain
- Markdown export with enriched article text for knowledge bases
- Agent integration via
/fieldtheory skill for Claude Code, Codex
- Possibility runs to generate ideas from bookmark-grounded seeds
- OAuth support for cross-platform API sync
Installation
npm install -g fieldtheory
Requires Node.js 20+. Chrome-family browser or Firefox recommended for session sync.
Verify installation:
ft --version
ft status
First-time setup
ft sync
ft search "distributed systems"
ft stats
ft viz
For OAuth API sync (cross-platform):
ft auth
ft sync --api
Key commands
Sync
ft sync
ft sync --no-media
ft sync --classify
ft sync --rebuild
ft sync --continue
ft sync --gaps
ft sync --folders
ft sync --folder "AI Research"
ft sync --api
Search and browse
ft search "machine learning papers"
ft search "typescript debugging" --limit 20
ft list --author elonmusk
ft list --days 30
ft list --category research
ft list --domain technology
ft list --folder "Reading List"
ft show 1234567890
ft sample research
ft stats
ft categories
ft domains
ft folders
ft viz
Classification
ft classify
ft classify --regex
ft classify-domains
ft classify --engine claude-opus-4-20250514
ft sync --classify --engine claude-sonnet-4-20250514
ft model
ft model claude-opus-4-20250514
Knowledge base
ft md
ft md --changed
ft wiki
ft ask "What are the best resources on RAG?"
ft ask "Summarize distributed systems bookmarks" --save
ft lint
ft lint --fix
Possibility runs
ft seeds search "ai agents" --days 90 --limit 8 --create
ft repos add ~/dev/my-project
ft possible
ft possible run --defaults
ft possible run --background
ft possible prompt <node-id>
ft possible nightly install --time 02:00 --defaults --model opus --effort medium --nodes 5
ft possible nightly show
Agent integration
ft skill install
ft skill show
ft skill uninstall
Field Theory app companion
ft paths --json
ft status --json
ft library search "distributed systems"
ft library show notes/example.md
ft library create notes/new.md --stdin
ft library update notes/new.md --stdin --expected-sha256 <hash>
ft library delete notes/old.md
ft library open notes/example.md
ft commands list
ft commands new "daily-review"
ft commands validate
ft install app
Utilities
ft index
ft fetch-media
ft fetch-media --skip-profile-images
ft status
ft path
Configuration
Environment variables
export FT_DATA_DIR=/path/to/custom/dir
export FT_LIBRARY_DIR=/path/to/custom/library
export FT_COMMANDS_DIR=/path/to/custom/commands
export FT_APP_DEV_DIR=/Users/you/dev/fieldtheory/mac-app
export FT_APP_BUNDLE_ID=com.fieldtheory.app.dev
export FT_APP_OPEN_COMMAND=/path/to/launcher
export HTTPS_PROXY=http://proxy:8080
export HTTP_PROXY=http://proxy:8080
export ALL_PROXY=socks5://proxy:1080
export NO_PROXY=localhost,127.0.0.1
LLM configuration
ft model
ft model claude-opus-4-20250514
Browser selection
ft sync
ft sync --browser chrome
ft sync --browser firefox
ft sync --browser brave
ft sync --browser edge
ft sync --browser chrome --chrome-profile-directory "Default"
ft sync --firefox-profile-dir /path/to/profile
ft sync --cookies <ct0> <auth_token>
Data structure
~/.fieldtheory/
├── bookmarks/
│ ├── bookmarks.jsonl # Raw cache (one JSON per line)
│ ├── bookmarks.db # SQLite FTS5 search index
│ ├── bookmarks-meta.json # Sync metadata
│ └── oauth-token.json # OAuth token (chmod 600)
├── library/
│ └── index.md # Knowledge base
├── commands/
│ └── *.md # Portable commands
└── ideas/
├── seeds/ # Possibility seeds
├── runs/ # Possibility runs
├── nodes/ # Node prompts
├── batches/ # Multi-repo batches
├── jobs/ # Background jobs
└── nightly/ # Nightly schedules
Common patterns
Daily sync with classification
0 7 * * * ft sync --classify
Search and show workflow
const { execSync } = require('child_process');
function searchBookmarks(query: string): any[] {
const output = execSync(`ft search "${query}" --json`, { encoding: 'utf8' });
return JSON.parse(output);
}
function showBookmark(id: string): any {
const output = execSync(`ft show ${id} --json`, { encoding: 'utf8' });
return JSON.parse(output);
}
const results = searchBookmarks('typescript patterns');
const first = showBookmark(results[0].id);
console.log(first.text);
Export to custom format
import { readFileSync } from 'fs';
import { join } from 'path';
import { homedir } from 'os';
const dataDir = process.env.FT_DATA_DIR || join(homedir(), '.fieldtheory');
const bookmarksPath = join(dataDir, 'bookmarks', 'bookmarks.jsonl');
const bookmarks = readFileSync(bookmarksPath, 'utf8')
.split('\n')
.filter(line => line.trim())
.map(line => JSON.parse(line));
const aiBookmarks = bookmarks
.filter(b => b.classification?.category === 'research')
.filter(b => b.classification?.domain === 'AI/ML')
.map(b => ({
text: b.,
: b..,
: b.,
: b.
}));
.(.(aiBookmarks, , ));
Programmatic classification
import { execSync } from 'child_process';
function classifyBookmarks(engine?: string): void {
const cmd = engine
? `ft classify --engine ${engine}`
: 'ft classify';
try {
execSync(cmd, { stdio: 'inherit' });
} catch (error) {
console.error('Classification failed:', error);
throw error;
}
}
classifyBookmarks();
classifyBookmarks('claude-opus-4-20250514');
Build custom knowledge base
ft md
ft wiki
ft ask "What are the key themes in my AI bookmarks from 2026?"
ft ask "Summarize RAG techniques" --save
Possibility automation
import { execSync } from 'child_process';
execSync('ft seeds search "ai agents" --days 90 --limit 8 --frame leverage-specificity --create', {
stdio: 'inherit'
});
execSync('ft repos add ~/dev/my-agent', { stdio: 'inherit' });
execSync('ft repos add ~/dev/my-framework', { stdio: 'inherit' });
const output = execSync('ft possible run --background --defaults --model opus --effort high --nodes 8', {
encoding: 'utf8'
});
const jobId = output.match(/Job ID: (\S+)/)?.[1];
console.log(`Started job: ${jobId}`);
Library integration
import { execSync } from 'child_process';
import { readFileSync } from 'fs';
function searchLibrary(query: string): any[] {
const output = execSync(`ft library search "${query}" --json`, { encoding: 'utf8' });
return JSON.parse(output);
}
function showPage(path: string): any {
const output = execSync(`ft library show "${path}" --json`, { encoding: 'utf8' });
return JSON.parse(output);
}
function createPage(path: string, content: string): void {
execSync(`ft library create "${path}" --stdin`, {
input: content,
stdio: ['pipe', , ]
});
}
(): {
(, {
: content,
: [, , ]
});
}
results = ();
page = (results[].);
.(page.);
Troubleshooting
Sync fails with browser session
ft sync
ft sync --browser chrome
ft sync --browser chrome --chrome-profile-directory "Default"
ft auth
ft sync --api
Cookie extraction fails
node --version
ft sync --cookies <ct0> <auth_token>
Windows PowerShell alias conflict
# Use full command name
fieldtheory sync
# Or ft.cmd
ft.cmd sync
Classification not working
echo $ANTHROPIC_API_KEY
ft model
ft classify --engine claude-sonnet-4-20250514
ft classify --regex
Search index out of sync
ft index
ft sync --rebuild
Media download stalls
ft sync --no-media
ft sync --skip-profile-images
ft fetch-media
Proxy issues
export HTTPS_PROXY=http://proxy:8080
export HTTP_PROXY=http://proxy:8080
ft sync
Data corruption
ft status
ft index
rm ~/.fieldtheory/bookmarks/bookmarks.db
ft sync --rebuild
OAuth token expired
ft auth
ft sync --api
Security notes
- Local-first: No telemetry, no analytics, no phone-home
- Session sync reads cookies from browser database, uses them once, discards
- OAuth tokens stored with
chmod 600 at ~/.fieldtheory/bookmarks/oauth-token.json
- Treat
ct0, auth_token, and oauth-token.json like passwords
- Default sync uses X's internal GraphQL API (same as browser)
- OAuth sync uses official v2 API
Platform support
| Feature | macOS | Linux | Windows |
|---|
| Session sync | ✓ | ✓ | ✓ |
| OAuth API | ✓ | ✓ | ✓ |
| Search/classify | ✓ | ✓ | ✓ |
| Supported browsers | Chrome, Chromium, Brave, Edge, Firefox, Helium, Comet, Dia | Chrome, Chromium, Brave, Edge, Firefox | Chrome, Chromium, Brave, Edge, Firefox |
Additional resources