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          "$ref": "#/$defs/Map[string,github.com/charmbracelet/crush/internal/config.ProviderConfig]",
 68          "description": "AI provider configurations"
 69        },
 70        "mcp": {
 71          "$ref": "#/$defs/MCPs",
 72          "description": "Model Context Protocol server configurations"
 73        },
 74        "lsp": {
 75          "$ref": "#/$defs/LSPs",
 76          "description": "Language Server Protocol configurations"
 77        },
 78        "options": {
 79          "$ref": "#/$defs/Options",
 80          "description": "General application options"
 81        },
 82        "permissions": {
 83          "$ref": "#/$defs/Permissions",
 84          "description": "Permission settings for tool usage"
 85        },
 86        "tools": {
 87          "$ref": "#/$defs/Tools",
 88          "description": "Tool configurations"
 89        }
 90      },
 91      "additionalProperties": false,
 92      "type": "object",
 93      "required": [
 94        "tools"
 95      ]
 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        "timeout": {
161          "type": "integer",
162          "description": "Timeout in seconds for LSP server initialization",
163          "default": 30,
164          "examples": [
165            60,
166            120
167          ]
168        }
169      },
170      "additionalProperties": false,
171      "type": "object"
172    },
173    "LSPs": {
174      "additionalProperties": {
175        "$ref": "#/$defs/LSPConfig"
176      },
177      "type": "object"
178    },
179    "MCPConfig": {
180      "properties": {
181        "command": {
182          "type": "string",
183          "description": "Command to execute for stdio MCP servers",
184          "examples": [
185            "npx"
186          ]
187        },
188        "env": {
189          "additionalProperties": {
190            "type": "string"
191          },
192          "type": "object",
193          "description": "Environment variables to set for the MCP server"
194        },
195        "args": {
196          "items": {
197            "type": "string"
198          },
199          "type": "array",
200          "description": "Arguments to pass to the MCP server command"
201        },
202        "type": {
203          "type": "string",
204          "enum": [
205            "stdio",
206            "sse",
207            "http"
208          ],
209          "description": "Type of MCP connection",
210          "default": "stdio"
211        },
212        "url": {
213          "type": "string",
214          "format": "uri",
215          "description": "URL for HTTP or SSE MCP servers",
216          "examples": [
217            "http://localhost:3000/mcp"
218          ]
219        },
220        "disabled": {
221          "type": "boolean",
222          "description": "Whether this MCP server is disabled",
223          "default": false
224        },
225        "disabled_tools": {
226          "items": {
227            "type": "string",
228            "examples": [
229              "get-library-doc"
230            ]
231          },
232          "type": "array",
233          "description": "List of tools from this MCP server to disable"
234        },
235        "timeout": {
236          "type": "integer",
237          "description": "Timeout in seconds for MCP server connections",
238          "default": 15,
239          "examples": [
240            30,
241            60,
242            120
243          ]
244        },
245        "headers": {
246          "additionalProperties": {
247            "type": "string"
248          },
249          "type": "object",
250          "description": "HTTP headers for HTTP/SSE MCP servers"
251        }
252      },
253      "additionalProperties": false,
254      "type": "object",
255      "required": [
256        "type"
257      ]
258    },
259    "MCPs": {
260      "additionalProperties": {
261        "$ref": "#/$defs/MCPConfig"
262      },
263      "type": "object"
264    },
265    "Map[string,github.com/charmbracelet/crush/internal/config.ProviderConfig]": {
266      "properties": {},
267      "additionalProperties": false,
268      "type": "object"
269    },
270    "Options": {
271      "properties": {
272        "context_paths": {
273          "items": {
274            "type": "string",
275            "examples": [
276              ".cursorrules",
277              "CRUSH.md"
278            ]
279          },
280          "type": "array",
281          "description": "Paths to files containing context information for the AI"
282        },
283        "skills_paths": {
284          "items": {
285            "type": "string",
286            "examples": [
287              "~/.config/crush/skills",
288              "./skills"
289            ]
290          },
291          "type": "array",
292          "description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
293        },
294        "tui": {
295          "$ref": "#/$defs/TUIOptions",
296          "description": "Terminal user interface options"
297        },
298        "debug": {
299          "type": "boolean",
300          "description": "Enable debug logging",
301          "default": false
302        },
303        "debug_lsp": {
304          "type": "boolean",
305          "description": "Enable debug logging for LSP servers",
306          "default": false
307        },
308        "disable_auto_summarize": {
309          "type": "boolean",
310          "description": "Disable automatic conversation summarization",
311          "default": false
312        },
313        "data_directory": {
314          "type": "string",
315          "description": "Directory for storing application data (relative to working directory)",
316          "default": ".crush",
317          "examples": [
318            ".crush"
319          ]
320        },
321        "disabled_tools": {
322          "items": {
323            "type": "string",
324            "examples": [
325              "bash",
326              "sourcegraph"
327            ]
328          },
329          "type": "array",
330          "description": "List of built-in tools to disable and hide from the agent"
331        },
332        "disable_provider_auto_update": {
333          "type": "boolean",
334          "description": "Disable providers auto-update",
335          "default": false
336        },
337        "disable_default_providers": {
338          "type": "boolean",
339          "description": "Ignore all default/embedded providers. When enabled",
340          "default": false
341        },
342        "attribution": {
343          "$ref": "#/$defs/Attribution",
344          "description": "Attribution settings for generated content"
345        },
346        "disable_metrics": {
347          "type": "boolean",
348          "description": "Disable sending metrics",
349          "default": false
350        },
351        "initialize_as": {
352          "type": "string",
353          "description": "Name of the context file to create/update during project initialization",
354          "default": "AGENTS.md",
355          "examples": [
356            "AGENTS.md",
357            "CRUSH.md",
358            "CLAUDE.md",
359            "docs/LLMs.md"
360          ]
361        },
362        "auto_lsp": {
363          "type": "boolean",
364          "description": "Automatically setup LSPs based on root markers",
365          "default": true
366        },
367        "progress": {
368          "type": "boolean",
369          "description": "Show indeterminate progress updates during long operations",
370          "default": true
371        },
372        "disable_notifications": {
373          "type": "boolean",
374          "description": "Disable desktop notifications",
375          "default": false
376        }
377      },
378      "additionalProperties": false,
379      "type": "object"
380    },
381    "Permissions": {
382      "properties": {
383        "allowed_tools": {
384          "items": {
385            "type": "string",
386            "examples": [
387              "bash",
388              "view"
389            ]
390          },
391          "type": "array",
392          "description": "List of tools that don't require permission prompts"
393        }
394      },
395      "additionalProperties": false,
396      "type": "object"
397    },
398    "SelectedModel": {
399      "properties": {
400        "model": {
401          "type": "string",
402          "description": "The model ID as used by the provider API",
403          "examples": [
404            "gpt-4o"
405          ]
406        },
407        "provider": {
408          "type": "string",
409          "description": "The model provider ID that matches a key in the providers config",
410          "examples": [
411            "openai"
412          ]
413        },
414        "reasoning_effort": {
415          "type": "string",
416          "enum": [
417            "low",
418            "medium",
419            "high"
420          ],
421          "description": "Reasoning effort level for OpenAI models that support it"
422        },
423        "think": {
424          "type": "boolean",
425          "description": "Enable thinking mode for Anthropic models that support reasoning"
426        },
427        "max_tokens": {
428          "type": "integer",
429          "maximum": 200000,
430          "description": "Maximum number of tokens for model responses",
431          "examples": [
432            4096
433          ]
434        },
435        "temperature": {
436          "type": "number",
437          "maximum": 1,
438          "minimum": 0,
439          "description": "Sampling temperature",
440          "examples": [
441            0.7
442          ]
443        },
444        "top_p": {
445          "type": "number",
446          "maximum": 1,
447          "minimum": 0,
448          "description": "Top-p (nucleus) sampling parameter",
449          "examples": [
450            0.9
451          ]
452        },
453        "top_k": {
454          "type": "integer",
455          "description": "Top-k sampling parameter"
456        },
457        "frequency_penalty": {
458          "type": "number",
459          "description": "Frequency penalty to reduce repetition"
460        },
461        "presence_penalty": {
462          "type": "number",
463          "description": "Presence penalty to increase topic diversity"
464        },
465        "provider_options": {
466          "type": "object",
467          "description": "Additional provider-specific options for the model"
468        }
469      },
470      "additionalProperties": false,
471      "type": "object",
472      "required": [
473        "model",
474        "provider"
475      ]
476    },
477    "TUIOptions": {
478      "properties": {
479        "compact_mode": {
480          "type": "boolean",
481          "description": "Enable compact mode for the TUI interface",
482          "default": false
483        },
484        "diff_mode": {
485          "type": "string",
486          "enum": [
487            "unified",
488            "split"
489          ],
490          "description": "Diff mode for the TUI interface"
491        },
492        "completions": {
493          "$ref": "#/$defs/Completions",
494          "description": "Completions UI options"
495        },
496        "transparent": {
497          "type": "boolean",
498          "description": "Enable transparent background for the TUI interface",
499          "default": false
500        }
501      },
502      "additionalProperties": false,
503      "type": "object",
504      "required": [
505        "completions"
506      ]
507    },
508    "ToolGrep": {
509      "properties": {
510        "timeout": {
511          "type": "integer",
512          "description": "Timeout for the grep tool call"
513        }
514      },
515      "additionalProperties": false,
516      "type": "object"
517    },
518    "ToolLs": {
519      "properties": {
520        "max_depth": {
521          "type": "integer",
522          "description": "Maximum depth for the ls tool",
523          "default": 0,
524          "examples": [
525            10
526          ]
527        },
528        "max_items": {
529          "type": "integer",
530          "description": "Maximum number of items to return for the ls tool",
531          "default": 1000,
532          "examples": [
533            100
534          ]
535        }
536      },
537      "additionalProperties": false,
538      "type": "object"
539    },
540    "Tools": {
541      "properties": {
542        "ls": {
543          "$ref": "#/$defs/ToolLs"
544        },
545        "grep": {
546          "$ref": "#/$defs/ToolGrep"
547        }
548      },
549      "additionalProperties": false,
550      "type": "object",
551      "required": [
552        "ls",
553        "grep"
554      ]
555    }
556  }
557}