cd /news/ai-tools/nexus-cli-pure-go-bridge-to-deepseek… · home › topics › ai-tools › article
[ARTICLE · art-154274] src=github.com ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

Nexus-CLI – Pure Go Bridge to DeepSeek R1/V3 with Claude Code and Ollama Support

A developer released Nexus-CLI, a pure Go command-line tool and local API proxy that connects applications and coding agents to DeepSeek V3 (deepseek-chat) and R1 (deepseek-reasoner) models through a free chat.deepseek.com web account rather than a paid DeepSeek API key. Nexus-CLI solves DeepSeek's DeepSeekHashV1 proof-of-work challenges in parallel across CPU cores, clearing difficulty 144,000 challenges in roughly 40–50 milliseconds with zero runtime dependencies, and its `nexus serve` proxy exposes OpenAI, Anthropic Messages (compatible with Claude Code and the Anthropic SDK) and native Ollama endpoints. The tool also adds a multi-account pool with round-robin rotation to work around HTTP 429 rate limits, structured JSON Schema outputs, and a one-command launcher for Claude Code, Codex, OpenCode, Goose and Aider, and requires Go 1.20 or later to build.

read6 min views2 publishedOct 21, 2026
Nexus-CLI – Pure Go Bridge to DeepSeek R1/V3 with Claude Code and Ollama Support
Image: Michielbdejong (auto-discovered)

A high-performance Golang CLI utility and local API proxy server that enables any application or coding agent to connect to DeepSeek V3 (deepseek-chat) and R1 ( deepseek-reasoner / Thinking) models via a free web account (chat.deepseek.com), without requiring an official paid DeepSeek API key.

Rewritten from scratch in pure Go (Golang) based on in-depth analysis of Node.js (FreeDeepseekAPI-EN) and Python ( deepseek_bridge) projects, featuring zero runtime dependencies.

  1. Pure Go Parallel PoW (Proof-of-Work) Solver: - Solves DeepSeek server challenges using the DeepSeekHashV1 algorithm (Keccak-f[1600] 1..23 rounds SHA3-256) parallelized across CPU cores.
  • Solves difficulty 144,000 challenges in just ~40–50 milliseconds (no CGO, WASM, or Python dependencies required).
  1. Solves DeepSeek server challenges using the
  2. Interactive Terminal Chat (REPL): - Streams the R1 model's thought process (reasoning_content ) in real-time with dedicated styling (italic/cyan).
  • Polished ANSI UI with colorful prompts and animated spinners.
  • Built-in slash commands: /help ,/new ,/model ,/thinking ,/search ,/whoami ,/clear ,/exit .
  1. Streams the R1 model's thought process (
  2. One-Off & Unix Pipe Support: - Direct CLI queries: nexus "What is quantum computing?"
  • Linux/macOS pipe workflows: cat main.go | nexus "Review this code for security and performance"
  1. Direct CLI queries:
  2. OpenAI, Anthropic & Ollama Compatible Proxy Server (nexus serve): - POST /v1/chat/completions (OpenAI format, SSE streaming, and JSON)
  • POST /v1/messages (Anthropic Messages API — 100% compatible withClaude Code and the Anthropic SDK!)
  • POST /v1/responses (OpenAI Responses API)
  • GET /v1/models andGET /v1/model-capabilities
  • GET /v1/sessions andPOST /v1/sessions/reset
  • Connects seamlessly with Open WebUI, Continue.dev, Cursor, Cline, and any other OpenAI/Anthropic client.
  1. Native Ollama API Emulation 🦙: - Emulates GET /api/tags ,POST /api/chat ,POST /api/generate ,GET /api/version .
  • Direct plug-and-play compatibility with Open WebUI, Dify, AnythingLLM, Cursor, LlamaIndex, and official Ollama SDKs.
  1. Emulates
  2. Structured Outputs & JSON Schema 🎯: - Enforce strict JSON output or validate against JSON Schemas across CLI, Ollama, and OpenAI endpoints.
  3. Universal Integrations (Launcher) 🚀: - One-command launcher for Claude Code, DeepSeek Harness, Codex, OpenCode, Goose, and Aider (Nexus automatically boots the proxy in the background).
  4. Multi-Account Pool 👥: - Rotate multiple DeepSeek accounts using Round-Robin scheduling to eliminate rate-limit roadblocks (HTTP 429).
  5. Authentication Management (nexus auth): - Manual login: nexus auth login (extractuserToken from browser LocalStorage)
  • Automatic via Chrome: nexus auth chrome (reads session token from browser memory via CDP)
  • Account inspection: nexus auth whoami
  1. Manual login:
  2. System Diagnostics (Doctor): - nexus doctor — instantly checks token validity, server connectivity, PoW solver performance, and session creation.

Requires Go 1.20+:

git clone https://github.com/xamrayev/nexus-cli.git
cd nexus-cli

go build -o bin/nexus .

go install .

There are 3 ways to connect your DeepSeek account:

./bin/nexus auth login

You will be prompted for your userToken:

  1. Open https://chat.deepseek.com in your browser.
  2. Press F12 (orCmd+Option+I on macOS).
  3. Navigate to Application ->Local Storage ->https://chat.deepseek.com -> copy theuserToken value and paste it into the prompt.
