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 "skills_paths": {
355 "items": {
356 "type": "string",
357 "examples": [
358 "~/.config/crush/skills",
359 "./skills"
360 ]
361 },
362 "type": "array",
363 "description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
364 },
365 "tui": {
366 "$ref": "#/$defs/TUIOptions",
367 "description": "Terminal user interface options"
368 },
369 "debug": {
370 "type": "boolean",
371 "description": "Enable debug logging",
372 "default": false
373 },
374 "debug_lsp": {
375 "type": "boolean",
376 "description": "Enable debug logging for LSP servers",
377 "default": false
378 },
379 "disable_auto_summarize": {
380 "type": "boolean",
381 "description": "Disable automatic conversation summarization",
382 "default": false
383 },
384 "data_directory": {
385 "type": "string",
386 "description": "Directory for storing application data (relative to working directory)",
387 "default": ".crush",
388 "examples": [
389 ".crush"
390 ]
391 },
392 "disabled_tools": {
393 "items": {
394 "type": "string",
395 "examples": [
396 "bash",
397 "sourcegraph"
398 ]
399 },
400 "type": "array",
401 "description": "List of built-in tools to disable and hide from the agent"
402 },
403 "disable_provider_auto_update": {
404 "type": "boolean",
405 "description": "Disable providers auto-update",
406 "default": false
407 },
408 "disable_default_providers": {
409 "type": "boolean",
410 "description": "Ignore all default/embedded providers. When enabled",
411 "default": false
412 },
413 "attribution": {
414 "$ref": "#/$defs/Attribution",
415 "description": "Attribution settings for generated content"
416 },
417 "disable_metrics": {
418 "type": "boolean",
419 "description": "Disable sending metrics",
420 "default": false
421 },
422 "initialize_as": {
423 "type": "string",
424 "description": "Name of the context file to create/update during project initialization",
425 "default": "AGENTS.md",
426 "examples": [
427 "AGENTS.md",
428 "CRUSH.md",
429 "CLAUDE.md",
430 "docs/LLMs.md"
431 ]
432 },
433 "auto_lsp": {
434 "type": "boolean",
435 "description": "Automatically setup LSPs based on root markers"
436 }
437 },
438 "additionalProperties": false,
439 "type": "object"
440 },
441 "Permissions": {
442 "properties": {
443 "allowed_tools": {
444 "items": {
445 "type": "string",
446 "examples": [
447 "bash",
448 "view"
449 ]
450 },
451 "type": "array",
452 "description": "List of tools that don't require permission prompts"
453 }
454 },
455 "additionalProperties": false,
456 "type": "object"
457 },
458 "ProviderConfig": {
459 "properties": {
460 "id": {
461 "type": "string",
462 "description": "Unique identifier for the provider",
463 "examples": [
464 "openai"
465 ]
466 },
467 "name": {
468 "type": "string",
469 "description": "Human-readable name for the provider",
470 "examples": [
471 "OpenAI"
472 ]
473 },
474 "base_url": {
475 "type": "string",
476 "format": "uri",
477 "description": "Base URL for the provider's API",
478 "examples": [
479 "https://api.openai.com/v1"
480 ]
481 },
482 "type": {
483 "type": "string",
484 "enum": [
485 "openai",
486 "openai-compat",
487 "anthropic",
488 "gemini",
489 "azure",
490 "vertexai"
491 ],
492 "description": "Provider type that determines the API format",
493 "default": "openai"
494 },
495 "api_key": {
496 "type": "string",
497 "description": "API key for authentication with the provider",
498 "examples": [
499 "$OPENAI_API_KEY"
500 ]
501 },
502 "oauth": {
503 "$ref": "#/$defs/Token",
504 "description": "OAuth2 token for authentication with the provider"
505 },
506 "disable": {
507 "type": "boolean",
508 "description": "Whether this provider is disabled",
509 "default": false
510 },
511 "system_prompt_prefix": {
512 "type": "string",
513 "description": "Custom prefix to add to system prompts for this provider"
514 },
515 "extra_headers": {
516 "additionalProperties": {
517 "type": "string"
518 },
519 "type": "object",
520 "description": "Additional HTTP headers to send with requests"
521 },
522 "extra_body": {
523 "type": "object",
524 "description": "Additional fields to include in request bodies"
525 },
526 "provider_options": {
527 "type": "object",
528 "description": "Additional provider-specific options for this provider"
529 },
530 "models": {
531 "items": {
532 "$ref": "#/$defs/Model"
533 },
534 "type": "array",
535 "description": "List of models available from this provider"
536 }
537 },
538 "additionalProperties": false,
539 "type": "object"
540 },
541 "SelectedModel": {
542 "properties": {
543 "model": {
544 "type": "string",
545 "description": "The model ID as used by the provider API",
546 "examples": [
547 "gpt-4o"
548 ]
549 },
550 "provider": {
551 "type": "string",
552 "description": "The model provider ID that matches a key in the providers config",
553 "examples": [
554 "openai"
555 ]
556 },
557 "reasoning_effort": {
558 "type": "string",
559 "enum": [
560 "low",
561 "medium",
562 "high"
563 ],
564 "description": "Reasoning effort level for OpenAI models that support it"
565 },
566 "think": {
567 "type": "boolean",
568 "description": "Enable thinking mode for Anthropic models that support reasoning"
569 },
570 "max_tokens": {
571 "type": "integer",
572 "maximum": 200000,
573 "description": "Maximum number of tokens for model responses",
574 "examples": [
575 4096
576 ]
577 },
578 "temperature": {
579 "type": "number",
580 "maximum": 1,
581 "minimum": 0,
582 "description": "Sampling temperature",
583 "examples": [
584 0.7
585 ]
586 },
587 "top_p": {
588 "type": "number",
589 "maximum": 1,
590 "minimum": 0,
591 "description": "Top-p (nucleus) sampling parameter",
592 "examples": [
593 0.9
594 ]
595 },
596 "top_k": {
597 "type": "integer",
598 "description": "Top-k sampling parameter"
599 },
600 "frequency_penalty": {
601 "type": "number",
602 "description": "Frequency penalty to reduce repetition"
603 },
604 "presence_penalty": {
605 "type": "number",
606 "description": "Presence penalty to increase topic diversity"
607 },
608 "provider_options": {
609 "type": "object",
610 "description": "Additional provider-specific options for the model"
611 }
612 },
613 "additionalProperties": false,
614 "type": "object",
615 "required": [
616 "model",
617 "provider"
618 ]
619 },
620 "TUIOptions": {
621 "properties": {
622 "compact_mode": {
623 "type": "boolean",
624 "description": "Enable compact mode for the TUI interface",
625 "default": false
626 },
627 "diff_mode": {
628 "type": "string",
629 "enum": [
630 "unified",
631 "split"
632 ],
633 "description": "Diff mode for the TUI interface"
634 },
635 "completions": {
636 "$ref": "#/$defs/Completions",
637 "description": "Completions UI options"
638 }
639 },
640 "additionalProperties": false,
641 "type": "object",
642 "required": [
643 "completions"
644 ]
645 },
646 "Token": {
647 "properties": {
648 "access_token": {
649 "type": "string"
650 },
651 "refresh_token": {
652 "type": "string"
653 },
654 "expires_in": {
655 "type": "integer"
656 },
657 "expires_at": {
658 "type": "integer"
659 }
660 },
661 "additionalProperties": false,
662 "type": "object",
663 "required": [
664 "access_token",
665 "refresh_token",
666 "expires_in",
667 "expires_at"
668 ]
669 },
670 "ToolLs": {
671 "properties": {
672 "max_depth": {
673 "type": "integer",
674 "description": "Maximum depth for the ls tool",
675 "default": 0,
676 "examples": [
677 10
678 ]
679 },
680 "max_items": {
681 "type": "integer",
682 "description": "Maximum number of items to return for the ls tool",
683 "default": 1000,
684 "examples": [
685 100
686 ]
687 }
688 },
689 "additionalProperties": false,
690 "type": "object"
691 },
692 "Tools": {
693 "properties": {
694 "ls": {
695 "$ref": "#/$defs/ToolLs"
696 }
697 },
698 "additionalProperties": false,
699 "type": "object"
700 }
701 }
702}