All commands support --json for machine-readable output.
init
Set up workthin in the current project. Detects git remote, auto-creates/joins a project, configures MCP for your AI tool, and generates AGENTS.md.
wt initThe interactive setup will:
- Authenticate (or validate existing credentials)
- Detect git remote and auto-create/join a project
- Ask which AI tool you use (Claude Code, Cursor, VS Code, etc.)
- Write AGENTS.md with workthin configuration
- Configure MCP for the selected tool
- (Claude Code) Generate /workthin and /workthin-search skills
add
Add MCP configuration for an AI tool without running the full wt init flow. Useful for adding a new tool to an already-initialized project.
wt add [tool]With a tool name, it configures that tool immediately:
wt add cursor
wt add vscode
wt add claude-codeWithout a tool name, it shows an interactive selection:
wt addAvailable tools: claude-code, claude-desktop, cursor, vscode, codex-cli, copilot-cli, gemini-cli
hooks
Set up automatic knowledge search/capture hooks for AI tools. Hooks trigger wt search before each prompt and remind your AI to call create-knowledge after each session.
wt hooks [tool]With a tool name, configures hooks for that tool immediately:
wt hooks claude-code
wt hooks cursor
wt hooks gemini-cliWithout a tool name, shows an interactive multiselect:
wt hooksHooks can also be enabled during wt init when prompted.
See Hooks for the full list of supported events per tool.
create
Create a new knowledge entry. AI automatically structures the body content. Tags are auto-generated by AI based on the content.
wt create "Redis connection timeout in staging" \
--body "Redis connections drop after 30s idle in staging k8s pods. Set tcp-keepalive 60 in redis.conf." \
--scope project \
--url "https://github.com/org/repo/issues/42"| Flag | Required | Default | Description |
|---|---|---|---|
<title> | Yes | — | Knowledge title (positional argument) |
--body | No | — | Free-form body content (AI structures it) |
--scope | No | personal | personal, project, global |
--url | No | — | Reference URL |
--branch-from | No | — | UUID of knowledge to branch from |
--json | No | — | Output as JSON |
get
Retrieve a specific knowledge entry by ID.
wt get 550e8400-e29b-41d4-a716-446655440000 --detail full| Flag | Default | Description |
|---|---|---|
--detail | summary | Detail level (summary / standard / full) |
--json | — | Output as JSON |
update
Update an existing knowledge entry.
wt update 550e8400-e29b-41d4-a716-446655440000 \
--title "Updated title" \
--body "Updated body content" \
--scope project \
--add-tags redis,kubernetes \
--remove-tags staging \
--etag "abc123"| Flag | Required | Default | Description |
|---|---|---|---|
<id> | Yes | — | Knowledge UUID (positional argument) |
--title | No | — | Updated title |
--body | No | — | Updated body |
--scope | No | — | Updated scope: personal, project, global |
--add-tags | No | — | Comma-separated tags to add |
--remove-tags | No | — | Comma-separated tags to remove |
--etag | No | — | Optimistic concurrency token |
--json | No | — | Output as JSON |
list
List knowledge entries.
wt list --scope project --sort created --limit 20 --offset 0 --detail summary| Flag | Default | Description |
|---|---|---|
--scope | — | Filter by scope: personal, project, global, all |
--sort | created | Sort by: created, resolved, accessed |
--limit | 20 | Max results |
--offset | 0 | Pagination offset |
--detail | summary | Detail level (summary / standard / full) |
--json | — | Output as JSON |
search
Search knowledge via the Protection Layer.
wt search "kubernetes pod crashloop" --scope global --limit 5| Flag | Default | Description |
|---|---|---|
<query> | — | Search query (positional argument) |
--scope | all accessible | Filter by scope: personal, project, global |
--limit | 10 | Max results |
--json | — | Output as JSON |
check
Check if knowledge exists for a given query without creating anything.
wt check "redis timeout kubernetes"| Flag | Default | Description |
|---|---|---|
<query> | — | Query to check (positional argument) |
--json | — | Output as JSON |
resolve
Mark a knowledge entry as resolved, optionally with a comment.
wt resolve 550e8400-e29b-41d4-a716-446655440000 --comment "Confirmed fix on production"| Flag | Required | Default | Description |
|---|---|---|---|
<id> | Yes | — | Knowledge UUID (positional argument) |
--comment | No | — | Resolution comment |
--json | No | — | Output as JSON |
comment
Add a comment to a knowledge entry.
wt comment 550e8400-e29b-41d4-a716-446655440000 \
--body "Also applies to ElastiCache clusters" \
--type supplement| Flag | Required | Description |
|---|---|---|
<id> | Yes | Knowledge UUID (positional argument) |
--body | Yes | Comment text |
--type | Yes | supplement, warning, deprecation, reference |
--json | No | Output as JSON |
login
Authenticate via device code flow.
wt loginlogout
Clear stored credentials.
wt logoutauth-status
Check current authentication state.
wt auth-statusconfig
View or update CLI configuration.
wt config