What are the CLI and slash commands available in Claude Code?
Question
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.Morbi adipiscing gravdio, sit amet suscipit risus ultrices eu.Fusce viverra neque at purus laoreet consequa.Vivamus vulputate posuere nisl quis consequat.
Answers ( 1 )
Claude Code provides various CLI and slash commands:
- CLI Commands:
- `claude`: Starts an interactive REPL.
- `claude "query"`: Starts REPL with an initial prompt.
- `claude -p "query"`: Executes a one-time query and exits.
- `cat file | claude -p "query"`: Processes piped content.
- `claude config`: Manages configuration settings.
- `claude update`: Updates to the latest version.
- Slash Commands:
- `/bug`: Reports a bug.
- `/clear`: Clears conversation history.
- `/compact`: Compresses the conversation.
- `/config`: Views or modifies configuration.
- `/cost`: Displays token usage.
- `/doctor`: Checks installation health.
- `/help`: Provides usage help.
- `/init`: Initializes a project with a CLAUDE.md guide.
- `/login`: Switches Anthropic accounts.
- `/logout`: Logs out.
- `/pr_comments`: Views pull request comments.
- `/review`: Requests code reviews.
- `/terminal-setup`: Installs Shift+Enter keybindings (iTerm2, VSCode).
- `/vim`: Enters vim mode.