schema.json 19 KB

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