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