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