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