Claude Code Configuration
Use ANC Relay with Claude Code. Claude Code is Anthropic's official AI programming assistant CLI tool.
Configuration File Location
~/.claude/settings.json%USERPROFILE%\.claude\settings.jsonConfiguration Generator
Enter your API Key to automatically generate the configuration file content, ready to copy and use.
Usage
# 1. Create configuration directory
mkdir -p ~/.claude
# 2. Create configuration file
vim ~/.claude/settings.json
# 3. Paste the configuration above
# 4. Save the file and restart Claude Code to use# 1. Create configuration directory
mkdir $env:USERPROFILE\.claude
# 2. Create configuration file
notepad $env:USERPROFILE\.claude\settings.json
# 3. Paste the configuration above
# 4. Save the file and restart Claude Code to useField Descriptions
| Field | Description |
|---|---|
| ANTHROPIC_BASE_URL | API endpoint URL |
| ANTHROPIC_AUTH_TOKEN | Your API Key |
| ANTHROPIC_DEFAULT_HAIKU_MODEL | Haiku model name |
| ANTHROPIC_DEFAULT_SONNET_MODEL | Sonnet model name |
| ANTHROPIC_DEFAULT_OPUS_MODEL | Opus model name |
| model | Default model to use |
| includeCoAuthoredBy | Include Co-authored-by tag in commit messages |
Interactive Mode
Claude Code provides rich keyboard shortcuts and interactive features to help you work more efficiently.
Keyboard Shortcuts
General Controls
| Shortcut | Function |
|---|---|
Ctrl+C | Cancel current input or generation |
Ctrl+D | Exit Claude Code (when input is empty) |
Ctrl+L | Clear screen |
Ctrl+J | New line (multi-line input mode) |
Enter | Send message |
Up/Down | Browse command history |
Text Editing
| Shortcut | Function |
|---|---|
Ctrl+A | Move to beginning of line |
Ctrl+E | Move to end of line |
Ctrl+U | Delete to beginning of line |
Ctrl+K | Delete to end of line |
Ctrl+W | Delete previous word |
Alt+B | Move backward one word |
Alt+F | Move forward one word |
Theme and Display
| Shortcut | Function |
|---|---|
Ctrl+T | Toggle theme (light/dark) |
Ctrl+R | Toggle render mode (raw/Markdown) |
Multi-line Input
| Shortcut | Function |
|---|---|
Ctrl+J | Insert newline |
Shift+Enter | Insert newline (supported in some terminals) |
\ + Enter | Continue input on next line |
Quick Commands
| Shortcut | Function |
|---|---|
/ | Open slash command menu |
Esc | Close menu/cancel operation |
Tab | Auto-complete |
Vim Editor Mode
Claude Code supports Vim-style editing mode. To enable:
# Add to settings.json
{
"terminal": {
"editMode": "vim"
}
}After enabling, common Vim operations are supported:
- Normal mode:
h/j/k/lmovement,w/bword movement,0/$line start/end - Insert mode:
i/a/oenter insert mode - Command mode:
:wsave,:qquit
Command History
Claude Code automatically saves your command history:
- Use
Up/Downarrow keys to browse history - History is saved across sessions
- Supports history search (
Ctrl+R)
Background Bash Commands
When Claude Code executes long-running commands, you can:
- Press
Ctrl+Zto put the command in background - Use
/tasksto view background tasks - Use
/resume <task_id>to resume a task
Slash Commands
Slash commands are quick actions in Claude Code. Type / to open the command menu.
Built-in Commands
| Command | Description |
|---|---|
/help | Display help information |
/clear | Clear current conversation history |
/compact | Compress conversation context to reduce token usage |
/config | View or modify configuration |
/cost | Display token usage and cost for current session |
/doctor | Check Claude Code configuration and environment issues |
/init | Initialize project configuration file |
/login | Log in to account |
/logout | Log out |
/model | Switch the model being used |
/permissions | Manage tool permissions |
/pr-comments | View PR comments |
/review | Code review |
/status | Display current status |
/tasks | View background task list |
/resume | Resume background task |
/terminal-setup | Configure terminal integration |
/vim | Toggle Vim editing mode |
Custom Slash Commands
You can create custom slash commands to execute common operations.
How to Create
Create a .claude/commands/ directory in your project root and add Markdown files:
.claude/
└── commands/
├── review.md # /project:review
├── test.md # /project:test
└── deploy.md # /project:deployCommand File Format
---
description: Perform code review
---
Please review the following files:
- Check code style
- Check for potential bugs
- Suggest improvements
$ARGUMENTSdescription: Command description, displayed in the command menu$ARGUMENTS: Placeholder, replaced with user-provided arguments
Usage Example
# Use custom command
/project:review src/main.ts
# Command expands to full promptPlugin Commands
More slash commands can be obtained by installing plugins. Plugin command format: /plugin-name:command.
Common plugin command examples:
/git:commit- Git commit assistant/docs:generate- Documentation generation/test:create- Test case generation
MCP Slash Commands
If you have configured MCP (Model Context Protocol) servers, you can use slash commands provided by MCP.
MCP command format: /mcp-server:command
After configuring MCP servers, related commands will automatically appear in the command menu.
