@sowork-app/cli
v0.1.0
Published
Local-first CLI that imports, indexes, and searches AI agent session history across Claude Code, Cursor, Codex, and more.
Maintainers
Readme
@sowork-app/cli
Local-first context hub that imports, indexes, and searches conversation history across AI coding agents. One CLI to sync, search, and list sessions from Claude Code, Cursor, Codex, and OpenClaw.
Install
npm install -g @sowork-app/cliQuick Start
# Sync sessions from your agents
sowork sync claude-code
sowork sync cursor
# Search across all imported sessions
sowork search "database migration"
sowork search "auth" --agent claude-code --limit 20
# List recent sessions
sowork list
sowork list --agent cursor
# Print a full session
sowork print-session <session-id>
# Install real-time sync plugins (auto-import on session end)
sowork plugin install claude-code
sowork plugin install cursor
sowork plugin status
# Cloud account
sowork login
sowork whoami
sowork logout
# Check version
sowork versionCommands
| Command | Description |
|---------|-------------|
| sync <source> | Sync sessions from an agent source (claude-code, cursor, codex, openclaw) |
| search <query> | Full-text search across all imported messages |
| list | List sessions, optionally filtered by agent |
| print-session <id> | Print a full session transcript |
| plugin install <agent> | Install a real-time sync plugin/hook for an agent |
| plugin status | Show installed plugin status |
| login | Authenticate with the Sowork cloud |
| logout | Log out of the Sowork cloud |
| whoami | Show the currently logged-in user |
| version | Print the CLI version |
How It Works
Sessions are stored locally in a SQLite database at ~/.sowork/sowork.db. Override the base directory with the SOWORK_DIR environment variable.
When you run sowork sync, the CLI scans the agent's local session files, parses them, and indexes messages with FTS5 for fast full-text search. Plugins/hooks can be installed to auto-sync sessions in real time.
Optionally, sessions can be synced to the Sowork cloud after logging in with sowork login.
Development
pnpm install
pnpm build
# Watch mode
pnpm dev
# Run tests
pnpm test
# Clean build output
pnpm cleanStack: TypeScript (CommonJS), Node >= 20, SQLite via better-sqlite3, Commander, chalk@4.
License
MIT
