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 "disable_notifications": {
444 "type": "boolean",
445 "description": "Disable desktop notifications",
446 "default": false
447 }
448 },
449 "additionalProperties": false,
450 "type": "object"
451 },
452 "Permissions": {
453 "properties": {
454 "allowed_tools": {
455 "items": {
456 "type": "string",
457 "examples": [
458 "bash",
459 "view"
460 ]
461 },
462 "type": "array",
463 "description": "List of tools that don't require permission prompts"
464 }
465 },
466 "additionalProperties": false,
467 "type": "object"
468 },
469 "ProviderConfig": {
470 "properties": {
471 "id": {
472 "type": "string",
473 "description": "Unique identifier for the provider",
474 "examples": [
475 "openai"
476 ]
477 },
478 "name": {
479 "type": "string",
480 "description": "Human-readable name for the provider",
481 "examples": [
482 "OpenAI"
483 ]
484 },
485 "base_url": {
486 "type": "string",
487 "format": "uri",
488 "description": "Base URL for the provider's API",
489 "examples": [
490 "https://api.openai.com/v1"
491 ]
492 },
493 "type": {
494 "type": "string",
495 "enum": [
496 "openai",
497 "openai-compat",
498 "anthropic",
499 "gemini",
500 "azure",
501 "vertexai"
502 ],
503 "description": "Provider type that determines the API format",
504 "default": "openai"
505 },
506 "api_key": {
507 "type": "string",
508 "description": "API key for authentication with the provider",
509 "examples": [
510 "$OPENAI_API_KEY"
511 ]
512 },
513 "oauth": {
514 "$ref": "#/$defs/Token",
515 "description": "OAuth2 token for authentication with the provider"
516 },
517 "disable": {
518 "type": "boolean",
519 "description": "Whether this provider is disabled",
520 "default": false
521 },
522 "system_prompt_prefix": {
523 "type": "string",
524 "description": "Custom prefix to add to system prompts for this provider"
525 },
526 "extra_headers": {
527 "additionalProperties": {
528 "type": "string"
529 },
530 "type": "object",
531 "description": "Additional HTTP headers to send with requests"
532 },
533 "extra_body": {
534 "type": "object",
535 "description": "Additional fields to include in request bodies"
536 },
537 "provider_options": {
538 "type": "object",
539 "description": "Additional provider-specific options for this provider"
540 },
541 "models": {
542 "items": {
543 "$ref": "#/$defs/Model"
544 },
545 "type": "array",
546 "description": "List of models available from this provider"
547 }
548 },
549 "additionalProperties": false,
550 "type": "object"
551 },
552 "SelectedModel": {
553 "properties": {
554 "model": {
555 "type": "string",
556 "description": "The model ID as used by the provider API",
557 "examples": [
558 "gpt-4o"
559 ]
560 },
561 "provider": {
562 "type": "string",
563 "description": "The model provider ID that matches a key in the providers config",
564 "examples": [
565 "openai"
566 ]
567 },
568 "reasoning_effort": {
569 "type": "string",
570 "enum": [
571 "low",
572 "medium",
573 "high"
574 ],
575 "description": "Reasoning effort level for OpenAI models that support it"
576 },
577 "think": {
578 "type": "boolean",
579 "description": "Enable thinking mode for Anthropic models that support reasoning"
580 },
581 "max_tokens": {
582 "type": "integer",
583 "maximum": 200000,
584 "description": "Maximum number of tokens for model responses",
585 "examples": [
586 4096
587 ]
588 },
589 "temperature": {
590 "type": "number",
591 "maximum": 1,
592 "minimum": 0,
593 "description": "Sampling temperature",
594 "examples": [
595 0.7
596 ]
597 },
598 "top_p": {
599 "type": "number",
600 "maximum": 1,
601 "minimum": 0,
602 "description": "Top-p (nucleus) sampling parameter",
603 "examples": [
604 0.9
605 ]
606 },
607 "top_k": {
608 "type": "integer",
609 "description": "Top-k sampling parameter"
610 },
611 "frequency_penalty": {
612 "type": "number",
613 "description": "Frequency penalty to reduce repetition"
614 },
615 "presence_penalty": {
616 "type": "number",
617 "description": "Presence penalty to increase topic diversity"
618 },
619 "provider_options": {
620 "type": "object",
621 "description": "Additional provider-specific options for the model"
622 }
623 },
624 "additionalProperties": false,
625 "type": "object",
626 "required": [
627 "model",
628 "provider"
629 ]
630 },
631 "TUIOptions": {
632 "properties": {
633 "compact_mode": {
634 "type": "boolean",
635 "description": "Enable compact mode for the TUI interface",
636 "default": false
637 },
638 "diff_mode": {
639 "type": "string",
640 "enum": [
641 "unified",
642 "split"
643 ],
644 "description": "Diff mode for the TUI interface"
645 },
646 "completions": {
647 "$ref": "#/$defs/Completions",
648 "description": "Completions UI options"
649 }
650 },
651 "additionalProperties": false,
652 "type": "object",
653 "required": [
654 "completions"
655 ]
656 },
657 "Token": {
658 "properties": {
659 "access_token": {
660 "type": "string"
661 },
662 "refresh_token": {
663 "type": "string"
664 },
665 "expires_in": {
666 "type": "integer"
667 },
668 "expires_at": {
669 "type": "integer"
670 }
671 },
672 "additionalProperties": false,
673 "type": "object",
674 "required": [
675 "access_token",
676 "refresh_token",
677 "expires_in",
678 "expires_at"
679 ]
680 },
681 "ToolLs": {
682 "properties": {
683 "max_depth": {
684 "type": "integer",
685 "description": "Maximum depth for the ls tool",
686 "default": 0,
687 "examples": [
688 10
689 ]
690 },
691 "max_items": {
692 "type": "integer",
693 "description": "Maximum number of items to return for the ls tool",
694 "default": 1000,
695 "examples": [
696 100
697 ]
698 }
699 },
700 "additionalProperties": false,
701 "type": "object"
702 },
703 "Tools": {
704 "properties": {
705 "ls": {
706 "$ref": "#/$defs/ToolLs"
707 }
708 },
709 "additionalProperties": false,
710 "type": "object"
711 }
712 }
713}