AIFeed

Show HN:Nachuan——可验证、零遥测的多 worktree AI 编码平面

Translation(model translation, not the source's own text)

Nachuan (纳川)

Zero-Telemetry, Verifiable Multi-Agent Control Plane 可自证零遥测的多 Agent 编码与本地 AI 控制面 — Built for developers who want multi-worktree parallel coding, visual diff review, cross-platform native secret storage, and tool-verifiable privacy instead of opaque promises.

English | 简体中文完整运维与边界说明 (README.zh-CN.md)

Release status: 0.2.0 source alpha (Apache-2.0). Source, CLI + Local Web control plane, zero-telemetry verifier, and multi-worktree Coding Studio are open for inspection, testing, and contribution; signed consumer desktop installers and hosted enterprise multi-tenant deployments remain gated by independent release doors (see PACKAGING.md and docs/CODE_SIGNING_POLICY.md).
Nachuan 31s Real-Machine Walkthrough
Nachuan 31s Real-Machine Walkthrough

Core Highlights · 核心卖点速览

  • 60-Second Quickstart · 60 秒极速启动:一条命令 nachuan start 启动 127.77.77.77 专属回环引擎与本地 Web 控制面。
  • One-Command Zero-Telemetry Proof · 一键自证零遥测:随时运行 python scripts/verify_zero_telemetry.py --json,8 项硬断言端到端实证 0 遥测 SDK、0 第三方 CLI 凭据读取、0 隐式非回环外联。
  • Hook-Safe Multi-Worktree Coding Control Plane · 多 Git Worktree 并行编码控制面:隔离任务分支 + 自动 .git/info/exclude 零污染 + 可视化逐行 Diff + 单文件 Revert / 本地 Commit + Plan(只读探索)/ Build(审批绑定单次消费)双模执行闸。
  • Live Outbound Firewall & Air-Gapped Mode · 实时网络出站审计与空气间隙纯离线模式:可视化查看每次出站请求,一键硬拦截所有非回环连接,本地 Ollama / llama.cpp 全速离线运行。
  • 3-DB Lean SQLite Core & Cross-Platform Keyring · 3 核心 SQLite 库与跨平台密钥环:精简为 core.db / memory.db / ops.db 三库架构,原生适配 Windows DPAPI / macOS Keychain / Linux Secret Service / 0600 AES-256-GCM 密文密钥文件。

Why Nachuan? (Don't Trust Promises — Verify Every Packet)

大多数编码外壳要求你信任它们的隐私声明,或者给本地 Agent 不受限制的 shell 访问权限且零审批留痕。Nachuan 采取严格的工程立场:

  • Tool-Verifiable Zero Telemetry — Run one command anytime to verify static zero-SDK compliance, zero third-party CLI credential harvesting (never reads ~/.claude.json or ~/.codex/auth.json), and live air-gapped blocking: python scripts/verify_zero_telemetry.py --json

        python scripts/verify_zero_telemetry.py --json
      
  • Real-Time Outbound Audit Firewall & One-Click Air-Gapped Mode — Every outbound HTTP request inside the gateway and Electron shell passes through a unified OutboundGuard ring buffer visible live in the UI (GET /v1/privacy/outbound-audit). Flip Air-Gapped Mode on to hard-block every non-loopback connection before socket connect while keeping local Ollama / llama.cpp models running at full speed.
  • Hook-Safe Multi-Worktree Coding Studio + Plan/Build Sandbox — Spawn isolated git worktree sessions in parallel for Codex, Claude Code, OpenCode, Kimi Code, Local Ollama, or any BYOK cloud model. Every git call forces -c core.hooksPath=/dev/null -c core.fsmonitor=false -c protocol.file.allow=never to prevent malicious repo hook RCE. Review structured per-file Unified Diffs, revert single files, commit selectively, and route sensitive Build commands to Desktop / Mobile Web PWA / Discord / Slack / Telegram / Feishu / WeChat approvals.
  • Cross-Platform Native Secret Store — Zero plaintext secret fallback: Windows DPAPI, macOS Keychain (/usr/bin/security), Linux Secret Service (secret-tool), and 0600 AES-256-GCM encrypted keyfiles on headless servers.
  • Lean 3-Database Core + Hybrid Local/Cloud Routing — Slimmed down to 3 SQLite core files (core.db, memory.db, ops.db) with feature flags keeping heavy optional modules off by default; mix free local models with flagship cloud APIs to slash token spend.

How Nachuan Compares

能力NachuanT3 CodeOpenCodeOpenClaw
工具可验证的零遥测( verify_zero_telemetry.py )是(CI 门禁)否部分部分
实时外发审计 UI + 一键气隙模式是否否否
Hook 安全的并行 Git Worktree + 按文件 Diff / 回滚是部分(原始 git)否否
计划(只读)/ 构建审批执行沙箱是部分是(无远程账本)否
远程移动审批(Web PWA / Discord / Slack / Telegram / 飞书 / 微信)是仅 Web否仅 IM
跨平台密钥钥匙串(Win / macOS / Linux)是部分环境变量/文件环境变量/文件
本地离线模型 + BYOK 云端混合路由是以订阅为核心是是

60 秒快速上手

方案 A — CLI + 本地 Web 控制平面(macOS / Linux / Windows)


        # 1. Build web renderer bundle
npm --prefix desktop run build:web

# 2. Install as a local Python package / CLI
pip install -e .

# 3. Launch local engine (binds strictly to 127.77.77.77) & open Web UI
nachuan start
      

方案 B — Windows 已验证源码安装器(无需管理员权限,SHA-256 校验)

先将官方安装器下载到本地(绝不把网络文本通过管道传给 iex),将仓库引用解析为不可变的 40 字符提交,并对照 OPEN_SOURCE_SNAPSHOT.json 校验每个文件:


        $installer = Join-Path $env:TEMP 'nachuan-install.ps1'
Invoke-WebRequest https://raw.githubusercontent.com/wg5759/nachuan/main/install.ps1 -OutFile $installer
& $installer -Action Install
      

其他常用 CLI 命令:


        nachuan status                           # Inspect engine & connected models
nachuan models                           # List active local & BYOK routes
nachuan chat "Summarize git diff"        # Fast terminal turn
nachuan doctor                           # Verify source closure & runtime hashes
python scripts/verify_zero_telemetry.py  # Independently verify 0 telemetry calls
      

方案 C — 启动即气隙离线模式


        NACHUAN_OFFLINE_MODE=1 nachuan start
      

所有非环回流量(包括网络搜索、云提供商、Webhook 和云同步)都会在连接前被硬性阻断,而本地 Ollama / llama-server 模型仍完全可用。

核心架构


        Desktop (Electron) / Local Web PWA / Mobile IM (Discord, Slack, Telegram, Feishu, WeChat)
                                    │
                                    ▼
             Nachuan Turn Engine & Gateway (FastAPI, 127.x loopback)
   ┌──────────────────┬────────────────────────┬───────────────────────────┐
   │ Privacy Firewall │ Multi-Worktree Studio  │ Multi-Model Orchestrator  │
   │ • OutboundGuard  │ • Hook-safe worktrees  │ • Local + BYOK Routing    │
   │ • Air-Gapped Gate│ • Per-file Diff/Revert │ • Cross-Vendor Review     │
   │ • SecretStore    │ • Plan/Build Sandbox   │ • Same-Origin Memory/RAG  │
   │   (DPAPI/Keychain│ • Remote Approvals     │ • Feature-Flagged Extras  │
   │    /libsecret)   │                        │                           │
   └──────────────────┴────────────────────────┴───────────────────────────┘
                                    │
                     3-DB Lean SQLite Core (core / memory / ops)
      

关键 API 接口

  • 隐私与外发防火墙(P2):GET /v1/privacy/outbound-audit (limit, since_id, blocked_only) 与 DELETE /v1/privacy/outbound-audit GET /v1/privacy/offline-mode 与 POST /v1/privacy/offline-mode
  • GET /v1/privacy/outbound-audit (limit, since_id, blocked_only) 与 DELETE /v1/privacy/outbound-audit
  • GET /v1/privacy/offline-mode 与 POST /v1/privacy/offline-mode

文章标题:Show HN: Nachuan —— 可验证零遥测的多 worktree AI 编码平面

正文:

  • 工作区编码控制平面(P3 —— Worktrees、Diff、Revert、Commit 与 Plan/Build 审批门):GET / POST /v1/workspace/worktrees 与 POST /v1/workspace/worktrees/remove(DELETE /v1/workspace/worktrees)GET /v1/workspace/diff(worktree_path、staged)POST /v1/workspace/revert-file 与 POST /v1/workspace/commit(仅本地提交,绝不 git push)POST /v1/workspace/exec-plan(plan 只读白名单 | build 一次性审批绑定执行)
  • GET / POST /v1/workspace/worktrees 与 POST /v1/workspace/worktrees/remove(DELETE /v1/workspace/worktrees)
  • GET /v1/workspace/diff(worktree_path、staged)
  • POST /v1/workspace/revert-file 与 POST /v1/workspace/commit(仅本地提交,绝不 git push)
  • POST /v1/workspace/exec-plan(plan 只读白名单 | build 一次性审批绑定执行)
  • 多 Worktree 编码工作室与审批(P3):GET / POST /v1/coding/sessions、DELETE /v1/coding/sessions/{id} GET /v1/coding/sessions/{id}/diff、POST /v1/coding/sessions/{id}/mode(plan | build)POST /v1/coding/sessions/{id}/revert、POST /v1/coding/sessions/{id}/commit、POST /v1/coding/sessions/{id}/exec GET /v1/coding/approvals 与 POST /v1/coding/approvals/{id}/resolve
  • GET / POST /v1/coding/sessions、DELETE /v1/coding/sessions/{id}
  • GET /v1/coding/sessions/{id}/diff、POST /v1/coding/sessions/{id}/mode(plan | build)
  • POST /v1/coding/sessions/{id}/revert、POST /v1/coding/sessions/{id}/commit、POST /v1/coding/sessions/{id}/exec
  • GET /v1/coding/approvals 与 POST /v1/coding/approvals/{id}/resolve
  • 全局 IM 远程审批桥(P4):bridge/global_approval_webhook.py —— SSRF 白名单化的 Discord 与 Slack HTTPS 审批卡片 + Slack HMAC-SHA256 防重放验证。
  • bridge/global_approval_webhook.py —— SSRF 白名单化的 Discord 与 Slack HTTPS 审批卡片 + Slack HMAC-SHA256 防重放验证。

验证与测试


        # Zero-telemetry & air-gapped proof
python scripts/verify_zero_telemetry.py --json

# Core P0-P4 backend verification suites
pytest -q tests/test_p0_privacy_isolation.py tests/test_p1_architecture_slim.py \
  tests/test_p2_privacy_crossplatform.py tests/test_p3_coding_studio.py \
  tests/test_p4_global_approval.py

# Shared-core distribution contract
python scripts/verify_distribution_contract.py

# Desktop TypeScript check, web build, and Vitest suite
npm --prefix desktop run typecheck
npm --prefix desktop run build:web
npm --prefix desktop test
      

安全边界、治理与文档

  • 完整中文操作与架构说明:README.zh-CN.md
  • 架构决策记录:docs/adr/
  • 开源策略与边界:docs/OPEN_SOURCE_STRATEGY_OPENCLAW_COMPARISON.md
  • 打包与发布门禁:PACKAGING.md · docs/CODE_SIGNING_POLICY.md
  • 安全政策、治理与商标:SECURITY.md · CONTRIBUTING.md · GOVERNANCE.md · TRADEMARKS.md

许可证

Apache License 2.0。参见 LICENSE 与 NOTICE。

The translation is machine-generated and individual terms may be off. Nothing is rewritten or cut; the original is authoritative.

Published by HN AI
This site only summarises and aggregates; copyright stays with the original author. Headlines and summaries follow the source — where they differ, the original wins.
Read the original ↗