Skip to main content

Overview

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

Prerequisites

Before configuring, make sure you have:
  • 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 Code CLI

1. One-Command Installation

curl -fsSL https://claude.ai/install.sh | bash
Expected result: You’ll see download and installation info, ending with a success message.If error occurs: permission denied means you need to add sudo before the command.
Note: This installation method doesn’t require pre-installing Node.js or npm. The installation script handles all dependencies automatically.

2. Verify Installation

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

Step 3: Start Using Claude Code CLI

1. Enter a safe working directory

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

2. Interactive mode

claude
Claude Code 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 Code CLI and what is it used for?

Claude Code 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:
  • claude --version: Confirm Claude Code 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 Code CLI automatically read or upload my local files and code?

No. Claude Code 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 Code 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 Code CLI support Chinese input and output?

Yes, fully supported. Claude Code 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 Code 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 Code CLI will not automatically read or upload local images.

Notes

Run Claude Code CLI in a dedicated project folder. Avoid running it in sensitive directories (such as system folders or directories containing credentials). Claude Code 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.