← Best Practices

pandacode: Run Claude Code Experience on Any Model

Claude Code offers a great interactive experience—conversations, tool calls, file reading and writing, remote control, all in one package. But it's tied to Anthropic's models: subscriptions have quotas, API usage-based pricing isn't cheap, and some teams can only use internal model gateways with no way to reach Anthropic at all.

pandacode is built for this scenario: a lightweight coding agent engine written from scratch in Rust, with behavior identical to Claude Code on the surface (same streaming output, same tool loop, same session protocol), but the model backend is up to you.

What Models Can It Connect to

pandacode supports two API formats simultaneously, so virtually any model service can be used:

Format Typical Backends
Anthropic Messages DeepSeek's official Anthropic-compatible endpoint, GLM, any /v1/messages compatible service
OpenAI Completions OpenAI, DeepSeek /v1, Qwen, vLLM, Ollama, various internal corporate LLM proxies

It also supports custom HTTP header authentication—many corporate internal proxies don't use standard Bearer tokens but require custom headers like access_token or source IP. pandacode natively supports this; just configure it.

Feature Overview

  • 6 built-in tools: Read / Write / Edit / Bash / Glob / Grep—read code, modify files, run commands, search projects; all the core actions of a coding agent are here;
  • Complete tool loop: Models can call tools continuously, get results, and continue reasoning until the task is done;
  • Streaming output: Renders replies word by word, matching the feel of Claude Code;
  • Integration with PandaNpc ecosystem: Works alongside genuine Claude Code as an independent "engine"—in the PandaNpc App (desktop / web / iPhone), select the pandacode engine for a connection to control it remotely, with a 🐼 pandacode badge in the session header;
  • Very small footprint: Single binary of about 2MB, distributed together with pandapaw.

Installation

pandacode is included in pandapaw (PandaNpc's unified command-line tool). Install with one command:

bash
# macOS / Linux
curl -fsSL https://cos.pandanpc.com/pandapaw/install.sh | sh

# Windows (PowerShell)
iwr -useb https://cos.pandanpc.com/pandapaw/install.ps1 | iex

The installation script installs both pandapaw and pandacode. For existing pandapaw users, running pandapaw update will automatically add pandacode.

Configure the Model Backend

Method 1: DeepSeek (Simplest)

DeepSeek provides an Anthropic-compatible endpoint. Set the key with one command:

bash
pandapaw pandacode set-key sk-YourDeepSeekKey
pandapaw install   # Register pandacode as a persistent service

By default, it points to https://api.deepseek.com/anthropic + deepseek-chat. Ready to use after installation.

Method 2: OpenAI Format Endpoints (Qwen / vLLM / Ollama / Internal Proxy)

Edit ~/.pandapaw/config.toml and add a [pandacode] section:

toml
[pandacode]
format   = "openai"                      # OpenAI Completions format
base_url = "http://your-llm-gateway/v1"  # endpoint = base_url + /chat/completions
token    = "sk-your-key"                 # standard Bearer; for no Bearer auth, use sk-not-required
model    = "qwen3.5-plus"

# Using custom header auth for internal proxy? Add this (set token to sk-not-required to omit Bearer):
[pandacode.headers]
access_token = "your-internal-token"

After modification, run pandapaw install (or restart the pandacode service) to apply. For local Ollama, use the same format: base_url = "http://127.0.0.1:11434/v1", model = "qwen2.5-coder", and any token.

The model key is stored only in the config file on your machine, never uploaded to any server or stored in any database.

Using It in the App

After installation, this machine will register itself on the PandaNpc relay network as your-machine-name-pc. Open the PandaNpc App (pandanpc.com web version or desktop/iPhone client):

  1. Create (or edit) a Claude Code connection, select the pandacode engine;
  2. Start a session, send messages normally—write code, fix bugs, run commands; the experience is the same as Claude Code;
  3. The 🐼 badge in the session header shows that this session runs on your own model.

Because it uses the same session protocol, all PandaNpc capabilities—remote control from a phone, reconnection after disconnection, history playback—are fully available.

When to Choose pandacode vs. Genuine Claude Code

Scenario Recommendation
Have Claude subscription/quota, want best coding ability Genuine Claude Code
Want to save money: daily small tasks with cheap models pandacode + DeepSeek
Corporate intranet, only internal model gateway available pandacode + OpenAI format + custom headers
Want fully offline / data stays within the intranet pandacode + vLLM / Ollama

Both engines coexist in the App: the same machine can have one Claude Code connection and one pandacode connection simultaneously, and you can pick whichever fits the task.

Summary

pandacode decouples the "Claude Code experience" from "Anthropic's model": the experience is preserved, the model is free. With one installation command and a few lines of configuration, your DeepSeek / Qwen / internal model becomes a remotely controllable coding agent.

If you have any questions after installation, feel free to provide feedback at pandanpc.com.

First published on pandanpc.com