Skip to main content

CHEAT SHEET

Usage, detailed features, commands and keybindings of crush

CLI OVERVIEW

Crush comes with useful CLI that have good flags that will help you while you use it.

USAGE

crush [command] [--flags]

EXAMPLES

# Run in interactive mode
crush

# Run with debug logging
crush -d

# Run with debug logging in a specific directory
crush -d -c /path/to/project

# Print version
crush -v

# Run a single non-interactive prompt
crush run "Explain the use of context in Go"

# Run in dangerous mode (auto-accept all permissions)
crush -y

COMMANDS

CommandDescription
completion [command]Generate the autocompletion script for the specified shell
help [command]Help about any command
logs [--flags]View crush logs
run [prompt...]Run a single non-interactive prompt

GLOBAL FLAGS

FlagAliasDescription
--cwd-cCurrent working directory
--debug-dEnable debug mode
--help-hShow help
--version-vPrint version for Crush
--yolo-yAutomatically accept all permissions (dangerous mode)

SUB COMMANDS

COMPLETION SUB-COMMAND

You can add crush cli commands auto completion for your shell. We support: bash, fish, powershell, zsh.

crush completion bash
crush completion fish
crush completion powershell
crush completion zsh

USAGE

crush completion [command] --flags

FLAGS:

FlagAliasDescription
--cwd-cCurrent working directory
--debug-dEnable debug mode
--help-hShow help for completion command

RUN SUB-COMMAND

If you don't want to run the whole TUI and just need a quick single prompt, the run command is for you.

RUN A SIMPLE PROMPT:

crush run Explain the use of context in Go

PIPE INPUT FROM STDIN:

echo "What is this code doing?" | crush run

RUN WITH QUIET MODE (NO SPINNER)

crush run -q "Generate a README for this project"

USAGE

crush run [prompt ...] [--flags]

FLAGS

FlagAliasDescription
--cwd-cCurrent working directory
--debug-dEnable debug mode
--help-hShow help for run command
--quiet-qHide spinner

LOGS SUB-COMMAND

You can view the logs generated by Crush. This command allows you to monitor and debug by inspecting the log output.

USAGE

crush logs [--flags]

FLAGS

FlagAliasDescription
--cwd-cCurrent working directory
--debug-dEnable debug mode
--follow-fFollow log output
--help-hShow help for logs command
--tail-tShow only the last N lines (default: 1000)

TUI OVERVIEW

The Crush TUI provides a set of keyboard shortcuts and commands that make it faster and easier to interact with the assistant directly from your terminal.


KEYBINDINGS

Keybindings are the main shortcuts you can use inside the TUI to quickly perform actions without leaving the keyboard.

GENERAL

KeybindingAction
TabFocus the chat panel
Shift+EnterInsert a newline without sending the message
KeybindingAction
Ctrl+GToggle between less (when opened) and more (when closed)
Ctrl+POpen the commands palette
Ctrl+FAdd an image to the chat

SESSIONS

KeybindingAction
Ctrl+SManage sessions / add a file
Ctrl+NCreate a new session
Ctrl+OOpen the editor

COMMANDS

The commands palette (opened with Ctrl+P) allows you to access higher-level actions inside the TUI.

CommandKeybindingDescription
New SessionCtrl+NCreate a new session
Switch SessionCtrl+SSwitch between sessions
Switch ModelChange the active AI model
Summarize SessionGenerate a summary of the session
Toggle SidebarShow or hide the sidebar
Open File PickerCtrl+FOpen the file picker
Toggle Yolo ModeCtrl+GEnable/disable dangerous mode
Toggle HelpShow or hide help inside the TUI
Initialize ProjectInitialize project in current folder
QuitCtrl+CExit Crush

Source: https://charm-docs.vercel.app/docs/crush/cheatSheet