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