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