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