Basic Usage in AI
From the Claude Code cheat sheet ยท Installation & Setup ยท verified Jul 2026
Basic Usage
Starting and using Claude Code
bash
# Start interactive session
claude
# Run one-time task
claude "refactor this function to use async/await"
# Continue most recent conversation
claude -c
claude --continue
# Resume and pick previous conversation
claude -r
claude --resume
# Non-interactive mode
claude --print "explain this codebase"
# Start in Plan Mode
claude --permission-mode plan
# Create a Git commit (ask in a session, or use the /commit slash command)
claude "commit my staged changes with a conventional message"bash
// EXAMPLE: Refactoring a callback to async/await
$ claude "refactor this callback to use async/await"
// EXAMPLE: Continuing previous work
$ claude -c
> "Let's add error handling to that function"
// EXAMPLE: Creating a commit
$ claude commit
> Claude analyzes changes and creates commit message๐ Interactive mode is the default
๐ Use quotes for one-time tasks
๐ Can resume previous conversations
basics