./bin/nexus auth chrome

This automatically launches a Chrome window. Once you log in, Nexus securely captures and stores the session token.

Create a .env file in the project root:

DEEPSEEK_TOKEN=your_deepseek_token_here
./bin/nexus chat

Or simply:

./bin/nexus

Real-time R1 reasoning stream:

nexus ❯ Why is the sky blue?

💭 Thinking Process:
The user is asking about the physical cause behind the color of the sky...
Need to explain the mechanism of Rayleigh scattering of sunlight by atmospheric molecules...

🤖 DeepSeek (deepseek-reasoner):
The primary reason the sky appears blue is due to a phenomenon called Rayleigh scattering...
./bin/nexus "Provide 3 key facts about general relativity"
cat main.go | ./bin/nexus "Analyze this code for security vulnerabilities and performance bottlenecks"
./bin/nexus serve --port 9655

You can now route any tool (Cursor, Open WebUI, Claude Code) to http://localhost:9655/v1!

Sample cURL request in OpenAI format:

curl http://localhost:9655/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-reasoner",
    "messages": [{"role": "user", "content": "Hello!"}],
    "stream": true
  }'

Nexus implements the Ollama API specification. Open WebUI, Dify, AnythingLLM, Cursor, LlamaIndex, and official Ollama libraries can connect directly to http://localhost:9655:

curl http://localhost:9655/api/tags

curl http://localhost:9655/api/chat -d '{
  "model": "deepseek-reasoner",
  "messages": [{"role": "user", "content": "Hello!"}],
  "stream": true
}'

Using the official Python Ollama SDK:

import ollama

client = ollama.Client(host="http://localhost:9655")
resp = client.chat(model="deepseek-reasoner", messages=[
    {"role": "user", "content": "Write a simple HTTP server in Go"}
])
print(resp["message"]["content"])

Enforce strict JSON output or conform to a specified schema:

./bin/nexus "Top 3 programming languages and their primary domains" --format json | jq .

curl http://localhost:9655/api/chat -d '{
  "model": "deepseek-reasoner",
  "messages": [{"role": "user", "content": "List 3 fruits in JSON"}],
  "format": "json",
  "stream": false
}'

curl http://localhost:9655/v1/chat/completions -d '{
  "model": "deepseek-reasoner",
  "messages": [{"role": "user", "content": "Return device specs as JSON"}],
  "response_format": {"type": "json_object"}
}'

Launch coding tools and agents with a single command — Nexus automatically boots the proxy server in the background:

./bin/nexus launch claude
./bin/nexus launch claude -p "Refactor this Go code"

./bin/nexus launch dsh

./bin/nexus launch codex

./bin/nexus launch opencode

./bin/nexus launch goose

./bin/nexus launch aider

./bin/nexus launch chatgpt

./bin/nexus launch pool

./bin/nexus launch harness

Avoid rate limits (HTTP 429) by cycling through multiple DeepSeek accounts using Round-Robin rotation:

./bin/nexus auth add acc2 --chrome

./bin/nexus auth list

./bin/nexus auth switch acc2

./bin/nexus auth test
./bin/nexus doctor
nexus-cli/
├── bin/
│   └── nexus                     # Compiled binary executable
├── cmd/
│   └── nexus/main.go             # CLI command dispatcher
├── pkg/
│   ├── deepseek/
│   │   ├── pow.go                # Pure Go parallel DeepSeekHashV1 Keccak PoW solver
│   │   ├── pow_test.go           # PoW test suite & benchmarks
│   │   ├── stream.go             # SSE JSON patch & OpenAI stream parser
│   │   ├── stream_test.go        # Stream tests
│   │   ├── auth.go               # Token, session, and profile manager
│   │   ├── chrome_auth.go        # Automated Chrome CDP authentication
│   │   ├── client.go             # DeepSeek Web API client (Chat, Sessions, Auto-retry)
│   │   └── types.go              # Model configs and type definitions
│   ├── server/
│   │   ├── server.go             # Local HTTP proxy server (Routing, CORS, Auth)
│   │   ├── server_test.go        # Server endpoint unit tests
│   │   ├── openai.go             # OpenAI Chat Completions API adapter
│   │   ├── anthropic.go          # Anthropic Messages API adapter (for Claude Code)
│   │   └── session.go            # Agent session isolation and cleanup
│   ├── launcher/
│   │   └── launcher.go           # Launchers for Claude Code, Codex, Goose, Aider, etc.
│   └── cli/
│       ├── terminal.go           # ANSI styling, banners, and spinners
│       ├── repl.go               # Interactive terminal chat & slash commands
│       ├── runner.go             # Single-prompt and Unix pipe runner
│       └── doctor.go             # End-to-end system diagnostics
├── main.go                       # Application entry point
├── go.mod                        # Go module definition
├── README.md                     # Main documentation (English)
├── README.ru.md                  # Russian documentation (Русский)
└── README.uz.md                  # Uzbek documentation (O'zbekcha)

Distributed under the MIT License.

── more in #ai-tools 4 stories · sorted by recency
── more on @nexus-cli 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/nexus-cli-pure-go-br…] indexed:0 read:6min 2026-10-21 · —