Skip to content

Code tools

TIP

The API provided by JuheNext can perfectly support code tools such as claudecode, codex, geminicli, etc. Configuration examples are as follows.

ClaudeCode

Introduction: ClaudeCode is an official coding assistant produced by Anthropic.

Configuration:

  • Linux/Mac
bash
# Install via domestic mirror (latest version)

npm install -g @anthropic-ai/claude-code

# Check installation

claude --version

# Set API proxy access

export ANTHROPIC_BASE_URL="https://api.juheai.top"
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
claude
  • cmd
bat
REM Install via domestic mirror (latest version)

npm install -g @anthropic-ai/claude-code

REM Check installation

claude --version

REM Set API proxy access

set ANTHROPIC_BASE_URL=https://api.juheai.top
set ANTHROPIC_AUTH_TOKEN=sk-xxx
claude

To use a custom model, such as claudecode/claude-sonnet-4-20250514, run the following command when starting claudecode:

bash
claude --model claudecode/claude-sonnet-4-20250514

Codex

Introduction: Codex is an AI coding assistant tool developed by the OpenAI team.


Project URL: https://github.com/openai/codex

Configuration:

Note: On Windows it is recommended to use WSL; on Linux install normally.

System requirements:

  • Linux distribution (Ubuntu 20.04+ , Debian 10+)
  • Node.js 22+
  • npm 10+
  • Network connection

Install Node.js

Ubuntu/Debian

bash
# Update package list
sudo apt update 
# Install Node.js
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

CentOS/RHEL/Fedora

bash
# Use dnf (Fedora) or yum (CentOS/RHEL)
sudo dnf install nodejs npm
# or
sudo yum install nodejs npm

Arch Linux

bash
sudo pacman -S nodejs npm

Install Codex

bash
sudo npm install -g @openai/codex

Verify installation

bash
codex --version

If codex-cli appears followed by a version number, installation is complete.

Use in VS Code

In VS Code, start a terminal using WSL and run the following commands to create files:

bash
mkdir ~/.codex
vi ~/.codex/auth.json
vi ~/.codex/config.toml

You can find this .codex folder under the Linux filesystem on drive C. Open auth.json and enter:

json
{"OPENAI_API_KEY": "sk-xxx (this is the key you purchased from UnifyLLM)"}

Then save and exit.

Next open config.toml and enter:

toml
model_provider = "juheai"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.juheai]
name = "juheai"
base_url = "https://api.juheai.top/v1"
wire_api = "responses"

Note: there are four levels available for model_reasoning_effort: high, medium, low, minimal.

Start Codex

Open your project, start a new WSL terminal, and run:

bash
codex

Common commands

CommandDescription
/modeSwitch approval mode (Suggest / Auto Edit / Full Auto)
/modelSwitch AI model and reasoning level
/approvalsSwitch approval mode (Read Only / Auto / Full Access)
/initCreate AGENTS.md file to provide project instructions
/statusShow current session configuration and token usage
/diffShow Git diff (including untracked files)
/clearClear session history
/promptsShow example prompts
/helpShow help information

For more detailed tutorials, see the official docs:

https://developers.openai.com/codex

Gemini CLI

Introduction: Gemini CLI is a terminal coding assistant developed by Google.


Project URL: https://github.com/google-gemini/gemini-cli

Configuration:

Install Gemini CLI from the terminal (example for WSL/Linux):

bash
sudo npm install -g @google/gemini-cli

After installation, find the .bashrc environment variable file (under your user directory) and add:

bash
GOOGLE_GEMINI_BASE_URL="https://api.juheai.top"
GEMINI_API_KEY="sk-xxx"

Then start Gemini to use it:

bash
gemini

For more usage instructions, refer to the official docs: https://geminicli.com/docs/get-started/