File size: 26,021 Bytes
ee9c641 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 | {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://github.com/charmbracelet/crush/internal/config/config",
"$ref": "#/$defs/Config",
"$defs": {
"Attribution": {
"properties": {
"trailer_style": {
"type": "string",
"enum": [
"none",
"co-authored-by",
"assisted-by"
],
"description": "Style of attribution trailer to add to commits",
"default": "assisted-by"
},
"co_authored_by": {
"type": "boolean",
"description": "Deprecated: use trailer_style instead",
"deprecated": true
},
"generated_with": {
"type": "boolean",
"description": "Add Generated with Crush line to commit messages and issues and PRs",
"default": true
}
},
"additionalProperties": false,
"type": "object"
},
"Completions": {
"properties": {
"max_depth": {
"type": "integer",
"description": "Maximum depth for the ls tool",
"default": 0,
"examples": [
10
]
},
"max_items": {
"type": "integer",
"description": "Maximum number of items to return for the ls tool",
"default": 1000,
"examples": [
100
]
}
},
"additionalProperties": false,
"type": "object"
},
"Config": {
"properties": {
"$schema": {
"type": "string"
},
"models": {
"additionalProperties": {
"$ref": "#/$defs/SelectedModel"
},
"type": "object",
"description": "Model configurations for different model types"
},
"providers": {
"additionalProperties": {
"$ref": "#/$defs/ProviderConfig"
},
"type": "object",
"description": "AI provider configurations"
},
"mcp": {
"$ref": "#/$defs/MCPs",
"description": "Model Context Protocol server configurations"
},
"lsp": {
"$ref": "#/$defs/LSPs",
"description": "Language Server Protocol configurations"
},
"options": {
"$ref": "#/$defs/Options",
"description": "General application options"
},
"permissions": {
"$ref": "#/$defs/Permissions",
"description": "Permission settings for tool usage"
},
"tools": {
"$ref": "#/$defs/Tools",
"description": "Tool configurations"
},
"hooks": {
"additionalProperties": {
"items": {
"$ref": "#/$defs/HookConfig"
},
"type": "array"
},
"type": "object",
"description": "User-defined shell commands that fire on hook events (e.g. PreToolUse)"
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Environment variables to set on startup"
}
},
"additionalProperties": false,
"type": "object"
},
"HookConfig": {
"properties": {
"name": {
"type": "string",
"description": "Friendly display name shown in the TUI for this hook"
},
"matcher": {
"type": "string",
"description": "Regex pattern tested against the tool name. Empty means match all tools."
},
"command": {
"type": "string",
"description": "Shell command to execute when the hook fires"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds for the hook command",
"default": 30
}
},
"additionalProperties": false,
"type": "object",
"required": [
"command"
]
},
"LSPConfig": {
"properties": {
"disabled": {
"type": "boolean",
"description": "Whether this LSP server is disabled",
"default": false
},
"command": {
"type": "string",
"description": "Command to execute for the LSP server",
"examples": [
"gopls"
]
},
"args": {
"items": {
"type": "string"
},
"type": "array",
"description": "Arguments to pass to the LSP server command"
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Environment variables to set to the LSP server command"
},
"filetypes": {
"items": {
"type": "string",
"examples": [
"go",
"mod",
"rs",
"c",
"js",
"ts"
]
},
"type": "array",
"description": "File types this LSP server handles"
},
"root_markers": {
"items": {
"type": "string",
"examples": [
"go.mod",
"package.json",
"Cargo.toml"
]
},
"type": "array",
"description": "Files or directories that indicate the project root"
},
"init_options": {
"type": "object",
"description": "Initialization options passed to the LSP server during initialize request"
},
"options": {
"type": "object",
"description": "LSP server-specific settings passed during initialization"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds for LSP server initialization",
"default": 30,
"examples": [
60,
120
]
}
},
"additionalProperties": false,
"type": "object"
},
"LSPs": {
"additionalProperties": {
"$ref": "#/$defs/LSPConfig"
},
"type": "object"
},
"MCPConfig": {
"properties": {
"command": {
"type": "string",
"description": "Command to execute for stdio MCP servers",
"examples": [
"npx"
]
},
"env": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Environment variables to set for the MCP server"
},
"args": {
"items": {
"type": "string"
},
"type": "array",
"description": "Arguments to pass to the MCP server command"
},
"type": {
"type": "string",
"enum": [
"stdio",
"sse",
"http"
],
"description": "Type of MCP connection",
"default": "stdio"
},
"url": {
"type": "string",
"format": "uri",
"description": "URL for HTTP or SSE MCP servers",
"examples": [
"http://localhost:3000/mcp"
]
},
"disabled": {
"type": "boolean",
"description": "Whether this MCP server is disabled",
"default": false
},
"disabled_tools": {
"items": {
"type": "string",
"examples": [
"get-library-doc"
]
},
"type": "array",
"description": "List of tools from this MCP server to disable"
},
"enabled_tools": {
"items": {
"type": "string",
"examples": [
"get-library-doc"
]
},
"type": "array",
"description": "Allow list of tools from this MCP server"
},
"timeout": {
"type": "integer",
"description": "Timeout in seconds for MCP server connections",
"default": 10,
"examples": [
30,
60,
120
]
},
"sessionless": {
"type": "boolean",
"description": "Mark a sessionless MCP server (no Mcp-Session-Id) so Crush skips the subscriptions/listen stream it would otherwise reject. Leave unset to auto-detect known sessionless servers (e.g. GitHub MCP)",
"default": false
},
"headers": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "HTTP headers for HTTP/SSE MCP servers"
},
"oauth": {
"type": "boolean",
"description": "Enable OAuth 2.1 authorization flow for this MCP server (HTTP transport only)",
"default": false
},
"oauth_client_id": {
"type": "string",
"description": "Pre-registered OAuth client ID for servers without dynamic client registration"
},
"oauth_client_secret": {
"type": "string",
"description": "Pre-registered OAuth client secret paired with oauth_client_id"
},
"oauth_callback_port": {
"type": "integer",
"description": "Fixed localhost port for the OAuth callback"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"type"
]
},
"MCPs": {
"additionalProperties": {
"$ref": "#/$defs/MCPConfig"
},
"type": "object"
},
"Model": {
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"cost_per_1m_in": {
"type": "number"
},
"cost_per_1m_out": {
"type": "number"
},
"cost_per_1m_in_cached": {
"type": "number"
},
"cost_per_1m_out_cached": {
"type": "number"
},
"context_window": {
"type": "integer"
},
"default_max_tokens": {
"type": "integer"
},
"can_reason": {
"type": "boolean"
},
"reasoning_levels": {
"items": {
"type": "string"
},
"type": "array"
},
"default_reasoning_effort": {
"type": "string"
},
"supports_attachments": {
"type": "boolean"
},
"options": {
"$ref": "#/$defs/ModelOptions"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"id",
"name",
"cost_per_1m_in",
"cost_per_1m_out",
"cost_per_1m_in_cached",
"cost_per_1m_out_cached",
"context_window",
"default_max_tokens",
"can_reason",
"supports_attachments"
]
},
"ModelOptions": {
"properties": {
"temperature": {
"type": "number"
},
"top_p": {
"type": "number"
},
"top_k": {
"type": "integer"
},
"frequency_penalty": {
"type": "number"
},
"presence_penalty": {
"type": "number"
},
"provider_options": {
"type": "object"
}
},
"additionalProperties": false,
"type": "object"
},
"OAuthClient": {
"properties": {
"client_id": {
"type": "string"
},
"client_secret": {
"type": "string"
},
"auth_url": {
"type": "string"
},
"token_url": {
"type": "string"
},
"auth_style": {
"type": "integer"
}
},
"additionalProperties": false,
"type": "object"
},
"Options": {
"properties": {
"context_paths": {
"items": {
"type": "string",
"examples": [
".cursorrules",
"CRUSH.md"
]
},
"type": "array",
"description": "Paths to files containing context information for the AI"
},
"global_context_paths": {
"items": {
"type": "string"
},
"type": "array",
"description": "Paths to files containing global context information for the AI",
"default": [
"~/.config/crush/CRUSH.md",
"~/.config/AGENTS.md"
]
},
"skills_paths": {
"items": {
"type": "string",
"examples": [
"~/.config/crush/skills",
"./skills"
]
},
"type": "array",
"description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
},
"tui": {
"$ref": "#/$defs/TUIOptions",
"description": "Terminal user interface options"
},
"debug": {
"type": "boolean",
"description": "Enable debug logging",
"default": false
},
"debug_lsp": {
"type": "boolean",
"description": "Enable debug logging for LSP servers",
"default": false
},
"disable_auto_summarize": {
"type": "boolean",
"description": "Disable automatic conversation summarization",
"default": false
},
"data_directory": {
"type": "string",
"description": "Directory for storing application data. Relative paths are resolved against the working directory; absolute paths are used as-is.",
"default": ".crush",
"examples": [
".crush"
]
},
"disabled_tools": {
"items": {
"type": "string",
"examples": [
"bash",
"sourcegraph"
]
},
"type": "array",
"description": "List of built-in tools to disable and hide from the agent"
},
"disable_provider_auto_update": {
"type": "boolean",
"description": "Disable providers auto-update",
"default": false
},
"disable_default_providers": {
"type": "boolean",
"description": "Ignore all default/embedded providers. When enabled, providers must be fully specified in the config file with base_url, models, and api_key - no merging with defaults occurs",
"default": false
},
"attribution": {
"$ref": "#/$defs/Attribution",
"description": "Attribution settings for generated content"
},
"disable_metrics": {
"type": "boolean",
"description": "Disable sending metrics",
"default": false
},
"initialize_as": {
"type": "string",
"description": "Name of the context file to create/update during project initialization",
"default": "AGENTS.md",
"examples": [
"AGENTS.md",
"CRUSH.md",
"CLAUDE.md",
"docs/LLMs.md"
]
},
"auto_lsp": {
"type": "boolean",
"description": "Automatically setup LSPs based on root markers",
"default": true
},
"progress": {
"type": "boolean",
"description": "Show indeterminate progress updates during long operations",
"default": true
},
"notifications": {
"type": "string",
"enum": [
"auto",
"native",
"osc",
"bell",
"disabled"
],
"description": "Notification style to use. Options: auto (default), native, osc, bell, disabled. Auto selects based on environment: native for local sessions, osc for SSH (with automatic OSC 99/777 detection).",
"default": "auto"
},
"disabled_skills": {
"items": {
"type": "string",
"examples": [
"crush-config"
]
},
"type": "array",
"description": "List of skill names to disable and hide from the agent"
},
"request_timeout": {
"type": "integer",
"description": "Timeout in seconds for each LLM API request. Streaming responses are aborted only after this much inactivity, so slow but active streams are never killed. 0 disables it, negative values are invalid.",
"default": 60,
"examples": [
120,
300,
0
]
}
},
"additionalProperties": false,
"type": "object"
},
"Permissions": {
"properties": {
"allowed_tools": {
"items": {
"type": "string",
"examples": [
"bash",
"view"
]
},
"type": "array",
"description": "List of tools that don't require permission prompts"
}
},
"additionalProperties": false,
"type": "object"
},
"ProviderConfig": {
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the provider",
"examples": [
"openai"
]
},
"name": {
"type": "string",
"description": "Human-readable name for the provider",
"examples": [
"OpenAI"
]
},
"base_url": {
"type": "string",
"format": "uri",
"description": "Base URL for the provider's API",
"examples": [
"https://api.openai.com/v1"
]
},
"type": {
"type": "string",
"enum": [
"openai",
"openai-compat",
"openrouter",
"vercel",
"anthropic",
"google",
"azure",
"bedrock",
"google-vertex",
"hyper",
"litellm",
"llamacpp",
"lmstudio",
"ollama",
"omlx"
],
"description": "Provider type that determines the API format",
"default": "openai"
},
"api_key": {
"type": "string",
"description": "API key for authentication with the provider",
"examples": [
"$OPENAI_API_KEY"
]
},
"oauth": {
"$ref": "#/$defs/Token",
"description": "OAuth2 token for authentication with the provider"
},
"disable": {
"type": "boolean",
"description": "Whether this provider is disabled",
"default": false
},
"system_prompt_prefix": {
"type": "string",
"description": "Custom prefix to add to system prompts for this provider"
},
"extra_headers": {
"additionalProperties": {
"type": "string"
},
"type": "object",
"description": "Additional HTTP headers to send with requests"
},
"extra_body": {
"type": "object",
"description": "Additional fields to include in request bodies, only works with openai-compatible providers"
},
"provider_options": {
"type": "object",
"description": "Additional provider-specific options for this provider"
},
"aws_auth_refresh": {
"type": "string",
"description": "Shell command to run when AWS credentials expire (Bedrock only)."
},
"flat_rate": {
"type": "boolean",
"description": "Flat-rate mode for this provider"
},
"discover_models": {
"type": "boolean",
"description": "Auto-discover models from /v1/models endpoint. When true with existing models they are merged (yours win)",
"default": true
},
"models": {
"items": {
"$ref": "#/$defs/Model"
},
"type": "array",
"description": "List of models available from this provider"
}
},
"additionalProperties": false,
"type": "object"
},
"SelectedModel": {
"properties": {
"model": {
"type": "string",
"description": "The model ID as used by the provider API",
"examples": [
"gpt-4o"
]
},
"provider": {
"type": "string",
"description": "The model provider ID that matches a key in the providers config",
"examples": [
"openai"
]
},
"reasoning_effort": {
"type": "string",
"enum": [
"low",
"medium",
"high"
],
"description": "Reasoning effort level for OpenAI models that support it"
},
"think": {
"type": "boolean",
"description": "Enable thinking mode for Anthropic models that support reasoning"
},
"max_tokens": {
"type": "integer",
"maximum": 200000,
"description": "Maximum number of tokens for model responses",
"examples": [
4096
]
},
"temperature": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "Sampling temperature",
"examples": [
0.7
]
},
"top_p": {
"type": "number",
"maximum": 1,
"minimum": 0,
"description": "Top-p (nucleus) sampling parameter",
"examples": [
0.9
]
},
"top_k": {
"type": "integer",
"description": "Top-k sampling parameter"
},
"frequency_penalty": {
"type": "number",
"description": "Frequency penalty to reduce repetition"
},
"presence_penalty": {
"type": "number",
"description": "Presence penalty to increase topic diversity"
},
"provider_options": {
"type": "object",
"description": "Additional provider-specific options for the model"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"model",
"provider"
]
},
"TUIOptions": {
"properties": {
"compact_mode": {
"type": "boolean",
"description": "Enable compact mode for the TUI interface",
"default": false
},
"diff_mode": {
"type": "string",
"enum": [
"unified",
"split"
],
"description": "Diff mode for the TUI interface"
},
"completions": {
"$ref": "#/$defs/Completions",
"description": "Completions UI options"
},
"transparent": {
"type": "boolean",
"description": "Enable transparent background for the TUI interface",
"default": false
},
"scrollbar": {
"type": "string",
"enum": [
"default",
"always",
"never"
],
"description": "Chat scrollbar visibility",
"default": "default"
},
"mouse": {
"type": "boolean",
"description": "Enable terminal mouse capture for selection, clicks, and scrolling in the TUI. Disable to let the terminal emulator or tmux handle text selection and copy/paste",
"default": true
},
"exit_banner": {
"type": "string",
"enum": [
"default",
"compact",
"none"
],
"description": "Exit banner style after quitting Crush",
"default": "default"
}
},
"additionalProperties": false,
"type": "object"
},
"Token": {
"properties": {
"access_token": {
"type": "string"
},
"refresh_token": {
"type": "string"
},
"id_token": {
"type": "string"
},
"account_id": {
"type": "string"
},
"expires_in": {
"type": "integer"
},
"expires_at": {
"type": "integer"
},
"client": {
"$ref": "#/$defs/OAuthClient"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"access_token",
"expires_in",
"expires_at"
]
},
"ToolGlob": {
"properties": {
"timeout": {
"type": "integer",
"description": "Timeout for the glob tool call"
}
},
"additionalProperties": false,
"type": "object"
},
"ToolGrep": {
"properties": {
"timeout": {
"type": "integer",
"description": "Timeout for the grep tool call"
}
},
"additionalProperties": false,
"type": "object"
},
"ToolLs": {
"properties": {
"max_depth": {
"type": "integer",
"description": "Maximum depth for the ls tool",
"default": 0,
"examples": [
10
]
},
"max_items": {
"type": "integer",
"description": "Maximum number of items to return for the ls tool",
"default": 1000,
"examples": [
100
]
}
},
"additionalProperties": false,
"type": "object"
},
"Tools": {
"properties": {
"ls": {
"$ref": "#/$defs/ToolLs"
},
"grep": {
"$ref": "#/$defs/ToolGrep"
},
"glob": {
"$ref": "#/$defs/ToolGlob"
}
},
"additionalProperties": false,
"type": "object"
}
}
}
|