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 "recent_models": {
67 "additionalProperties": {
68 "items": {
69 "$ref": "#/$defs/SelectedModel"
70 },
71 "type": "array"
72 },
73 "type": "object",
74 "description": "Recently used models sorted by most recent first"
75 },
76 "providers": {
77 "additionalProperties": {
78 "$ref": "#/$defs/ProviderConfig"
79 },
80 "type": "object",
81 "description": "AI provider configurations"
82 },
83 "mcp": {
84 "$ref": "#/$defs/MCPs",
85 "description": "Model Context Protocol server configurations"
86 },
87 "lsp": {
88 "$ref": "#/$defs/LSPs",
89 "description": "Language Server Protocol configurations"
90 },
91 "options": {
92 "$ref": "#/$defs/Options",
93 "description": "General application options"
94 },
95 "permissions": {
96 "$ref": "#/$defs/Permissions",
97 "description": "Permission settings for tool usage"
98 },
99 "tools": {
100 "$ref": "#/$defs/Tools",
101 "description": "Tool configurations"
102 }
103 },
104 "additionalProperties": false,
105 "type": "object",
106 "required": [
107 "tools"
108 ]
109 },
110 "LSPConfig": {
111 "properties": {
112 "disabled": {
113 "type": "boolean",
114 "description": "Whether this LSP server is disabled",
115 "default": false
116 },
117 "command": {
118 "type": "string",
119 "description": "Command to execute for the LSP server",
120 "examples": [
121 "gopls"
122 ]
123 },
124 "args": {
125 "items": {
126 "type": "string"
127 },
128 "type": "array",
129 "description": "Arguments to pass to the LSP server command"
130 },
131 "env": {
132 "additionalProperties": {
133 "type": "string"
134 },
135 "type": "object",
136 "description": "Environment variables to set to the LSP server command"
137 },
138 "filetypes": {
139 "items": {
140 "type": "string",
141 "examples": [
142 "go",
143 "mod",
144 "rs",
145 "c",
146 "js",
147 "ts"
148 ]
149 },
150 "type": "array",
151 "description": "File types this LSP server handles"
152 },
153 "root_markers": {
154 "items": {
155 "type": "string",
156 "examples": [
157 "go.mod",
158 "package.json",
159 "Cargo.toml"
160 ]
161 },
162 "type": "array",
163 "description": "Files or directories that indicate the project root"
164 },
165 "init_options": {
166 "type": "object",
167 "description": "Initialization options passed to the LSP server during initialize request"
168 },
169 "options": {
170 "type": "object",
171 "description": "LSP server-specific settings passed during initialization"
172 }
173 },
174 "additionalProperties": false,
175 "type": "object",
176 "required": [
177 "command"
178 ]
179 },
180 "LSPs": {
181 "additionalProperties": {
182 "$ref": "#/$defs/LSPConfig"
183 },
184 "type": "object"
185 },
186 "MCPConfig": {
187 "properties": {
188 "command": {
189 "type": "string",
190 "description": "Command to execute for stdio MCP servers",
191 "examples": [
192 "npx"
193 ]
194 },
195 "env": {
196 "additionalProperties": {
197 "type": "string"
198 },
199 "type": "object",
200 "description": "Environment variables to set for the MCP server"
201 },
202 "args": {
203 "items": {
204 "type": "string"
205 },
206 "type": "array",
207 "description": "Arguments to pass to the MCP server command"
208 },
209 "type": {
210 "type": "string",
211 "enum": [
212 "stdio",
213 "sse",
214 "http"
215 ],
216 "description": "Type of MCP connection",
217 "default": "stdio"
218 },
219 "url": {
220 "type": "string",
221 "format": "uri",
222 "description": "URL for HTTP or SSE MCP servers",
223 "examples": [
224 "http://localhost:3000/mcp"
225 ]
226 },
227 "disabled": {
228 "type": "boolean",
229 "description": "Whether this MCP server is disabled",
230 "default": false
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 "tui": {
372 "$ref": "#/$defs/TUIOptions",
373 "description": "Terminal user interface options"
374 },
375 "debug": {
376 "type": "boolean",
377 "description": "Enable debug logging",
378 "default": false
379 },
380 "debug_lsp": {
381 "type": "boolean",
382 "description": "Enable debug logging for LSP servers",
383 "default": false
384 },
385 "disable_auto_summarize": {
386 "type": "boolean",
387 "description": "Disable automatic conversation summarization",
388 "default": false
389 },
390 "data_directory": {
391 "type": "string",
392 "description": "Directory for storing application data (relative to working directory)",
393 "default": ".crush",
394 "examples": [
395 ".crush"
396 ]
397 },
398 "disabled_tools": {
399 "items": {
400 "type": "string"
401 },
402 "type": "array",
403 "description": "Tools to disable"
404 },
405 "disable_provider_auto_update": {
406 "type": "boolean",
407 "description": "Disable providers auto-update",
408 "default": false
409 },
410 "attribution": {
411 "$ref": "#/$defs/Attribution",
412 "description": "Attribution settings for generated content"
413 },
414 "disable_metrics": {
415 "type": "boolean",
416 "description": "Disable sending metrics",
417 "default": false
418 },
419 "initialize_as": {
420 "type": "string",
421 "description": "Name of the context file to create/update during project initialization",
422 "default": "AGENTS.md",
423 "examples": [
424 "AGENTS.md",
425 "CRUSH.md",
426 "CLAUDE.md",
427 "docs/LLMs.md"
428 ]
429 },
430 "disable_notifications": {
431 "type": "boolean",
432 "description": "Disable desktop notifications",
433 "default": false
434 }
435 },
436 "additionalProperties": false,
437 "type": "object",
438 "required": [
439 "disabled_tools"
440 ]
441 },
442 "Permissions": {
443 "properties": {
444 "allowed_tools": {
445 "items": {
446 "type": "string",
447 "examples": [
448 "bash",
449 "view"
450 ]
451 },
452 "type": "array",
453 "description": "List of tools that don't require permission prompts"
454 }
455 },
456 "additionalProperties": false,
457 "type": "object"
458 },
459 "ProviderConfig": {
460 "properties": {
461 "id": {
462 "type": "string",
463 "description": "Unique identifier for the provider",
464 "examples": [
465 "openai"
466 ]
467 },
468 "name": {
469 "type": "string",
470 "description": "Human-readable name for the provider",
471 "examples": [
472 "OpenAI"
473 ]
474 },
475 "base_url": {
476 "type": "string",
477 "format": "uri",
478 "description": "Base URL for the provider's API",
479 "examples": [
480 "https://api.openai.com/v1"
481 ]
482 },
483 "type": {
484 "type": "string",
485 "enum": [
486 "openai",
487 "openai-compat",
488 "anthropic",
489 "gemini",
490 "azure",
491 "vertexai"
492 ],
493 "description": "Provider type that determines the API format",
494 "default": "openai"
495 },
496 "api_key": {
497 "type": "string",
498 "description": "API key for authentication with the provider",
499 "examples": [
500 "$OPENAI_API_KEY"
501 ]
502 },
503 "oauth": {
504 "$ref": "#/$defs/Token",
505 "description": "OAuth2 token for authentication with the provider"
506 },
507 "disable": {
508 "type": "boolean",
509 "description": "Whether this provider is disabled",
510 "default": false
511 },
512 "system_prompt_prefix": {
513 "type": "string",
514 "description": "Custom prefix to add to system prompts for this provider"
515 },
516 "extra_headers": {
517 "additionalProperties": {
518 "type": "string"
519 },
520 "type": "object",
521 "description": "Additional HTTP headers to send with requests"
522 },
523 "extra_body": {
524 "type": "object",
525 "description": "Additional fields to include in request bodies"
526 },
527 "provider_options": {
528 "type": "object",
529 "description": "Additional provider-specific options for this provider"
530 },
531 "models": {
532 "items": {
533 "$ref": "#/$defs/Model"
534 },
535 "type": "array",
536 "description": "List of models available from this provider"
537 }
538 },
539 "additionalProperties": false,
540 "type": "object"
541 },
542 "SelectedModel": {
543 "properties": {
544 "model": {
545 "type": "string",
546 "description": "The model ID as used by the provider API",
547 "examples": [
548 "gpt-4o"
549 ]
550 },
551 "provider": {
552 "type": "string",
553 "description": "The model provider ID that matches a key in the providers config",
554 "examples": [
555 "openai"
556 ]
557 },
558 "reasoning_effort": {
559 "type": "string",
560 "enum": [
561 "low",
562 "medium",
563 "high"
564 ],
565 "description": "Reasoning effort level for OpenAI models that support it"
566 },
567 "think": {
568 "type": "boolean",
569 "description": "Enable thinking mode for Anthropic models that support reasoning"
570 },
571 "max_tokens": {
572 "type": "integer",
573 "maximum": 200000,
574 "description": "Maximum number of tokens for model responses",
575 "examples": [
576 4096
577 ]
578 },
579 "temperature": {
580 "type": "number",
581 "maximum": 1,
582 "minimum": 0,
583 "description": "Sampling temperature",
584 "examples": [
585 0.7
586 ]
587 },
588 "top_p": {
589 "type": "number",
590 "maximum": 1,
591 "minimum": 0,
592 "description": "Top-p (nucleus) sampling parameter",
593 "examples": [
594 0.9
595 ]
596 },
597 "top_k": {
598 "type": "integer",
599 "description": "Top-k sampling parameter"
600 },
601 "frequency_penalty": {
602 "type": "number",
603 "description": "Frequency penalty to reduce repetition"
604 },
605 "presence_penalty": {
606 "type": "number",
607 "description": "Presence penalty to increase topic diversity"
608 },
609 "provider_options": {
610 "type": "object",
611 "description": "Additional provider-specific options for the model"
612 }
613 },
614 "additionalProperties": false,
615 "type": "object",
616 "required": [
617 "model",
618 "provider"
619 ]
620 },
621 "TUIOptions": {
622 "properties": {
623 "compact_mode": {
624 "type": "boolean",
625 "description": "Enable compact mode for the TUI interface",
626 "default": false
627 },
628 "diff_mode": {
629 "type": "string",
630 "enum": [
631 "unified",
632 "split"
633 ],
634 "description": "Diff mode for the TUI interface"
635 },
636 "completions": {
637 "$ref": "#/$defs/Completions",
638 "description": "Completions UI options"
639 }
640 },
641 "additionalProperties": false,
642 "type": "object",
643 "required": [
644 "completions"
645 ]
646 },
647 "Token": {
648 "properties": {
649 "access_token": {
650 "type": "string"
651 },
652 "refresh_token": {
653 "type": "string"
654 },
655 "expires_in": {
656 "type": "integer"
657 },
658 "expires_at": {
659 "type": "integer"
660 }
661 },
662 "additionalProperties": false,
663 "type": "object",
664 "required": [
665 "access_token",
666 "refresh_token",
667 "expires_in",
668 "expires_at"
669 ]
670 },
671 "ToolLs": {
672 "properties": {
673 "max_depth": {
674 "type": "integer",
675 "description": "Maximum depth for the ls tool",
676 "default": 0,
677 "examples": [
678 10
679 ]
680 },
681 "max_items": {
682 "type": "integer",
683 "description": "Maximum number of items to return for the ls tool",
684 "default": 1000,
685 "examples": [
686 100
687 ]
688 }
689 },
690 "additionalProperties": false,
691 "type": "object"
692 },
693 "Tools": {
694 "properties": {
695 "ls": {
696 "$ref": "#/$defs/ToolLs"
697 }
698 },
699 "additionalProperties": false,
700 "type": "object",
701 "required": [
702 "ls"
703 ]
704 }
705 }
706}