Linux command
crush 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Start an interactive session
crush
Change to a specific working directory
crush --cwd [path/to/project]
Skip all permission prompts (use with caution)
crush --yolo
Enable debug logging
crush --debug
Use a custom data directory
crush --data-dir [path/to/data]
View recent logs
crush logs
Follow logs in real time
crush logs --follow
Run non-interactively
crush run "[fix the bug in main.go]"
说明
Crush is a glamorous AI coding agent for your terminal, developed by Charmbracelet. Built in Go for speed and efficiency, it provides a terminal user interface (TUI) for interacting with various AI models to help with coding tasks, debugging, and file operations. Crush supports multiple AI providers including OpenAI, Anthropic, Google Gemini, Groq, OpenRouter, AWS Bedrock, and local models via Ollama and LM Studio. It uses Language Server Protocol (LSP) for enhanced code context and is extensible via Model Context Protocol (MCP) servers with stdio, http, and sse transports. The tool offers excellent cross-platform compatibility, supporting macOS, Linux, Windows (PowerShell and WSL), FreeBSD, OpenBSD, and NetBSD. Configuration is stored in JSON files with settings for providers, LSP, MCP servers, and permissions.
参数
- --cwd _PATH_
- Change to a specific directory before starting
- --data-dir _PATH_
- Override the default data directory location
- --debug
- Enable debug logging for troubleshooting
- --yolo
- Skip all permission prompts (dangerous, use with caution)
- --help
- Display help information
- --version
- Show version number
FAQ
What is the crush command used for?
Crush is a glamorous AI coding agent for your terminal, developed by Charmbracelet. Built in Go for speed and efficiency, it provides a terminal user interface (TUI) for interacting with various AI models to help with coding tasks, debugging, and file operations. Crush supports multiple AI providers including OpenAI, Anthropic, Google Gemini, Groq, OpenRouter, AWS Bedrock, and local models via Ollama and LM Studio. It uses Language Server Protocol (LSP) for enhanced code context and is extensible via Model Context Protocol (MCP) servers with stdio, http, and sse transports. The tool offers excellent cross-platform compatibility, supporting macOS, Linux, Windows (PowerShell and WSL), FreeBSD, OpenBSD, and NetBSD. Configuration is stored in JSON files with settings for providers, LSP, MCP servers, and permissions.
How do I run a basic crush example?
Run `crush` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --cwd _PATH_ do in crush?
Change to a specific directory before starting