|
| 1 | +const completionSpec: Fig.Spec = { |
| 2 | + name: "claude", |
| 3 | + description: "Claude Code - Interactive CLI tool for coding with Claude AI", |
| 4 | + subcommands: [ |
| 5 | + { |
| 6 | + name: "update", |
| 7 | + description: "Update Claude Code to the latest version", |
| 8 | + }, |
| 9 | + { |
| 10 | + name: "mcp", |
| 11 | + description: "Configure Model Context Protocol (MCP) servers", |
| 12 | + subcommands: [ |
| 13 | + { |
| 14 | + name: "list", |
| 15 | + description: "List all configured MCP servers", |
| 16 | + }, |
| 17 | + { |
| 18 | + name: "add", |
| 19 | + description: "Add a new MCP server configuration", |
| 20 | + }, |
| 21 | + { |
| 22 | + name: "remove", |
| 23 | + description: "Remove an MCP server configuration", |
| 24 | + }, |
| 25 | + { |
| 26 | + name: "import", |
| 27 | + description: "Import MCP server configurations from Claude Desktop", |
| 28 | + }, |
| 29 | + ], |
| 30 | + }, |
| 31 | + ], |
| 32 | + options: [ |
| 33 | + { |
| 34 | + name: ["--help", "-h"], |
| 35 | + description: "Show help for claude", |
| 36 | + }, |
| 37 | + { |
| 38 | + name: ["--print", "-p"], |
| 39 | + description: "Query via SDK, then exit (non-interactive mode)", |
| 40 | + args: { |
| 41 | + name: "query", |
| 42 | + description: "The query to send to Claude", |
| 43 | + }, |
| 44 | + }, |
| 45 | + { |
| 46 | + name: ["--continue", "-c"], |
| 47 | + description: "Continue most recent conversation", |
| 48 | + }, |
| 49 | + { |
| 50 | + name: ["--resume", "-r"], |
| 51 | + description: "Resume session by ID", |
| 52 | + args: { |
| 53 | + name: "session-id", |
| 54 | + description: "The session ID to resume", |
| 55 | + }, |
| 56 | + }, |
| 57 | + { |
| 58 | + name: "--add-dir", |
| 59 | + description: "Add additional working directories", |
| 60 | + args: { |
| 61 | + name: "directory", |
| 62 | + description: "Directory path to add", |
| 63 | + template: "folders", |
| 64 | + }, |
| 65 | + }, |
| 66 | + { |
| 67 | + name: "--allowedTools", |
| 68 | + description: "Specify allowed tools (comma-separated)", |
| 69 | + args: { |
| 70 | + name: "tools", |
| 71 | + description: "Comma-separated list of allowed tools", |
| 72 | + }, |
| 73 | + }, |
| 74 | + { |
| 75 | + name: "--disallowedTools", |
| 76 | + description: "Specify disallowed tools (comma-separated)", |
| 77 | + args: { |
| 78 | + name: "tools", |
| 79 | + description: "Comma-separated list of disallowed tools", |
| 80 | + }, |
| 81 | + }, |
| 82 | + { |
| 83 | + name: "--append-system-prompt", |
| 84 | + description: "Append to system prompt", |
| 85 | + args: { |
| 86 | + name: "prompt", |
| 87 | + description: "Additional system prompt text", |
| 88 | + }, |
| 89 | + }, |
| 90 | + { |
| 91 | + name: "--output-format", |
| 92 | + description: "Specify output format", |
| 93 | + args: { |
| 94 | + name: "format", |
| 95 | + description: "Output format", |
| 96 | + suggestions: ["text", "json", "stream-json"], |
| 97 | + }, |
| 98 | + }, |
| 99 | + { |
| 100 | + name: "--input-format", |
| 101 | + description: "Specify input format", |
| 102 | + args: { |
| 103 | + name: "format", |
| 104 | + description: "Input format", |
| 105 | + suggestions: ["text", "stream-json"], |
| 106 | + }, |
| 107 | + }, |
| 108 | + { |
| 109 | + name: "--verbose", |
| 110 | + description: "Enable detailed logging", |
| 111 | + }, |
| 112 | + { |
| 113 | + name: "--max-turns", |
| 114 | + description: "Limit the number of agentic turns in non-interactive mode", |
| 115 | + args: { |
| 116 | + name: "number", |
| 117 | + description: "Maximum number of turns", |
| 118 | + }, |
| 119 | + }, |
| 120 | + { |
| 121 | + name: "--model", |
| 122 | + description: "Set session model", |
| 123 | + args: { |
| 124 | + name: "model", |
| 125 | + description: "Model name to use", |
| 126 | + suggestions: [ |
| 127 | + "claude-3-5-haiku-latest", |
| 128 | + "claude-3-7-sonnet-latest", |
| 129 | + "claude-sonnet-4-0", |
| 130 | + "claude-opus-4-0", |
| 131 | + "claude-opus-4-1", |
| 132 | + ], |
| 133 | + }, |
| 134 | + }, |
| 135 | + { |
| 136 | + name: "--permission-mode", |
| 137 | + description: "Set permission mode", |
| 138 | + args: { |
| 139 | + name: "mode", |
| 140 | + description: "Permission mode", |
| 141 | + suggestions: ["default", "acceptEdits", "plan", "bypassPermissions"], |
| 142 | + }, |
| 143 | + }, |
| 144 | + { |
| 145 | + name: "--dangerously-skip-permissions", |
| 146 | + description: "Skip permission prompts (use with caution)", |
| 147 | + }, |
| 148 | + ], |
| 149 | + args: { |
| 150 | + name: "query", |
| 151 | + description: |
| 152 | + "Initial query to send to Claude (starts REPL with this prompt)", |
| 153 | + isOptional: true, |
| 154 | + }, |
| 155 | +}; |
| 156 | +export default completionSpec; |
0 commit comments