AI / Claude Models Basics Interview Questions
What is Claude Code and how does it differ from using Claude directly via the API?
Claude Code is Anthropic's agentic coding tool — a command-line interface (CLI) and SDK that allows Claude to work autonomously on coding tasks in your terminal, with direct access to your file system, git, and development tools.
| Feature | Claude Code | Claude API (direct) |
|---|---|---|
| Interface | CLI tool in your terminal | HTTP REST API / SDK |
| Setup | npm install -g @anthropic-ai/claude-code | pip install anthropic or npm install @anthropic-ai/sdk |
| File access | Yes — reads/writes files in your project | No — you pass content in the prompt |
| Tool execution | Yes — can run commands, tests, git operations | Only if you build tool use yourself |
| Use case | Coding assistance, refactoring, debugging, code generation | Custom apps, chatbots, data processing |
| IDE integration | VS Code, JetBrains plugins available | N/A |
# Installing Claude Code npm install -g @anthropic-ai/claude-code # Using Claude Code in your terminal cd my-project claude-code "Add error handling to all async functions in src/" # Claude Code can: # - Read and write files in your project # - Run tests and build commands # - Make git commits # - Navigate and understand large codebases # - Work through multi-step tasks autonomously
Claude Code is built on the same underlying Claude models (using Opus-tier models for best results) but provides a ready-made agentic environment with tools already wired up. The API requires you to build the tool use and agentic loop yourself.
More Related questions...