crush-config
Use when the user needs help configuring Crush — writing crushrc (the Bash config format) or crush.json, setting up providers, models, LSPs, MCP servers, hooks, skills, permissions, or changing Crush behavior.
Оригинален текст · няма потвърден превод на българскиПърво прочетете инструкцията.
Файлът се зарежда от посочения източник само по ваше действие. Можете да го прочетете тук, да го копирате или да го запазите като .md.
GitHub хранилище- Звезди на репото
- 28 269
- Лиценз
- NOASSERTION
- Последна проверка на записа
- 20.09.2026 г.
Добавете в своя инструмент.
Командата отваря избора на skills от репозитория. Прочетете файла и условията на автора преди изпълнение.
npx skills add charmbracelet/crushСтраницата копира текст. Не инсталира и не изпълнява нищо на устройството ви.
Откъс от SKILL.md
Началото на файла на автора, без превод.
Crush Configuration
Crush supports two config formats:
crushrc— a Bash script that builds config by calling Crush builtins. Preferred. Because it is real Bash you get includes, secrets, conditionals, and variables for free.crush.json— static JSON. Fully supported; see Legacy JSON format.
Both are discovered together and deep-merged. Priority (highest to lowest):
.crushrc/crushrc/.crush.json/crush.json(project-local, closer-to-cwd wins; Windows uses.\.crushrc/.\crushrc)$XDG_CONFIG_HOME/crush/crushrcor~/.config/crush/crushrc(%XDG_CONFIG_HOME%\crush\crushrcor%USERPROFILE%\.config\crush\crushrcon Windows)
Data directories (~/.local/share/crush and %LOCALAPPDATA%\crush) contain
machine-owned JSON state only; Crush does not discover or execute a crushrc
from those locations.
If a directory has both crushrc and crush.json, they merge (crushrc wins
on conflicts) and Crush logs a warning.
crushrc at a glance
A crushrc is a plain Bash script executed at load time with the same embedded
shell the bash tool uses. It builds config by calling builtins (provider,
model, mcp, lsp, hook, permissions, option). Statements run top to
bottom; later statements win, and remove/reset operate on anything defined
earlier or pulled in via source.
#!/usr/bin/env bash
# Includes and secrets are just Bash.
source ~/.config/crush/shared.sh
provider add anthropic --api-key "$ANTHROPIC_API_KEY"
model large anthropic/claude-sonnet-4-20250514 --max-tokens 16384
model small anthropic/claude-haiku-4-20250514
option skill-path ./skills
permissions allow view ls grep edit
Values are ordinary Bash — quote and expand normally ("$VAR", $(cmd),
${VAR:?required}). A failing $(command) aborts the load.
CRUSH_VERSION is exported into the script so you can feature-detect the
running Crush (it is the literal devel for local builds):
[[ "$CRUSH_VERSION" != devel ]] && lsp add gopls --command gopls
Commands
All entity commands are verb-first. remove accepts rm as an alias. Booleans
accept true/false/1/0/yes/no, case-insensitive.
providers
provider add <id> [flags] # define/update; repeated calls merge
provider remove <id> # alias: rm — removes the provider and its models