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 "skills_paths": {
367 "items": {
368 "type": "string",
369 "examples": [
370 "~/.config/crush/skills",
371 "./skills"
372 ]
373 },
374 "type": "array",
375 "description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
376 },
377 "tui": {
378 "$ref": "#/$defs/TUIOptions",
379 "description": "Terminal user interface options"
380 },
381 "debug": {
382 "type": "boolean",
383 "description": "Enable debug logging",
384 "default": false
385 },
386 "debug_lsp": {
387 "type": "boolean",
388 "description": "Enable debug logging for LSP servers",
389 "default": false
390 },
391 "disable_auto_summarize": {
392 "type": "boolean",
393 "description": "Disable automatic conversation summarization",
394 "default": false
395 },
396 "data_directory": {
397 "type": "string",
398 "description": "Directory for storing application data (relative to working directory)",
399 "default": ".crush",
400 "examples": [
401 ".crush"
402 ]
403 },
404 "disabled_tools": {
405 "items": {
406 "type": "string",
407 "examples": [
408 "bash",
409 "sourcegraph"
410 ]
411 },
412 "type": "array",
413 "description": "List of built-in tools to disable and hide from the agent"
414 },
415 "disable_provider_auto_update": {
416 "type": "boolean",
417 "description": "Disable providers auto-update",
418 "default": false
419 },
420 "disable_default_providers": {
421 "type": "boolean",
422 "description": "Ignore all default/embedded providers. When enabled",
423 "default": false
424 },
425 "attribution": {
426 "$ref": "#/$defs/Attribution",
427 "description": "Attribution settings for generated content"
428 },
429 "disable_metrics": {
430 "type": "boolean",
431 "description": "Disable sending metrics",
432 "default": false
433 },
434 "initialize_as": {
435 "type": "string",
436 "description": "Name of the context file to create/update during project initialization",
437 "default": "AGENTS.md",
438 "examples": [
439 "AGENTS.md",
440 "CRUSH.md",
441 "CLAUDE.md",
442 "docs/LLMs.md"
443 ]
444 },
445 "auto_lsp": {
446 "type": "boolean",
447 "description": "Automatically setup LSPs based on root markers",
448 "default": true
449 },
450 "progress": {
451 "type": "boolean",
452 "description": "Show indeterminate progress updates during long operations",
453 "default": true
454 },
455 "disable_notifications": {
456 "type": "boolean",
457 "description": "Disable desktop notifications",
458 "default": false
459 },
460 "disabled_skills": {
461 "items": {
462 "type": "string",
463 "examples": [
464 "crush-config"
465 ]
466 },
467 "type": "array",
468 "description": "List of skill names to disable and hide from the agent"
469 }
470 },
471 "additionalProperties": false,
472 "type": "object"
473 },
474 "Permissions": {
475 "properties": {
476 "allowed_tools": {
477 "items": {
478 "type": "string",
479 "examples": [
480 "bash",
481 "view"
482 ]
483 },
484 "type": "array",
485 "description": "List of tools that don't require permission prompts"
486 }
487 },
488 "additionalProperties": false,
489 "type": "object"
490 },
491 "ProviderConfig": {
492 "properties": {
493 "id": {
494 "type": "string",
495 "description": "Unique identifier for the provider",
496 "examples": [
497 "openai"
498 ]
499 },
500 "name": {
501 "type": "string",
502 "description": "Human-readable name for the provider",
503 "examples": [
504 "OpenAI"
505 ]
506 },
507 "base_url": {
508 "type": "string",
509 "format": "uri",
510 "description": "Base URL for the provider's API",
511 "examples": [
512 "https://api.openai.com/v1"
513 ]
514 },
515 "type": {
516 "type": "string",
517 "enum": [
518 "openai",
519 "openai-compat",
520 "anthropic",
521 "gemini",
522 "azure",
523 "vertexai"
524 ],
525 "description": "Provider type that determines the API format",
526 "default": "openai"
527 },
528 "api_key": {
529 "type": "string",
530 "description": "API key for authentication with the provider",
531 "examples": [
532 "$OPENAI_API_KEY"
533 ]
534 },
535 "oauth": {
536 "$ref": "#/$defs/Token",
537 "description": "OAuth2 token for authentication with the provider"
538 },
539 "disable": {
540 "type": "boolean",
541 "description": "Whether this provider is disabled",
542 "default": false
543 },
544 "system_prompt_prefix": {
545 "type": "string",
546 "description": "Custom prefix to add to system prompts for this provider"
547 },
548 "extra_headers": {
549 "additionalProperties": {
550 "type": "string"
551 },
552 "type": "object",
553 "description": "Additional HTTP headers to send with requests"
554 },
555 "extra_body": {
556 "type": "object",
557 "description": "Additional fields to include in request bodies"
558 },
559 "provider_options": {
560 "type": "object",
561 "description": "Additional provider-specific options for this provider"
562 },
563 "models": {
564 "items": {
565 "$ref": "#/$defs/Model"
566 },
567 "type": "array",
568 "description": "List of models available from this provider"
569 }
570 },
571 "additionalProperties": false,
572 "type": "object"
573 },
574 "SelectedModel": {
575 "properties": {
576 "model": {
577 "type": "string",
578 "description": "The model ID as used by the provider API",
579 "examples": [
580 "gpt-4o"
581 ]
582 },
583 "provider": {
584 "type": "string",
585 "description": "The model provider ID that matches a key in the providers config",
586 "examples": [
587 "openai"
588 ]
589 },
590 "reasoning_effort": {
591 "type": "string",
592 "enum": [
593 "low",
594 "medium",
595 "high"
596 ],
597 "description": "Reasoning effort level for OpenAI models that support it"
598 },
599 "think": {
600 "type": "boolean",
601 "description": "Enable thinking mode for Anthropic models that support reasoning"
602 },
603 "max_tokens": {
604 "type": "integer",
605 "maximum": 200000,
606 "description": "Maximum number of tokens for model responses",
607 "examples": [
608 4096
609 ]
610 },
611 "temperature": {
612 "type": "number",
613 "maximum": 1,
614 "minimum": 0,
615 "description": "Sampling temperature",
616 "examples": [
617 0.7
618 ]
619 },
620 "top_p": {
621 "type": "number",
622 "maximum": 1,
623 "minimum": 0,
624 "description": "Top-p (nucleus) sampling parameter",
625 "examples": [
626 0.9
627 ]
628 },
629 "top_k": {
630 "type": "integer",
631 "description": "Top-k sampling parameter"
632 },
633 "frequency_penalty": {
634 "type": "number",
635 "description": "Frequency penalty to reduce repetition"
636 },
637 "presence_penalty": {
638 "type": "number",
639 "description": "Presence penalty to increase topic diversity"
640 },
641 "provider_options": {
642 "type": "object",
643 "description": "Additional provider-specific options for the model"
644 }
645 },
646 "additionalProperties": false,
647 "type": "object",
648 "required": [
649 "model",
650 "provider"
651 ]
652 },
653 "TUIOptions": {
654 "properties": {
655 "compact_mode": {
656 "type": "boolean",
657 "description": "Enable compact mode for the TUI interface",
658 "default": false
659 },
660 "diff_mode": {
661 "type": "string",
662 "enum": [
663 "unified",
664 "split"
665 ],
666 "description": "Diff mode for the TUI interface"
667 },
668 "completions": {
669 "$ref": "#/$defs/Completions",
670 "description": "Completions UI options"
671 },
672 "transparent": {
673 "type": "boolean",
674 "description": "Enable transparent background for the TUI interface",
675 "default": false
676 }
677 },
678 "additionalProperties": false,
679 "type": "object",
680 "required": [
681 "completions"
682 ]
683 },
684 "Token": {
685 "properties": {
686 "access_token": {
687 "type": "string"
688 },
689 "refresh_token": {
690 "type": "string"
691 },
692 "expires_in": {
693 "type": "integer"
694 },
695 "expires_at": {
696 "type": "integer"
697 }
698 },
699 "additionalProperties": false,
700 "type": "object",
701 "required": [
702 "access_token",
703 "refresh_token",
704 "expires_in",
705 "expires_at"
706 ]
707 },
708 "ToolGrep": {
709 "properties": {
710 "timeout": {
711 "type": "integer",
712 "description": "Timeout for the grep tool call"
713 }
714 },
715 "additionalProperties": false,
716 "type": "object"
717 },
718 "ToolLs": {
719 "properties": {
720 "max_depth": {
721 "type": "integer",
722 "description": "Maximum depth for the ls tool",
723 "default": 0,
724 "examples": [
725 10
726 ]
727 },
728 "max_items": {
729 "type": "integer",
730 "description": "Maximum number of items to return for the ls tool",
731 "default": 1000,
732 "examples": [
733 100
734 ]
735 }
736 },
737 "additionalProperties": false,
738 "type": "object"
739 },
740 "Tools": {
741 "properties": {
742 "ls": {
743 "$ref": "#/$defs/ToolLs"
744 },
745 "grep": {
746 "$ref": "#/$defs/ToolGrep"
747 }
748 },
749 "additionalProperties": false,
750 "type": "object",
751 "required": [
752 "ls",
753 "grep"
754 ]
755 }
756 }
757}