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