Installation does not mean readiness
After installation, check the entire chain: the shell can find the CLI, Claude starts in the correct directory, authorization works, and commands run in the same environment where the project lives.
The most common causes of problems are PATH, different shells, WSL versus Windows-native, an IDE terminal with different settings, or launching outside the repository root.
The installation channel depends on the environment
Choose one official method and update Claude through the same channel afterward. The commands below are guidance; check the current syntax against the official documentation and `claude --help`.
brew install --cask claude-code
# or
npm install -g @anthropic-ai/claude-code
# or the official installer
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iex
# or
npm install -g @anthropic-ai/claude-codecurl -fsSL https://claude.ai/install.sh | bashFirst launch and diagnostics
- Open a new terminal in the project environment.
- Go to the repository root.
- Check the CLI version.
- Launch an interactive Claude Code session.
- Run
/doctor, then/status. - Save a short log of the initial state.
cd ~/projects/commerce-os
claude --version
claude/doctor
/statusAuthorization and Gateway
The sign-in flow may depend on the type of account access. After authorization, check `/status` to understand which account and environment the session is using.
For a learning Gateway, configuration may be stored in the global `~/.claude/settings.json`, while local parameters are stored in `.claude/settings.local.json`. Project values may have higher priority.
{
"env": {
"ANTHROPIC_BASE_URL": "https://llm.javarush.com",
"ANTHROPIC_AUTH_TOKEN": "YOUR_COURSE_TOKEN",
"ANTHROPIC_MODEL": "claude-course-fast[1m]",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
}
}Updates and common failures
- After an update, check
claude --version, open a new session, and repeat/doctor. - If the command is not found, restart the terminal and check PATH and the installation channel.
- If the CLI works in only one terminal, compare the shell and PATH in the regular terminal and the IDE terminal.
- If Claude cannot see the project, check the current directory, Git root, and launch environment.
- If SSH or a container does not work, check the installation on the server or inside the container itself.
Date:
Project:
Directory:
OS:
Shell:
Claude CLI version:
Authorization:
/doctor result:
/status result:
Notes:Canonical lesson source · JavaRush
Open JavaRush material