Claude Code 使用教程: Install, Auth, First Repo Task (2026)
Claude Code 使用教程 (tutorial): what you will set up
This claude code 使用教程 / Claude Code tutorial walks a developer from install to a first useful agent session, then points to deeper ROIBest AI guides for proxy, models, and config. Claude Code is Anthropic’s terminal coding agent: it reads your repo, runs tools you allow, and edits files under your approval settings.
You will:
- Install the CLI
- Authenticate
- Open a project and run a first task
- Know where config and model settings live
- Decide when you need a proxy or alternative endpoint
1) Install
Follow Anthropic’s current install path for your OS (native installer or package channel listed in official docs). Confirm with the CLI version command from those docs. Prefer a user-level install you can upgrade without elevated privileges when possible.
2) Sign in
Run the login flow the CLI documents (browser or token). For team gateways and China access paths, see Claude Code China access and Claude Code proxy before you fight TLS errors.
Never paste long-lived keys into chat logs; keep them in the CLI’s credential store or your secret manager.
3) First session in a repo
Change into your project directory and start Claude Code with the entry command from current docs. Begin with a read-only question (“Summarize the module layout”) before allowing writes. Then try a small, reversible change (“Add a failing unit test for X”). Review diffs; do not auto-approve everything on a production branch.
4) Configuration map
Claude Code merges several layers (project, user, enterprise). For the merge order and credential locations, use Claude Code configuration and config file locations. MCP servers belong in .mcp.json / CLI helpers—see MCP config.
5) Pick and pin a model
Default Sonnet-class models are enough for most tutorials. Switch deliberately with the documented /model command, flags, or env—details in configure the model. If you route through another provider, read alternative models so aliases do not surprise billing.
6) Daily habits that keep the tutorial useful
- Keep tasks small; commit between agent steps
- Put architecture constraints in project instructions instead of repeating them every prompt
- Deny network/tool scopes you do not need
- When something fails, capture the exact model id and error—not only a screenshot
Optional wiring to ROIBest AI endpoints: Connect Claude Code in three steps.
Bottom line
A practical Claude Code 使用教程 is: install → auth → small repo tasks → learn config/model levers → add proxy only when required. Master the happy path first; then deep-link into proxy, MCP, and model guides as your environment gets stricter.