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 "timeout": {
268 "type": "integer",
269 "description": "Timeout in seconds for MCP server connections",
270 "default": 15,
271 "examples": [
272 30,
273 60,
274 120
275 ]
276 },
277 "headers": {
278 "additionalProperties": {
279 "type": "string"
280 },
281 "type": "object",
282 "description": "HTTP headers for HTTP/SSE MCP servers"
283 }
284 },
285 "additionalProperties": false,
286 "type": "object",
287 "required": [
288 "type"
289 ]
290 },
291 "MCPs": {
292 "additionalProperties": {
293 "$ref": "#/$defs/MCPConfig"
294 },
295 "type": "object"
296 },
297 "Model": {
298 "properties": {
299 "id": {
300 "type": "string"
301 },
302 "name": {
303 "type": "string"
304 },
305 "cost_per_1m_in": {
306 "type": "number"
307 },
308 "cost_per_1m_out": {
309 "type": "number"
310 },
311 "cost_per_1m_in_cached": {
312 "type": "number"
313 },
314 "cost_per_1m_out_cached": {
315 "type": "number"
316 },
317 "context_window": {
318 "type": "integer"
319 },
320 "default_max_tokens": {
321 "type": "integer"
322 },
323 "can_reason": {
324 "type": "boolean"
325 },
326 "reasoning_levels": {
327 "items": {
328 "type": "string"
329 },
330 "type": "array"
331 },
332 "default_reasoning_effort": {
333 "type": "string"
334 },
335 "supports_attachments": {
336 "type": "boolean"
337 },
338 "options": {
339 "$ref": "#/$defs/ModelOptions"
340 }
341 },
342 "additionalProperties": false,
343 "type": "object",
344 "required": [
345 "id",
346 "name",
347 "cost_per_1m_in",
348 "cost_per_1m_out",
349 "cost_per_1m_in_cached",
350 "cost_per_1m_out_cached",
351 "context_window",
352 "default_max_tokens",
353 "can_reason",
354 "supports_attachments"
355 ]
356 },
357 "ModelOptions": {
358 "properties": {
359 "temperature": {
360 "type": "number"
361 },
362 "top_p": {
363 "type": "number"
364 },
365 "top_k": {
366 "type": "integer"
367 },
368 "frequency_penalty": {
369 "type": "number"
370 },
371 "presence_penalty": {
372 "type": "number"
373 },
374 "provider_options": {
375 "type": "object"
376 }
377 },
378 "additionalProperties": false,
379 "type": "object"
380 },
381 "Options": {
382 "properties": {
383 "context_paths": {
384 "items": {
385 "type": "string",
386 "examples": [
387 ".cursorrules",
388 "CRUSH.md"
389 ]
390 },
391 "type": "array",
392 "description": "Paths to files containing context information for the AI"
393 },
394 "skills_paths": {
395 "items": {
396 "type": "string",
397 "examples": [
398 "~/.config/crush/skills",
399 "./skills"
400 ]
401 },
402 "type": "array",
403 "description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
404 },
405 "tui": {
406 "$ref": "#/$defs/TUIOptions",
407 "description": "Terminal user interface options"
408 },
409 "debug": {
410 "type": "boolean",
411 "description": "Enable debug logging",
412 "default": false
413 },
414 "debug_lsp": {
415 "type": "boolean",
416 "description": "Enable debug logging for LSP servers",
417 "default": false
418 },
419 "disable_auto_summarize": {
420 "type": "boolean",
421 "description": "Disable automatic conversation summarization",
422 "default": false
423 },
424 "data_directory": {
425 "type": "string",
426 "description": "Directory for storing application data (relative to working directory)",
427 "default": ".crush",
428 "examples": [
429 ".crush"
430 ]
431 },
432 "disabled_tools": {
433 "items": {
434 "type": "string",
435 "examples": [
436 "bash",
437 "sourcegraph"
438 ]
439 },
440 "type": "array",
441 "description": "List of built-in tools to disable and hide from the agent"
442 },
443 "disable_provider_auto_update": {
444 "type": "boolean",
445 "description": "Disable providers auto-update",
446 "default": false
447 },
448 "disable_default_providers": {
449 "type": "boolean",
450 "description": "Ignore all default/embedded providers. When enabled",
451 "default": false
452 },
453 "attribution": {
454 "$ref": "#/$defs/Attribution",
455 "description": "Attribution settings for generated content"
456 },
457 "disable_metrics": {
458 "type": "boolean",
459 "description": "Disable sending metrics",
460 "default": false
461 },
462 "initialize_as": {
463 "type": "string",
464 "description": "Name of the context file to create/update during project initialization",
465 "default": "AGENTS.md",
466 "examples": [
467 "AGENTS.md",
468 "CRUSH.md",
469 "CLAUDE.md",
470 "docs/LLMs.md"
471 ]
472 },
473 "auto_lsp": {
474 "type": "boolean",
475 "description": "Automatically setup LSPs based on root markers",
476 "default": true
477 },
478 "progress": {
479 "type": "boolean",
480 "description": "Show indeterminate progress updates during long operations",
481 "default": true
482 },
483 "disable_notifications": {
484 "type": "boolean",
485 "description": "Disable desktop notifications",
486 "default": false
487 },
488 "disabled_skills": {
489 "items": {
490 "type": "string",
491 "examples": [
492 "crush-config"
493 ]
494 },
495 "type": "array",
496 "description": "List of skill names to disable and hide from the agent"
497 }
498 },
499 "additionalProperties": false,
500 "type": "object"
501 },
502 "Permissions": {
503 "properties": {
504 "allowed_tools": {
505 "items": {
506 "type": "string",
507 "examples": [
508 "bash",
509 "view"
510 ]
511 },
512 "type": "array",
513 "description": "List of tools that don't require permission prompts"
514 }
515 },
516 "additionalProperties": false,
517 "type": "object"
518 },
519 "ProviderConfig": {
520 "properties": {
521 "id": {
522 "type": "string",
523 "description": "Unique identifier for the provider",
524 "examples": [
525 "openai"
526 ]
527 },
528 "name": {
529 "type": "string",
530 "description": "Human-readable name for the provider",
531 "examples": [
532 "OpenAI"
533 ]
534 },
535 "base_url": {
536 "type": "string",
537 "format": "uri",
538 "description": "Base URL for the provider's API",
539 "examples": [
540 "https://api.openai.com/v1"
541 ]
542 },
543 "type": {
544 "type": "string",
545 "enum": [
546 "openai",
547 "openai-compat",
548 "anthropic",
549 "gemini",
550 "azure",
551 "vertexai"
552 ],
553 "description": "Provider type that determines the API format",
554 "default": "openai"
555 },
556 "api_key": {
557 "type": "string",
558 "description": "API key for authentication with the provider",
559 "examples": [
560 "$OPENAI_API_KEY"
561 ]
562 },
563 "oauth": {
564 "$ref": "#/$defs/Token",
565 "description": "OAuth2 token for authentication with the provider"
566 },
567 "disable": {
568 "type": "boolean",
569 "description": "Whether this provider is disabled",
570 "default": false
571 },
572 "system_prompt_prefix": {
573 "type": "string",
574 "description": "Custom prefix to add to system prompts for this provider"
575 },
576 "extra_headers": {
577 "additionalProperties": {
578 "type": "string"
579 },
580 "type": "object",
581 "description": "Additional HTTP headers to send with requests"
582 },
583 "extra_body": {
584 "type": "object",
585 "description": "Additional fields to include in request bodies"
586 },
587 "provider_options": {
588 "type": "object",
589 "description": "Additional provider-specific options for this provider"
590 },
591 "flat_rate": {
592 "type": "boolean",
593 "description": "Flat-rate mode 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 },
713 "Token": {
714 "properties": {
715 "access_token": {
716 "type": "string"
717 },
718 "refresh_token": {
719 "type": "string"
720 },
721 "expires_in": {
722 "type": "integer"
723 },
724 "expires_at": {
725 "type": "integer"
726 }
727 },
728 "additionalProperties": false,
729 "type": "object",
730 "required": [
731 "access_token",
732 "refresh_token",
733 "expires_in",
734 "expires_at"
735 ]
736 },
737 "ToolGrep": {
738 "properties": {
739 "timeout": {
740 "type": "integer",
741 "description": "Timeout for the grep tool call"
742 }
743 },
744 "additionalProperties": false,
745 "type": "object"
746 },
747 "ToolLs": {
748 "properties": {
749 "max_depth": {
750 "type": "integer",
751 "description": "Maximum depth for the ls tool",
752 "default": 0,
753 "examples": [
754 10
755 ]
756 },
757 "max_items": {
758 "type": "integer",
759 "description": "Maximum number of items to return for the ls tool",
760 "default": 1000,
761 "examples": [
762 100
763 ]
764 }
765 },
766 "additionalProperties": false,
767 "type": "object"
768 },
769 "Tools": {
770 "properties": {
771 "ls": {
772 "$ref": "#/$defs/ToolLs"
773 },
774 "grep": {
775 "$ref": "#/$defs/ToolGrep"
776 }
777 },
778 "additionalProperties": false,
779 "type": "object"
780 }
781 }
782}