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