Skip to main content

Overview

Claude CLI Interface Claude CLI is the official command-line tool from Anthropic for interacting with Claude models in the terminal. By integrating Claude CLI with EvoLink API, you can directly access Claude model capabilities through EvoLink.

Prerequisites

Before configuring, make sure you have:

1. Install Node.js and npm

Why needed? Node.js is the runtime environment for CLI tools (like an OS for apps). If already installed: Run node -v and npm -v to check version. If v20+, skip this step. First-time installation:
node -v
npm -v
Node.js and npm version verification
  • Log in to EvoLink Dashboard
  • Find API Keys in the dashboard, click “Create New Key” button, then copy the generated Key
  • API Key usually starts with sk-

How to Open Terminal

  • Method 1: Press Win + R, type cmd or powershell, then press Enter
  • Method 2: Search for “Command Prompt” or “PowerShell” in the Start menu
  • Method 3: Hold Shift and right-click in a folder, select “Open PowerShell window here”

Step 1: Install Claude CLI

1. Global Installation

npm install -g @anthropic-ai/claude-code
Expected result: Download info scrolling, ending with added XX packages (takes 1-3 minutes). If error occurs: permission denied means Windows needs “Run as administrator” PowerShell, macOS/Linux add sudo before command.

2. Verify Installation

claude --version
Success indicator: Shows version number (e.g., 1.x.x). Claude CLI Version Claude CLI is configured via settings.json.

1. Open config directory

Press Win + R, paste the following, then press Enter:
%userprofile%\.claude
If folder doesn’t exist: Manually create .claude folder (press Win + R, type %userprofile%, press Enter to open user directory, then create a new folder named .claude).Windows Win+R open terminal

2. Edit settings.json

In the opened folder, if settings.json doesn’t exist, right-click in empty space → New → Text Document → Rename to settings.json (remove .txt extension). Then double-click to open with an editor and add the following content:
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your-evolink-api-key",
    "ANTHROPIC_BASE_URL": "https://code.evolink.ai",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  },
  "permissions": {
    "allow": [],
    "deny": []
  }
}
⚠️ Important:
  • Copy completely without missing any symbols
  • Replace "your-evolink-api-key" with actual API Key (keep quotes)
  • Don’t use Chinese input method for punctuation
Configuration options:
  • ANTHROPIC_AUTH_TOKEN: Your EvoLink API Key
  • ANTHROPIC_BASE_URL: EvoLink API endpoint
  • CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: Reduce non-essential network requests Claude CLI configuration environment

Step 3: Start Using Claude CLI

1. Enter a safe working directory

cd <your-working-directory>
Note: Replace <your-working-directory> with actual path

2. Interactive mode

claude
Claude CLI interface

3. Verify configuration

claude "Who are you"
Success indicators:
  • See AI response text (several lines)
  • No errors like 401, 403, API Key invalid
If you see errors:
  • 401 Unauthorized: API Key not set or invalid → Check settings.json
  • 403 Forbidden: Insufficient API Key permissions → Verify API Key
  • Network error: Network issue → Check connection

FAQ

1. What is Claude CLI and what is it used for?

Claude CLI is the official command-line tool from Anthropic that allows users to interact with Claude models in the terminal. It’s primarily used for code assistance, text generation, Q&A conversations, and file analysis—especially suited for developers who need quick AI capabilities in a command-line environment.

2. How do I verify installation and configuration on first use?

Run these commands in sequence:
  • node -v and npm -v: Confirm Node.js and npm are installed
  • claude --version: Confirm Claude CLI is installed
  • claude "Who are you": Confirm API configuration is correct

3. What’s the difference between interactive mode and single command mode?

  • Interactive mode: Run claude to enter continuous conversation for multi-turn interactions, ideal for complex tasks
  • Single command mode: Run claude "question" to get a single response and exit, ideal for quick queries

4. Will Claude CLI automatically read or upload my local files and code?

No. Claude CLI only reads file content when you explicitly reference or authorize it, and will request confirmation before performing sensitive operations. It’s recommended to use it in a dedicated project folder.

5. How do I use Claude CLI to analyze or process local file content?

In interactive mode, you can reference files by:
  • Typing the file path for Claude to read
  • Dragging files into the terminal window
  • Copy and pasting file content

6. Does Claude CLI support Chinese input and output?

Yes, fully supported. Claude CLI supports Chinese input and output—you can ask questions in Chinese and receive Chinese responses.

7. No output after execution—what could be the cause?

Common causes include:
  • Network connection issues preventing API server access
  • Invalid API Key or insufficient balance
  • Incorrect ANTHROPIC_BASE_URL configuration
  • Firewall or proxy blocking requests

8. Why don’t my config file or environment variable changes take effect?

  • Restart your terminal or command line window
  • Check that settings.json has valid JSON syntax
  • Verify the config file path:
    • Windows: C:\Users\{username}\.claude\settings.json
    • macOS / Linux: ~/.claude/settings.json

9. What causes 401/403 errors?

  • 401 error: ANTHROPIC_AUTH_TOKEN not set or invalid API Key
  • 403 error: Insufficient API Key permissions or expired key
  • Verify ANTHROPIC_BASE_URL is set to https://code.evolink.ai

10. What scenarios is Claude CLI suited for? What is it not suited for?

Suited for:
  • Code writing, debugging, and refactoring
  • Quick Q&A in command-line environments
  • File content analysis and processing
  • Automation script integration
Not suited for:
  • Complex interactions requiring a graphical interface
  • Real-time collaborative editing
  • Large-scale batch file processing

11. How do I switch models?

Type /model in interactive mode to switch models. EvoLink supports the following Claude models:
Model NameDescription
claude-haiku-4-5-20251001Fast response
claude-sonnet-4-5-20250929Balanced
claude-sonnet-4-20250514Standard
claude-opus-4-1-20250805Advanced
claude-opus-4-5-20251101Latest

13. How do I upload images?

  • Option 1: Reference the image path
  • Option 2: Drag and drop an image into the terminal
  • Option 3: Paste an image directly
All methods require user action—Claude CLI will not automatically read or upload local images.

Notes

Run Claude CLI in a dedicated project folder. Avoid running it in sensitive directories (such as system folders or directories containing credentials). Claude CLI operates starting from the current working directory.
If you previously logged in with an official account, clear the ANTHROPIC_AUTH_TOKEN environment variable or override it in settings.json.