Claude Code
Claude Code is Anthropic's command-line coding tool. This page covers its settings file, MCP servers, common commands and shell functions.
Configuration#
Claude Code is configured through a settings file, MCP servers and optional shell functions.
Settings#
Settings file location:
- macOS / Linux:
~/.claude/settings.json - Windows:
$HOME\.claude\settings.json
Put the following in the settings file:
MCP servers#
Add the following to ~/.claude.json:
Shell function#
Wrap claude in a shell function of the same name so every launch gets the base arguments. Add the function to ~/.zshrc or your PowerShell $PROFILE. Pick one of the two variants below.
Always start a new conversation#
Start a fresh conversation every time, with only the base arguments.
Zsh:
PowerShell:
Resume the last conversation automatically#
Try to continue the last conversation first. If that fails, start a new one.
Zsh:
PowerShell:
Usage#
Common commands: