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