Slash commands
Slash commands are entered within the Claude Code interactive session. They start with / and execute instantly.
CLI flags
Flags are passed when running claude from the terminal, before or after the prompt.
claude [flags] [prompt] claude --model opus "refactor this file" claude -p "what does this function do?" < mi_archivo.py
Available models
You can change the model with --model, /model, or in the configuration. The default value depends on your account type and provider, so the most reliable approach is to use aliases:
Keyboard shortcuts in interactive session
Example commands
Headless session in CI/CD
# Generate a PR summary in JSON claude -p --output-format json "summarize the changes in the last commit" # Review security of a file claude -p "review possible vulnerabilities in src/api/auth.ts" < /dev/null
Change model for a session
claude --model opus # You now use the Opus alias for the entire session
View installation diagnostics
# Inside Claude Code: /doctor # From the terminal: claude doctor