Hacker News AI · 2026/10/21 12:37:18
Nexus-CLI 发布 纯 Go 实现 DeepSeek 免费桥接
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
- Pure Go Parallel PoW (Proof-of-Work) Solver:
- Solves DeepSeek server challenges using the
DeepSeekHashV1algorithm (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).
- Solves DeepSeek server challenges using the
- 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.
- Streams the R1 model's thought process (
- 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"
- Direct CLI queries:
- 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/modelsandGET /v1/model-capabilitiesGET /v1/sessionsandPOST /v1/sessions/reset- Connects seamlessly with Open WebUI, Continue.dev, Cursor, Cline, and any other OpenAI/Anthropic client.
- 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.
- Emulates
- Structured Outputs & JSON Schema 🎯:
- Enforce strict JSON output or validate against JSON Schemas across CLI, Ollama, and OpenAI endpoints.
- Universal Integrations (Launcher) 🚀:
- One-command launcher for Claude Code, DeepSeek Harness, Codex, OpenCode, Goose, and Aider (Nexus automatically boots the proxy in the background).
- Multi-Account Pool 👥:
- Rotate multiple DeepSeek accounts using Round-Robin scheduling to eliminate rate-limit roadblocks (HTTP 429).
- Authentication Management (
nexus auth):- Manual login:
nexus auth login(extractuserTokenfrom browser LocalStorage) - Automatic via Chrome:
nexus auth chrome(reads session token from browser memory via CDP) - Account inspection:
nexus auth whoami
- Manual login:
- System Diagnostics (Doctor):
nexus doctor— instantly checks token validity, server connectivity, PoW solver performance, and session creation.
📦 Installation & Build
Requires Go 1.20+:
# 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:
./bin/nexus auth loginYou will be prompted for your userToken:
- Open
https://chat.deepseek.comin your browser. - Press
F12(orCmd+Option+Ion macOS). - Navigate to
Application->Local Storage->https://chat.deepseek.com-> copy theuserTokenvalue and paste it into the prompt.
2. Automatic via Chrome (CDP):
./bin/nexus auth chromeThis 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:
DEEPSEEK_TOKEN=your_deepseek_token_here(注:更多技术实现细节与完整 API 文档请查阅原项目 README)