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 "models": {
592 "items": {
593 "$ref": "#/$defs/Model"
594 },
595 "type": "array",
596 "description": "List of models available from this provider"
597 }
598 },
599 "additionalProperties": false,
600 "type": "object"
601 },
602 "SelectedModel": {
603 "properties": {
604 "model": {
605 "type": "string",
606 "description": "The model ID as used by the provider API",
607 "examples": [
608 "gpt-4o"
609 ]
610 },
611 "provider": {
612 "type": "string",
613 "description": "The model provider ID that matches a key in the providers config",
614 "examples": [
615 "openai"
616 ]
617 },
618 "reasoning_effort": {
619 "type": "string",
620 "enum": [
621 "low",
622 "medium",
623 "high"
624 ],
625 "description": "Reasoning effort level for OpenAI models that support it"
626 },
627 "think": {
628 "type": "boolean",
629 "description": "Enable thinking mode for Anthropic models that support reasoning"
630 },
631 "max_tokens": {
632 "type": "integer",
633 "maximum": 200000,
634 "description": "Maximum number of tokens for model responses",
635 "examples": [
636 4096
637 ]
638 },
639 "temperature": {
640 "type": "number",
641 "maximum": 1,
642 "minimum": 0,
643 "description": "Sampling temperature",
644 "examples": [
645 0.7
646 ]
647 },
648 "top_p": {
649 "type": "number",
650 "maximum": 1,
651 "minimum": 0,
652 "description": "Top-p (nucleus) sampling parameter",
653 "examples": [
654 0.9
655 ]
656 },
657 "top_k": {
658 "type": "integer",
659 "description": "Top-k sampling parameter"
660 },
661 "frequency_penalty": {
662 "type": "number",
663 "description": "Frequency penalty to reduce repetition"
664 },
665 "presence_penalty": {
666 "type": "number",
667 "description": "Presence penalty to increase topic diversity"
668 },
669 "provider_options": {
670 "type": "object",
671 "description": "Additional provider-specific options for the model"
672 }
673 },
674 "additionalProperties": false,
675 "type": "object",
676 "required": [
677 "model",
678 "provider"
679 ]
680 },
681 "TUIOptions": {
682 "properties": {
683 "compact_mode": {
684 "type": "boolean",
685 "description": "Enable compact mode for the TUI interface",
686 "default": false
687 },
688 "diff_mode": {
689 "type": "string",
690 "enum": [
691 "unified",
692 "split"
693 ],
694 "description": "Diff mode for the TUI interface"
695 },
696 "completions": {
697 "$ref": "#/$defs/Completions",
698 "description": "Completions UI options"
699 },
700 "transparent": {
701 "type": "boolean",
702 "description": "Enable transparent background for the TUI interface",
703 "default": false
704 }
705 },
706 "additionalProperties": false,
707 "type": "object"
708 },
709 "Token": {
710 "properties": {
711 "access_token": {
712 "type": "string"
713 },
714 "refresh_token": {
715 "type": "string"
716 },
717 "expires_in": {
718 "type": "integer"
719 },
720 "expires_at": {
721 "type": "integer"
722 }
723 },
724 "additionalProperties": false,
725 "type": "object",
726 "required": [
727 "access_token",
728 "refresh_token",
729 "expires_in",
730 "expires_at"
731 ]
732 },
733 "ToolGrep": {
734 "properties": {
735 "timeout": {
736 "type": "integer",
737 "description": "Timeout for the grep tool call"
738 }
739 },
740 "additionalProperties": false,
741 "type": "object"
742 },
743 "ToolLs": {
744 "properties": {
745 "max_depth": {
746 "type": "integer",
747 "description": "Maximum depth for the ls tool",
748 "default": 0,
749 "examples": [
750 10
751 ]
752 },
753 "max_items": {
754 "type": "integer",
755 "description": "Maximum number of items to return for the ls tool",
756 "default": 1000,
757 "examples": [
758 100
759 ]
760 }
761 },
762 "additionalProperties": false,
763 "type": "object"
764 },
765 "Tools": {
766 "properties": {
767 "ls": {
768 "$ref": "#/$defs/ToolLs"
769 },
770 "grep": {
771 "$ref": "#/$defs/ToolGrep"
772 }
773 },
774 "additionalProperties": false,
775 "type": "object"
776 }
777 }
778}