schema.json 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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. "$ref": "#/$defs/Map[string,github.com/charmbracelet/crush/internal/config.ProviderConfig]",
  68. "description": "AI provider configurations"
  69. },
  70. "mcp": {
  71. "$ref": "#/$defs/MCPs",
  72. "description": "Model Context Protocol server configurations"
  73. },
  74. "lsp": {
  75. "$ref": "#/$defs/LSPs",
  76. "description": "Language Server Protocol configurations"
  77. },
  78. "options": {
  79. "$ref": "#/$defs/Options",
  80. "description": "General application options"
  81. },
  82. "permissions": {
  83. "$ref": "#/$defs/Permissions",
  84. "description": "Permission settings for tool usage"
  85. },
  86. "tools": {
  87. "$ref": "#/$defs/Tools",
  88. "description": "Tool configurations"
  89. }
  90. },
  91. "additionalProperties": false,
  92. "type": "object",
  93. "required": [
  94. "tools"
  95. ]
  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. "timeout": {
  161. "type": "integer",
  162. "description": "Timeout in seconds for LSP server initialization",
  163. "default": 30,
  164. "examples": [
  165. 60,
  166. 120
  167. ]
  168. }
  169. },
  170. "additionalProperties": false,
  171. "type": "object"
  172. },
  173. "LSPs": {
  174. "additionalProperties": {
  175. "$ref": "#/$defs/LSPConfig"
  176. },
  177. "type": "object"
  178. },
  179. "MCPConfig": {
  180. "properties": {
  181. "command": {
  182. "type": "string",
  183. "description": "Command to execute for stdio MCP servers",
  184. "examples": [
  185. "npx"
  186. ]
  187. },
  188. "env": {
  189. "additionalProperties": {
  190. "type": "string"
  191. },
  192. "type": "object",
  193. "description": "Environment variables to set for the MCP server"
  194. },
  195. "args": {
  196. "items": {
  197. "type": "string"
  198. },
  199. "type": "array",
  200. "description": "Arguments to pass to the MCP server command"
  201. },
  202. "type": {
  203. "type": "string",
  204. "enum": [
  205. "stdio",
  206. "sse",
  207. "http"
  208. ],
  209. "description": "Type of MCP connection",
  210. "default": "stdio"
  211. },
  212. "url": {
  213. "type": "string",
  214. "format": "uri",
  215. "description": "URL for HTTP or SSE MCP servers",
  216. "examples": [
  217. "http://localhost:3000/mcp"
  218. ]
  219. },
  220. "disabled": {
  221. "type": "boolean",
  222. "description": "Whether this MCP server is disabled",
  223. "default": false
  224. },
  225. "disabled_tools": {
  226. "items": {
  227. "type": "string",
  228. "examples": [
  229. "get-library-doc"
  230. ]
  231. },
  232. "type": "array",
  233. "description": "List of tools from this MCP server to disable"
  234. },
  235. "timeout": {
  236. "type": "integer",
  237. "description": "Timeout in seconds for MCP server connections",
  238. "default": 15,
  239. "examples": [
  240. 30,
  241. 60,
  242. 120
  243. ]
  244. },
  245. "headers": {
  246. "additionalProperties": {
  247. "type": "string"
  248. },
  249. "type": "object",
  250. "description": "HTTP headers for HTTP/SSE MCP servers"
  251. }
  252. },
  253. "additionalProperties": false,
  254. "type": "object",
  255. "required": [
  256. "type"
  257. ]
  258. },
  259. "MCPs": {
  260. "additionalProperties": {
  261. "$ref": "#/$defs/MCPConfig"
  262. },
  263. "type": "object"
  264. },
  265. "Map[string,github.com/charmbracelet/crush/internal/config.ProviderConfig]": {
  266. "properties": {},
  267. "additionalProperties": false,
  268. "type": "object"
  269. },
  270. "Options": {
  271. "properties": {
  272. "context_paths": {
  273. "items": {
  274. "type": "string",
  275. "examples": [
  276. ".cursorrules",
  277. "CRUSH.md"
  278. ]
  279. },
  280. "type": "array",
  281. "description": "Paths to files containing context information for the AI"
  282. },
  283. "skills_paths": {
  284. "items": {
  285. "type": "string",
  286. "examples": [
  287. "~/.config/crush/skills",
  288. "./skills"
  289. ]
  290. },
  291. "type": "array",
  292. "description": "Paths to directories containing Agent Skills (folders with SKILL.md files)"
  293. },
  294. "tui": {
  295. "$ref": "#/$defs/TUIOptions",
  296. "description": "Terminal user interface options"
  297. },
  298. "debug": {
  299. "type": "boolean",
  300. "description": "Enable debug logging",
  301. "default": false
  302. },
  303. "debug_lsp": {
  304. "type": "boolean",
  305. "description": "Enable debug logging for LSP servers",
  306. "default": false
  307. },
  308. "disable_auto_summarize": {
  309. "type": "boolean",
  310. "description": "Disable automatic conversation summarization",
  311. "default": false
  312. },
  313. "data_directory": {
  314. "type": "string",
  315. "description": "Directory for storing application data (relative to working directory)",
  316. "default": ".crush",
  317. "examples": [
  318. ".crush"
  319. ]
  320. },
  321. "disabled_tools": {
  322. "items": {
  323. "type": "string",
  324. "examples": [
  325. "bash",
  326. "sourcegraph"
  327. ]
  328. },
  329. "type": "array",
  330. "description": "List of built-in tools to disable and hide from the agent"
  331. },
  332. "disable_provider_auto_update": {
  333. "type": "boolean",
  334. "description": "Disable providers auto-update",
  335. "default": false
  336. },
  337. "disable_default_providers": {
  338. "type": "boolean",
  339. "description": "Ignore all default/embedded providers. When enabled",
  340. "default": false
  341. },
  342. "attribution": {
  343. "$ref": "#/$defs/Attribution",
  344. "description": "Attribution settings for generated content"
  345. },
  346. "disable_metrics": {
  347. "type": "boolean",
  348. "description": "Disable sending metrics",
  349. "default": false
  350. },
  351. "initialize_as": {
  352. "type": "string",
  353. "description": "Name of the context file to create/update during project initialization",
  354. "default": "AGENTS.md",
  355. "examples": [
  356. "AGENTS.md",
  357. "CRUSH.md",
  358. "CLAUDE.md",
  359. "docs/LLMs.md"
  360. ]
  361. },
  362. "auto_lsp": {
  363. "type": "boolean",
  364. "description": "Automatically setup LSPs based on root markers",
  365. "default": true
  366. },
  367. "progress": {
  368. "type": "boolean",
  369. "description": "Show indeterminate progress updates during long operations",
  370. "default": true
  371. },
  372. "disable_notifications": {
  373. "type": "boolean",
  374. "description": "Disable desktop notifications",
  375. "default": false
  376. },
  377. "disabled_skills": {
  378. "items": {
  379. "type": "string",
  380. "examples": [
  381. "crush-config"
  382. ]
  383. },
  384. "type": "array",
  385. "description": "List of skill names to disable and hide from the agent"
  386. }
  387. },
  388. "additionalProperties": false,
  389. "type": "object"
  390. },
  391. "Permissions": {
  392. "properties": {
  393. "allowed_tools": {
  394. "items": {
  395. "type": "string",
  396. "examples": [
  397. "bash",
  398. "view"
  399. ]
  400. },
  401. "type": "array",
  402. "description": "List of tools that don't require permission prompts"
  403. }
  404. },
  405. "additionalProperties": false,
  406. "type": "object"
  407. },
  408. "SelectedModel": {
  409. "properties": {
  410. "model": {
  411. "type": "string",
  412. "description": "The model ID as used by the provider API",
  413. "examples": [
  414. "gpt-4o"
  415. ]
  416. },
  417. "provider": {
  418. "type": "string",
  419. "description": "The model provider ID that matches a key in the providers config",
  420. "examples": [
  421. "openai"
  422. ]
  423. },
  424. "reasoning_effort": {
  425. "type": "string",
  426. "enum": [
  427. "low",
  428. "medium",
  429. "high"
  430. ],
  431. "description": "Reasoning effort level for OpenAI models that support it"
  432. },
  433. "think": {
  434. "type": "boolean",
  435. "description": "Enable thinking mode for Anthropic models that support reasoning"
  436. },
  437. "max_tokens": {
  438. "type": "integer",
  439. "maximum": 200000,
  440. "description": "Maximum number of tokens for model responses",
  441. "examples": [
  442. 4096
  443. ]
  444. },
  445. "temperature": {
  446. "type": "number",
  447. "maximum": 1,
  448. "minimum": 0,
  449. "description": "Sampling temperature",
  450. "examples": [
  451. 0.7
  452. ]
  453. },
  454. "top_p": {
  455. "type": "number",
  456. "maximum": 1,
  457. "minimum": 0,
  458. "description": "Top-p (nucleus) sampling parameter",
  459. "examples": [
  460. 0.9
  461. ]
  462. },
  463. "top_k": {
  464. "type": "integer",
  465. "description": "Top-k sampling parameter"
  466. },
  467. "frequency_penalty": {
  468. "type": "number",
  469. "description": "Frequency penalty to reduce repetition"
  470. },
  471. "presence_penalty": {
  472. "type": "number",
  473. "description": "Presence penalty to increase topic diversity"
  474. },
  475. "provider_options": {
  476. "type": "object",
  477. "description": "Additional provider-specific options for the model"
  478. }
  479. },
  480. "additionalProperties": false,
  481. "type": "object",
  482. "required": [
  483. "model",
  484. "provider"
  485. ]
  486. },
  487. "TUIOptions": {
  488. "properties": {
  489. "compact_mode": {
  490. "type": "boolean",
  491. "description": "Enable compact mode for the TUI interface",
  492. "default": false
  493. },
  494. "diff_mode": {
  495. "type": "string",
  496. "enum": [
  497. "unified",
  498. "split"
  499. ],
  500. "description": "Diff mode for the TUI interface"
  501. },
  502. "completions": {
  503. "$ref": "#/$defs/Completions",
  504. "description": "Completions UI options"
  505. },
  506. "transparent": {
  507. "type": "boolean",
  508. "description": "Enable transparent background for the TUI interface",
  509. "default": false
  510. }
  511. },
  512. "additionalProperties": false,
  513. "type": "object",
  514. "required": [
  515. "completions"
  516. ]
  517. },
  518. "ToolGrep": {
  519. "properties": {
  520. "timeout": {
  521. "type": "integer",
  522. "description": "Timeout for the grep tool call"
  523. }
  524. },
  525. "additionalProperties": false,
  526. "type": "object"
  527. },
  528. "ToolLs": {
  529. "properties": {
  530. "max_depth": {
  531. "type": "integer",
  532. "description": "Maximum depth for the ls tool",
  533. "default": 0,
  534. "examples": [
  535. 10
  536. ]
  537. },
  538. "max_items": {
  539. "type": "integer",
  540. "description": "Maximum number of items to return for the ls tool",
  541. "default": 1000,
  542. "examples": [
  543. 100
  544. ]
  545. }
  546. },
  547. "additionalProperties": false,
  548. "type": "object"
  549. },
  550. "Tools": {
  551. "properties": {
  552. "ls": {
  553. "$ref": "#/$defs/ToolLs"
  554. },
  555. "grep": {
  556. "$ref": "#/$defs/ToolGrep"
  557. }
  558. },
  559. "additionalProperties": false,
  560. "type": "object",
  561. "required": [
  562. "ls",
  563. "grep"
  564. ]
  565. }
  566. }
  567. }