id = "claude-code" name = "Claude Code" homepage = "https://claude.com/claude-code" description = "Anthropic's coding agent, running in the terminal." icon = "theSVG:claude" executables = ["claude"] [dotfiles] # ~/.claude is the user-scoped config dir. settings.json holds hooks, # permissions and model choice; CLAUDE.md is the user's global instructions; # agents/, commands/ and skills/ are hand-written extensions. All of it is # worth having on the other machine. paths = [ "~/.claude/settings.json", "~/.claude/CLAUDE.md", "~/.claude/keybindings.json", "~/.claude/agents/", "~/.claude/commands/", "~/.claude/skills/", ] # settings.local.json is the machine-scoped half of the settings pair, by # Claude Code's own convention. Everything else here is transcripts, caches # and daemon state. exclude = [ "~/.claude/settings.local.json", "~/.claude/projects/", "~/.claude/sessions/", "~/.claude/session-env/", "~/.claude/jobs/", "~/.claude/tasks/", "~/.claude/history.jsonl", "~/.claude/shell-snapshots/", "~/.claude/file-history/", "~/.claude/paste-cache/", "~/.claude/downloads/", "~/.claude/backups/", "~/.claude/cache/", "~/.claude/debug/", "~/.claude/telemetry/", "~/.claude/ide/", "~/.claude/daemon/", "~/.claude/plugins/", "~/.claude/stats-cache.json", "~/.claude/policy-limits.json", "~/.claude/settings.json.bak", "~/.claude/settings.json.backup-*", "~/.claude/*.log", # Claude Code's own state inside skills/, not the user's: synced/ holds the # skills Claude syncs per account (it downloads them again itself, staging # through synced/.staging/), and .trash/ is where it moves the old copies on # each refresh. "~/.claude/skills/.trash/", "~/.claude/skills/synced/", ] # ~/.claude.json is mode 0600 and carries the signed-in account plus # per-project state; .credentials.json is the OAuth token store when Claude # Code is not using the OS keychain. secret = ["~/.claude.json", "~/.claude/.credentials.json"] # Every hook is a shell command with an absolute path to a binary or script # on this machine, and statusLine is the same. Verified against the shape # Claude Code writes: hooks.[].hooks[].command. The commands are the # user's own scripts, so they are worth keeping to put this machine back # together — backup — even though the paths inside them mean nothing anywhere # else. [[dotfiles.machine_lines]] file = "~/.claude/settings.json" match = { key_path = ["hooks.*.*.hooks.*.command", "statusLine.command"] } scope = "backup" # ~/.claude.json stays a credential file — a consumer that does not read # except_key_path keeps treating it as one — but most of it is not: Claude # Code rewrites it many times a minute with caches, counters and per-project # session stats. These are the settings in it worth having on the next # machine: the global config keys of # https://code.claude.com/docs/en/settings-reference#global-config-settings, # the four older settings Claude Code still writes here (theme, editorMode, # verbose, preferredNotifChannel), and user-scoped MCP servers # (https://code.claude.com/docs/en/mcp). Everything else — the sign-in, # projects, every cache — never leaves the machine. [[dotfiles.machine_lines]] file = "~/.claude.json" match = { except_key_path = [ "theme", "editorMode", "verbose", "preferredNotifChannel", "autoConnectIde", "autoInstallIdeExtension", "claudeInChromeDefaultEnabled", "copyFullResponse", "copyOnSelect", "defaultToAgentsView", "diffTool", "externalEditorContext", "leftArrowOpensAgents", "prStatusFooterEnabled", "mcpServers", ] } # An MCP server's env and headers are where its API keys go. [[dotfiles.secret_paths]] file = "~/.claude.json" match = { key_path = ["mcpServers.*.env", "mcpServers.*.headers"] } [commands] format = 1 label = "Start Claude Code" description = "Start an interactive session or a one-shot print run. MCP, plugin, agent and remote-control options are left out." quality = "ai-draft" base = "fig:claude" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/claude.ts" license = "MIT" [[commands.field]] id = "prompt" label = "Prompt" description = "Initial prompt; optional." type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "print" label = "Print and exit" description = "Print response and exit (useful for pipes)." type = "boolean" option = ["--print", "-p"] sources = ["fig"] [[commands.field]] id = "model" label = "Model" description = "Model for the session: an alias like 'sonnet' or 'opus', or a full name." type = "string" option = ["--model"] suggestions = [{ value = "sonnet", label = "sonnet" }, { value = "opus", label = "opus" }, { value = "haiku", label = "haiku" }] sources = ["fig"] [[commands.field]] id = "permission_mode" label = "Permission mode" description = "Permission mode for the session." type = "string" option = ["--permission-mode"] suggestions = [{ value = "acceptEdits", label = "acceptEdits" }, { value = "auto", label = "auto" }, { value = "bypassPermissions", label = "bypassPermissions" }, { value = "default", label = "default" }, { value = "dontAsk", label = "dontAsk" }, { value = "plan", label = "plan" }] sources = ["fig"] [[commands.field]] id = "effort" label = "Effort" description = "Effort level for the session." type = "string" option = ["--effort"] suggestions = [{ value = "low", label = "low" }, { value = "medium", label = "medium" }, { value = "high", label = "high" }, { value = "xhigh", label = "xhigh" }, { value = "max", label = "max" }] sources = ["fig"] [[commands.field]] id = "continue" label = "Continue last conversation" description = "Continue the most recent conversation in the current directory." type = "boolean" option = ["--continue", "-c"] sources = ["fig"] [[commands.field]] id = "name" label = "Session name" description = "Set a display name for this session." type = "string" option = ["--name", "-n"] sources = ["fig"] [[commands.field]] id = "add_dir" label = "Extra directories" description = "Additional directories to allow tool access to." type = "path" option = ["--add-dir"] multiple = true path = { kind = "directory", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "append_system_prompt" label = "Append to system prompt" description = "Append a system prompt to the default system prompt." type = "string" option = ["--append-system-prompt"] sources = ["fig"] [[commands.field]] id = "output_format" label = "Output format" description = "Output format (only with --print)." type = "string" option = ["--output-format"] suggestions = [{ value = "text", label = "text" }, { value = "json", label = "json" }, { value = "stream-json", label = "stream-json" }] sources = ["fig"] [[commands.field]] id = "max_budget" label = "Max budget (USD)" description = "Maximum dollar amount to spend on API calls (only with --print)." type = "number" option = ["--max-budget-usd"] sources = ["fig"] [[commands.field]] id = "verbose" label = "Verbose" description = "Override verbose mode setting from config." type = "boolean" option = ["--verbose"] sources = ["fig"] [[commands.field]] id = "skip_permissions" label = "Skip all permission checks" description = "Bypass all permission checks. Only for sandboxes without internet access." type = "boolean" option = ["--dangerously-skip-permissions"] effect = "exec" sources = ["fig"] [[commands.task]] id = "interactive" label = "Interactive session" fields = ["prompt", "model", "permission_mode"] required = [] [[commands.task]] id = "oneshot" label = "One-shot answer" set = { print = [true] } fields = ["prompt", "print", "model", "output_format"] required = ["prompt"] [[commands.task]] id = "resume" label = "Continue last session" set = { continue = [true] } fields = ["continue", "model"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["prompt", "print", "model", "permission_mode", "effort", "continue"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["add_dir", "append_system_prompt", "output_format", "max_budget", "verbose", "skip_permissions", "name"]