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