Claude Code Guide: Commands, Sessions and Usage

2026-09-16 · Official docs verified: 2026-09-16

Quick answer

Practical handbook for Anthropic's terminal coding agent: slash command cheatsheet (/clear /compact /resume /cost), subscription vs API metering, and CLAUDE.md project memory - verified against official docs.

What is Claude Code

Claude Code is Anthropic's terminal coding agent: describe a task in natural language and it reads your codebase, plans, edits files and runs tests until done. Requires Node.js 18+; install @anthropic-ai/claude-code globally, then run claude in your project.

10-second cheatsheet

Topics in this guide

CLAUDE.md: project memory

CLAUDE.md stores build commands, conventions and architecture notes; /clear keeps it. Run /init to generate a first draft in your repo.

FAQ

How do I install Claude Code?

Install Node.js 18+, run npm install -g @anthropic-ai/claude-code, then start claude in your project and follow the login flow.

Is there a free tier?

No free tier: usage requires a Claude Pro/Max subscription or an Anthropic API key billed per token; enterprises can use AWS Bedrock or Google Vertex.

Claude Code vs Cursor?

Claude Code is a terminal agent that executes multi-step tasks autonomously; Cursor is an AI-native IDE for interactive editing. Pick by workflow, or run both on the same real task and compare.

Next steps

Estimate API cost See scenario plans