Claude Code is Anthropic's official AI-powered command-line tool designed to help developers write, edit, debug, and understand code directly from the terminal. To begin, you simply run `claude` from any project directory, which launches an interactive session with the assistant. The tool's most powerful feature is its agentic mode, in which Claude can read files, write code, run tests, and execute shell commands autonomously, allowing it to complete complex multi-step tasks end-to-end without constant human direction. Because the working directory provides automatic context, navigating to your project root before starting Claude ensures it has visibility into all files in that directory.
Inside the session, several slash commands help you manage the conversation and inspect state. Running `/help` displays available commands, keyboard shortcuts, and usage information, while `/clear` resets the conversation context entirely, starting a fresh session. The `/compact` command compresses conversation history to save context space while preserving essential information, and `/cost` shows token usage and the estimated API cost for the current session. For developers who prefer modal editing, `/vim` enables Vim keybindings for the input field. If you need to halt a task in progress, pressing `Escape` or `Ctrl+C` interrupts the current operation and returns you to the prompt.
When you want Claude to execute a shell command, a safe pattern is to ask it to report first and explain any failures before acting: "Run [command] and tell me the output. If there are any errors, explain what went wrong before attempting a fix." This keeps you in the loop while still benefiting from Claude's ability to interpret results.