Hacker News AI · 2026/10/21 12:37:18

Nexus-CLI 发布 纯 Go 实现 DeepSeek 免费桥接

原标题:Nexus-CLI – Pure Go Bridge to DeepSeek R1/V3 with Claude Code and Ollama Support
68AI 研判分
核心综述

Nexus-CLI 是一款基于纯 Go 语言开发的高性能命令行工具与本地 API 代理,允许开发者通过免费网页账号连接 DeepSeek V3 和 R1 模型,无需官方付费 API Key。该工具重写了 Node.js 和 Python 版本的核心逻辑,实现了零运行时依赖,并集成了并行 Proof-of-Work 求解器以快速响应服务器挑战。此外,它支持交互式终端聊天、实时流式显示推理过程,以及无缝集成 Claude Code 和 Ollama 等主流开发环境。

报道全文原始报道全文

本文目录6 个章节

Nexus-CLI (DeepSeek Web Bridge for Golang) ⚡


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.


🚀 Key Features

  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).
  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 loading spinners.
    • Built-in slash commands: /help, /new, /model, /thinking, /search, /whoami, /clear, /exit.
  3. 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"
  4. 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 with Claude Code and the Anthropic SDK!)
    • POST /v1/responses (OpenAI Responses API)
    • GET /v1/models and GET /v1/model-capabilities
    • GET /v1/sessions and POST /v1/sessions/reset
    • Connects seamlessly with Open WebUI, Continue.dev, Cursor, Cline, and any other OpenAI/Anthropic client.
  5. 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.
  6. Structured Outputs & JSON Schema 🎯:
    • Enforce strict JSON output or validate against JSON Schemas across CLI, Ollama, and OpenAI endpoints.
  7. Universal Integrations (Launcher) 🚀:
    • One-command launcher for Claude Code, DeepSeek Harness, Codex, OpenCode, Goose, and Aider (Nexus automatically boots the proxy in the background).
  8. Multi-Account Pool 👥:
    • Rotate multiple DeepSeek accounts using Round-Robin scheduling to eliminate rate-limit roadblocks (HTTP 429).
  9. Authentication Management (nexus auth):
    • Manual login: nexus auth login (extract userToken from browser LocalStorage)
    • Automatic via Chrome: nexus auth chrome (reads session token from browser memory via CDP)
    • Account inspection: nexus auth whoami
  10. System Diagnostics (Doctor):
    • nexus doctor — instantly checks token validity, server connectivity, PoW solver performance, and session creation.

📦 Installation & Build

Requires Go 1.20+:

BASH
# Clone repository and navigate to directory:
git clone https://github.com/xamrayev/nexus-cli.git
cd nexus-cli

# Build the executable binary:
go build -o bin/nexus .

# Install globally to system PATH (optional):
go install .

🔑 Authentication (Account Linking)

There are 3 ways to connect your DeepSeek account:

1. Interactive CLI prompt:

BASH
./bin/nexus auth login

You will be prompted for your userToken:

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

2. Automatic via Chrome (CDP):

BASH
./bin/nexus auth chrome

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

3. Via .env file:

Create a .env file in the project root:

ENV
DEEPSEEK_TOKEN=your_deepseek_token_here

(注:更多技术实现细节与完整 API 文档请查阅原项目 README)