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