schema.json

  1{
  2  "$schema": "https://json-schema.org/draft/2020-12/schema",
  3  "$id": "https://github.com/charmbracelet/crush/internal/config/config",
  4  "$ref": "#/$defs/Config",
  5  "$defs": {
  6    "Attribution": {
  7      "properties": {
  8        "trailer_style": {
  9          "type": "string",
 10          "enum": [
 11            "none",
 12            "co-authored-by",
 13            "assisted-by"
 14          ],
 15          "description": "Style of attribution trailer to add to commits",
 16          "default": "assisted-by"
 17        },
 18        "co_authored_by": {
 19          "type": "boolean",
 20          "description": "Deprecated: use trailer_style instead",
 21          "deprecated": true
 22        },
 23        "generated_with": {
 24          "type": "boolean",
 25          "description": "Add Generated with Crush line to commit messages and issues and PRs",
 26          "default": true
 27        }
 28      },
 29      "additionalProperties": false,
 30      "type": "object"
 31    },
 32    "Completions": {
 33      "properties": {
 34        "max_depth": {
 35          "type": "integer",
 36          "description": "Maximum depth for the ls tool",
 37          "default": 0,
 38          "examples": [
 39            10
 40          ]
 41        },
 42        "max_items": {
 43          "type": "integer",
 44          "description": "Maximum number of items to return for the ls tool",
 45          "default": 1000,
 46          "examples": [
 47            100
 48          ]
 49        }
 50      },
 51      "additionalProperties": false,
 52      "type": "object"
 53    },
 54    "Config": {
 55      "properties": {
 56        "$schema": {
 57          "type": "string"
 58        },
 59        "models": {
 60          "additionalProperties": {
 61            "$ref": "#/$defs/SelectedModel"
 62          },
 63          "type": "object",
 64          "description": "Model configurations for different model types"
 65        },
 66        "recent_models": {
 67          "additionalProperties": {
 68            "items": {
 69              "$ref": "#/$defs/SelectedModel"
 70            },
 71            "type": "array"
 72          },
 73          "type": "object",
 74          "description": "Recently used models sorted by most recent first"
 75        },
 76        "providers": {
 77          "additionalProperties": {
 78            "$ref": "#/$defs/ProviderConfig"
 79          },
 80          "type": "object",
 81          "description": "AI provider configurations"
 82        },
 83        "mcp": {
 84          "$ref": "#/$defs/MCPs",
 85          "description": "Model Context Protocol server configurations"
 86        },
 87        "lsp": {
 88          "$ref": "#/$defs/LSPs",
 89          "description": "Language Server Protocol configurations"
 90        },
 91        "options": {
 92          "$ref": "#/$defs/Options",
 93          "description": "General application options"
 94        },
 95        "permissions": {
 96          "$ref": "#/$defs/Permissions",
 97          "description": "Permission settings for tool usage"
 98        },
 99        "tools": {
100          "$ref": "#/$defs/Tools",
101          "description": "Tool configurations"
102        }
103      },
104      "additionalProperties": false,
105      "type": "object",
106      "required": [
107        "tools"
108      ]
109    },
110    "LSPConfig": {
111      "properties": {
112        "disabled": {
113          "type": "boolean",
114          "description": "Whether this LSP server is disabled",
115          "default": false
116        },
117        "command": {
118          "type": "string",
119          "description": "Command to execute for the LSP server",
120          "examples": [
121            "gopls"
122          ]
123        },
124        "args": {
125          "items": {
126            "type": "string"
127          },
128          "type": "array",
129          "description": "Arguments to pass to the LSP server command"
130        },
131        "env": {
132          "additionalProperties": {
133            "type": "string"
134          },
135          "type": "object",
136          "description": "Environment variables to set to the LSP server command"
137        },
138        "filetypes": {
139          "items": {
140            "type": "string",
141            "examples": [
142              "go",
143              "mod",
144              "rs",
145              "c",
146              "js",
147              "ts"
148            ]
149          },
150          "type": "array",
151          "description": "File types this LSP server handles"
152        },
153        "root_markers": {
154          "items": {
155            "type": "string",
156            "examples": [
157              "go.mod",
158              "package.json",
159              "Cargo.toml"
160            ]
161          },
162          "type": "array",
163          "description": "Files or directories that indicate the project root"
164        },
165        "init_options": {
166          "type": "object",
167          "description": "Initialization options passed to the LSP server during initialize request"
168        },
169        "options": {
170          "type": "object",
171          "description": "LSP server-specific settings passed during initialization"
172        }
173      },
174      "additionalProperties": false,
175      "type": "object",
176      "required": [
177        "command"
178      ]
179    },
180    "LSPs": {
181      "additionalProperties": {
182        "$ref": "#/$defs/LSPConfig"
183      },
184      "type": "object"
185    },
186    "MCPConfig": {
187      "properties": {
188        "command": {
189          "type": "string",
190          "description": "Command to execute for stdio MCP servers",
191          "examples": [
192            "npx"
193          ]
194        },
195        "env": {
196          "additionalProperties": {
197            "type": "string"
198          },
199          "type": "object",
200          "description": "Environment variables to set for the MCP server"
201        },
202        "args": {
203          "items": {
204            "type": "string"
205          },
206          "type": "array",
207          "description": "Arguments to pass to the MCP server command"
208        },
209        "type": {
210          "type": "string",
211          "enum": [
212            "stdio",
213            "sse",
214            "http"
215          ],
216          "description": "Type of MCP connection",
217          "default": "stdio"
218        },
219        "url": {
220          "type": "string",
221          "format": "uri",
222          "description": "URL for HTTP or SSE MCP servers",
223          "examples": [
224            "http://localhost:3000/mcp"
225          ]
226        },
227        "disabled": {
228          "type": "boolean",
229          "description": "Whether this MCP server is disabled",
230          "default": false
231        },
232        "disabled_tools": {
233          "items": {
234            "type": "string",
235            "examples": [
236              "get-library-doc"
237            ]
238          },
239          "type": "array",
240          "description": "List of tools from this MCP server to disable"
241        },
242        "timeout": {
243          "type": "integer",
244          "description": "Timeout in seconds for MCP server connections",
245          "default": 15,
246          "examples": [
247            30,
248            60,
249            120
250          ]
251        },
252        "headers": {
253          "additionalProperties": {
254            "type": "string"
255          },
256          "type": "object",
257          "description": "HTTP headers for HTTP/SSE MCP servers"
258        }
259      },
260      "additionalProperties": false,
261      "type": "object",
262      "required": [
263        "type"
264      ]
265    },
266    "MCPs": {
267      "additionalProperties": {
268        "$ref": "#/$defs/MCPConfig"
269      },
270      "type": "object"
271    },
272    "Model": {
273      "properties": {
274        "id": {
275          "type": "string"
276        },
277        "name": {
278          "type": "string"
279        },
280        "cost_per_1m_in": {
281          "type": "number"
282        },
283        "cost_per_1m_out": {
284          "type": "number"
285        },
286        "cost_per_1m_in_cached": {
287          "type": "number"
288        },
289        "cost_per_1m_out_cached": {
290          "type": "number"
291        },
292        "context_window": {
293          "type": "integer"
294        },
295        "default_max_tokens": {
296          "type": "integer"
297        },
298        "can_reason": {
299          "type": "boolean"
300        },
301        "reasoning_levels": {
302          "items": {
303            "type": "string"
304          },
305          "type": "array"
306        },
307        "default_reasoning_effort": {
308          "type": "string"
309        },
310        "supports_attachments": {
311          "type": "boolean"
312        },
313        "options": {
314          "$ref": "#/$defs/ModelOptions"
315        }
316      },
317      "additionalProperties": false,
318      "type": "object",
319      "required": [
320        "id",
321        "name",
322        "cost_per_1m_in",
323        "cost_per_1m_out",
324        "cost_per_1m_in_cached",
325        "cost_per_1m_out_cached",
326        "context_window",
327        "default_max_tokens",
328        "can_reason",
329        "supports_attachments",
330        "options"
331      ]
332    },
333    "ModelOptions": {
334      "properties": {
335        "temperature": {
336          "type": "number"
337        },
338        "top_p": {
339          "type": "number"
340        },
341        "top_k": {
342          "type": "integer"
343        },
344        "frequency_penalty": {
345          "type": "number"
346        },
347        "presence_penalty": {
348          "type": "number"
349        },
350        "provider_options": {
351          "type": "object"
352        }
353      },
354      "additionalProperties": false,
355      "type": "object"
356    },
357    "Options": {
358      "properties": {
359        "context_paths": {
360          "items": {
361            "type": "string",
362            "examples": [
363              ".cursorrules",
364              "CRUSH.md"
365            ]
366          },
367          "type": "array",
368          "description": "Paths to files containing context information for the AI"
369        },
370        "skills_paths": {
371          "items": {
372            "type": "string",
373            "examples": [
374              "~/.config/crush/skills",
375              "./skills"
376            ]
377          },
378          "type": "array",
379          "description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
380        },
381        "tui": {
382          "$ref": "#/$defs/TUIOptions",
383          "description": "Terminal user interface options"
384        },
385        "debug": {
386          "type": "boolean",
387          "description": "Enable debug logging",
388          "default": false
389        },
390        "debug_lsp": {
391          "type": "boolean",
392          "description": "Enable debug logging for LSP servers",
393          "default": false
394        },
395        "disable_auto_summarize": {
396          "type": "boolean",
397          "description": "Disable automatic conversation summarization",
398          "default": false
399        },
400        "data_directory": {
401          "type": "string",
402          "description": "Directory for storing application data (relative to working directory)",
403          "default": ".crush",
404          "examples": [
405            ".crush"
406          ]
407        },
408        "disabled_tools": {
409          "items": {
410            "type": "string",
411            "examples": [
412              "bash",
413              "sourcegraph"
414            ]
415          },
416          "type": "array",
417          "description": "List of built-in tools to disable and hide from the agent"
418        },
419        "disable_provider_auto_update": {
420          "type": "boolean",
421          "description": "Disable providers auto-update",
422          "default": false
423        },
424        "attribution": {
425          "$ref": "#/$defs/Attribution",
426          "description": "Attribution settings for generated content"
427        },
428        "disable_metrics": {
429          "type": "boolean",
430          "description": "Disable sending metrics",
431          "default": false
432        },
433        "initialize_as": {
434          "type": "string",
435          "description": "Name of the context file to create/update during project initialization",
436          "default": "AGENTS.md",
437          "examples": [
438            "AGENTS.md",
439            "CRUSH.md",
440            "CLAUDE.md",
441            "docs/LLMs.md"
442          ]
443        },
444        "disable_notifications": {
445          "type": "boolean",
446          "description": "Disable desktop notifications",
447          "default": false
448        }
449      },
450      "additionalProperties": false,
451      "type": "object"
452    },
453    "Permissions": {
454      "properties": {
455        "allowed_tools": {
456          "items": {
457            "type": "string",
458            "examples": [
459              "bash",
460              "view"
461            ]
462          },
463          "type": "array",
464          "description": "List of tools that don't require permission prompts"
465        }
466      },
467      "additionalProperties": false,
468      "type": "object"
469    },
470    "ProviderConfig": {
471      "properties": {
472        "id": {
473          "type": "string",
474          "description": "Unique identifier for the provider",
475          "examples": [
476            "openai"
477          ]
478        },
479        "name": {
480          "type": "string",
481          "description": "Human-readable name for the provider",
482          "examples": [
483            "OpenAI"
484          ]
485        },
486        "base_url": {
487          "type": "string",
488          "format": "uri",
489          "description": "Base URL for the provider's API",
490          "examples": [
491            "https://api.openai.com/v1"
492          ]
493        },
494        "type": {
495          "type": "string",
496          "enum": [
497            "openai",
498            "openai-compat",
499            "anthropic",
500            "gemini",
501            "azure",
502            "vertexai"
503          ],
504          "description": "Provider type that determines the API format",
505          "default": "openai"
506        },
507        "api_key": {
508          "type": "string",
509          "description": "API key for authentication with the provider",
510          "examples": [
511            "$OPENAI_API_KEY"
512          ]
513        },
514        "oauth": {
515          "$ref": "#/$defs/Token",
516          "description": "OAuth2 token for authentication with the provider"
517        },
518        "disable": {
519          "type": "boolean",
520          "description": "Whether this provider is disabled",
521          "default": false
522        },
523        "system_prompt_prefix": {
524          "type": "string",
525          "description": "Custom prefix to add to system prompts for this provider"
526        },
527        "extra_headers": {
528          "additionalProperties": {
529            "type": "string"
530          },
531          "type": "object",
532          "description": "Additional HTTP headers to send with requests"
533        },
534        "extra_body": {
535          "type": "object",
536          "description": "Additional fields to include in request bodies"
537        },
538        "provider_options": {
539          "type": "object",
540          "description": "Additional provider-specific options for this provider"
541        },
542        "models": {
543          "items": {
544            "$ref": "#/$defs/Model"
545          },
546          "type": "array",
547          "description": "List of models available from this provider"
548        }
549      },
550      "additionalProperties": false,
551      "type": "object"
552    },
553    "SelectedModel": {
554      "properties": {
555        "model": {
556          "type": "string",
557          "description": "The model ID as used by the provider API",
558          "examples": [
559            "gpt-4o"
560          ]
561        },
562        "provider": {
563          "type": "string",
564          "description": "The model provider ID that matches a key in the providers config",
565          "examples": [
566            "openai"
567          ]
568        },
569        "reasoning_effort": {
570          "type": "string",
571          "enum": [
572            "low",
573            "medium",
574            "high"
575          ],
576          "description": "Reasoning effort level for OpenAI models that support it"
577        },
578        "think": {
579          "type": "boolean",
580          "description": "Enable thinking mode for Anthropic models that support reasoning"
581        },
582        "max_tokens": {
583          "type": "integer",
584          "maximum": 200000,
585          "description": "Maximum number of tokens for model responses",
586          "examples": [
587            4096
588          ]
589        },
590        "temperature": {
591          "type": "number",
592          "maximum": 1,
593          "minimum": 0,
594          "description": "Sampling temperature",
595          "examples": [
596            0.7
597          ]
598        },
599        "top_p": {
600          "type": "number",
601          "maximum": 1,
602          "minimum": 0,
603          "description": "Top-p (nucleus) sampling parameter",
604          "examples": [
605            0.9
606          ]
607        },
608        "top_k": {
609          "type": "integer",
610          "description": "Top-k sampling parameter"
611        },
612        "frequency_penalty": {
613          "type": "number",
614          "description": "Frequency penalty to reduce repetition"
615        },
616        "presence_penalty": {
617          "type": "number",
618          "description": "Presence penalty to increase topic diversity"
619        },
620        "provider_options": {
621          "type": "object",
622          "description": "Additional provider-specific options for the model"
623        }
624      },
625      "additionalProperties": false,
626      "type": "object",
627      "required": [
628        "model",
629        "provider"
630      ]
631    },
632    "TUIOptions": {
633      "properties": {
634        "compact_mode": {
635          "type": "boolean",
636          "description": "Enable compact mode for the TUI interface",
637          "default": false
638        },
639        "diff_mode": {
640          "type": "string",
641          "enum": [
642            "unified",
643            "split"
644          ],
645          "description": "Diff mode for the TUI interface"
646        },
647        "completions": {
648          "$ref": "#/$defs/Completions",
649          "description": "Completions UI options"
650        }
651      },
652      "additionalProperties": false,
653      "type": "object",
654      "required": [
655        "completions"
656      ]
657    },
658    "Token": {
659      "properties": {
660        "access_token": {
661          "type": "string"
662        },
663        "refresh_token": {
664          "type": "string"
665        },
666        "expires_in": {
667          "type": "integer"
668        },
669        "expires_at": {
670          "type": "integer"
671        }
672      },
673      "additionalProperties": false,
674      "type": "object",
675      "required": [
676        "access_token",
677        "refresh_token",
678        "expires_in",
679        "expires_at"
680      ]
681    },
682    "ToolLs": {
683      "properties": {
684        "max_depth": {
685          "type": "integer",
686          "description": "Maximum depth for the ls tool",
687          "default": 0,
688          "examples": [
689            10
690          ]
691        },
692        "max_items": {
693          "type": "integer",
694          "description": "Maximum number of items to return for the ls tool",
695          "default": 1000,
696          "examples": [
697            100
698          ]
699        }
700      },
701      "additionalProperties": false,
702      "type": "object"
703    },
704    "Tools": {
705      "properties": {
706        "ls": {
707          "$ref": "#/$defs/ToolLs"
708        }
709      },
710      "additionalProperties": false,
711      "type": "object",
712      "required": [
713        "ls"
714      ]
715    }
716  }
717}