Linghun
A local-first, evidence-first AI coding terminal that connects LLMs to real projects, tools, permissions, and verification — reducing unsupported claims and rework.
The README asserts permission boundaries, path checks, command classification, and confirmation before high-risk writes, but none of the provided files show the implementing code — asserted without support (1). API keys stored in a user-level provider.env with documented config priority is the one verifiable sensitive-data practice (2). Git stable points, rollback, and remote approvals are described in prose only. The 'Special Thanks' section promoting third-party API relay services (geek2api, core2api) with community group numbers is a mixed provenance signal — deducted.
Clear self-consistency defect: repository package. says 0.1.0 while the README claims @linghun/[email protected] is published (1). Dependency availability is decent: pinned engines (Node 22+, pnpm 10), frozen-lockfile CI, multi-platform build smokes (2). Failure messaging appears only as described surfaces (/model doctor, problems panel), no code shown (1).
Audience/scenarios are thorough: Chinese users and Windows/PowerShell/Chinese-path environments are first-class (2). Capability boundaries are handled relatively honestly — the README labels benefit figures as architectural estimates and distinguishes verification scopes (2). Trigger precision lacks an AGENTS.md manifest or command-surface spec; slash commands are only summarized (1). Environment fit is corroborated by a multi-OS CI matrix and musl static builds (2).
Information architecture is clean with whitepaper/update cross-links (2); install notes cover Node version, npm install, and /model setup (2). Naming is stable: dual linghun/Linghun bins and consistent @linghun scoping (2). A workflow example exists but no FAQ (1). Known limitations are stated (2). Apache-2.0 LICENSE is complete and consistent with package. (3). Versioning/changelog: docs/updates is referenced but not supplied, and repo version conflicts with the claimed published version (1). Maintenance responsibility: unverified publisher, no CONTRIBUTING or governance files (1).
Output usability rests on runtime gates (final-answer gates, evidence boundaries) that are asserted but not shown (1). Marginal value: the anti-hallucination runtime is a differentiated claim, but the benefit table's extreme figures ('+80% ~ +200%') without measurement undermine credibility (1). Cost/benefit offers only cache hit-rate target ranges (92%-96%) with no comparative data (1).
Key claims — a pending Terminal-Bench 2.1 PR scoring 78.43%, 96%+ cache hit rates, maturity of each capability domain — cannot be traced within the supplied files; the whitepaper and updates doc are linked but absent from evidence (1). Cross-source corroboration is limited: the CI workflow genuinely corroborates the pre-engine binary, cross-platform packaging, and protocol snapshot, but none of the performance or safety claims (1). Fact/inference separation is comparatively good: the README explicitly marks estimates as 'not exact measurements or promises' (2).
- Core safety mechanisms advertised in the README (permission system, anti-hallucination gates, Git rollback) have no implementing code among the supplied files; under static review they must be treated as unverified claims.
- Repository version (0.1.0) conflicts with the claimed published npm version (0.1.30); verify the actual published artifact before installing.
- The Terminal-Bench 2.1 score is based on a pending, unmerged PR; the rank is not officially confirmed and should not drive adoption.
- The README promotes third-party API relay services (geek2api, core2api); routing keys and traffic through such relays introduces key-leakage and interception risk — evaluate independently.
- Benefit estimates (e.g., +80%~200% for risk scenarios) are architectural inferences, not measurements; do not base procurement decisions on them.
- Publisher identity is unverified; the tool executes model-generated commands on your machine by default — trial it in an isolated environment first.
What does this agent do, and when should you use it?
Linghun is an open-source (Apache-2.0) TypeScript-based CLI/TUI coding-agent runtime, installed via `npm install -g @linghun/cli` and executed locally. It treats the LLM as the reasoning brain while the runtime acts as an engineering exoskeleton: file reads feed evidence, edits pass through permission and path boundaries, verification results are distinguished as PASS/PARTIAL/FAIL/TIMEOUT/STALE/CANCELLED, and agent summaries or job states cannot masquerade as PASS. It ships local tools (Read/Write/Edit/Bash/Git), bundled code indexing (codebase-memory-mcp binaries for Windows x64, Linux x64, macOS Apple Silicon and Intel), role-based multi-model routing, Workflow Matrix long-task orchestration, controlled memory with failure learning, and a central policy kernel. It supports OpenAI-compatible, DeepSeek, and Anthropic Messages-style endpoints with streaming, tool calls, and provider diagnostics, and treats Windows, PowerShell, Chinese paths, and multi-drive environments as first-class citizens. The README reports a current Terminal-Bench 2.1 score of 78.43% (PR pending merge; official rank TBD), and all cache-hit-rate and scenario benefit figures in the whitepaper are architectural estimates, not guarantees.
After the user issues a task in natural language (Chinese supported) in the terminal, Linghun runs a main-chain flow: it retrieves project structure and relevant files via the code index and SourcePack/ReadSnippets, forms a plan, requests permission confirmation before high-risk writes or Bash commands, modifies files through the local tool runtime, runs focused verification, checks Git status and can create stable points / manage Managed Worktrees, then reports what changed, what was verified, and what remains uncertain through a final answer gate. Output is constrained by EvidenceSummary, completion checks, code-fact checks, architecture/AntiCodeBlob checks, Git operation checks, and final answer retry/downgrade. Complex tasks are decomposed by Workflow Matrix into phase/slice/role and reuse /job, /fork, /agents, verification, and handoff surfaces. External capabilities connect via MCP, Skills, Plugins, Hooks, and the Capability Runtime / App Bridge (local HTTP connector requiring a manifest plus /apps connect). Remote channels support WeCom, Feishu/Lark, DingTalk, and webhooks for notifications and approvals. Providers are configured via the /model setup wizard (API base URL, key, model, reasoning level); keys are stored in a user-level private provider.env, and /model doctor diagnoses configuration.
- A solo developer on Windows who wants to complete fix-bug, run-tests, create-Git-stable-point loops via natural language in PowerShell, Chinese paths, and multi-drive environments
- A professional developer maintaining a long-lived project who wants project rules (LINGHUN.md), failure learning, and controlled memory to persist across sessions, reducing repeated explanations and drift
- A team skeptical of AI coding output that needs local verification, mock verification, real smoke tests, and unverified conclusions clearly distinguished, avoiding 'looks done' answers
- An engineer who wants planning, execution, review, and summarization routed to different model endpoints (OpenAI-compatible/DeepSeek/Anthropic style)
- A lead with complex tasks who wants them split into observable steps, background jobs, and multi-agent exploration via Workflow Matrix with rollback and handoff
- A user who wants WeCom/Feishu/DingTalk as remote notification and approval channels to keep long local tasks progressing while away from the machine
What are this agent's strengths and limitations?
- Anti-hallucination is a runtime constraint, not a prompt reminder: reads become evidence, writes pass permission boundaries, agent/job results cannot impersonate PASS, and final answers distinguish verified facts from inference
- First-class Windows/Chinese support: dual entry points, PowerShell/cmd/Windows Terminal handling, Chinese and spaced paths, process guards with bounded cleanup — rare among similar terminal tools
- Full engineering loop: code indexing, 92%-96% cache-hit-rate targets, Git stable points and Managed Worktree, failure learning, and Workflow Matrix multi-agent long-task orchestration
- No model lock-in: supports OpenAI-compatible, DeepSeek, and Anthropic Messages-style endpoints with role-based routing; provider keys stay outside the project and are redacted on the main screen
- Still in early active development (currently v0.1.30); the README itself states that multi-platform native-runner packaging, remote-channel product experience, external capability ecosystem, and public documentation are not yet mature
- Whitepaper cache-hit rates (92%-96%) and scenario benefits (+5% to +200%) are architectural estimates, not measured guarantees; actual gains depend on project, model, and task
- The 78.43% Terminal-Bench 2.1 score's PR is not yet merged, so official ranking is unconfirmed and the benchmark claim lacks independent verification for now
- Capability Runtime currently only supports loopback HTTP connectors; integrating external apps requires implementing /linghun/capabilities and /linghun/execute endpoints plus a manifest, adding integration cost
How do you install or deploy this agent?
Requires Node.js 22+ and npm/pnpm or another Node package manager. Install with: npm install -g @linghun/cli. The latest release per the README updates is @linghun/[email protected], which ships Windows, Linux, and macOS preflight-engine platform packages.
How do you use this agent?
Run linghun in a project directory (Windows also supports the Linghun entry point). First-time model setup: run /model setup in the interactive UI and enter API base URL, API key, model name, and reasoning level; the key is stored by default in a user-level private provider.env. Use /model doctor to check provider configuration and linghun --version to check the version. Then issue tasks in natural language, e.g.: 'Check why this project fails to build, fix the problem, run the relevant tests, and create a stable point if they pass.' On startup Linghun detects LINGHUN.md in the project; if missing, run /memory init to create a basic project-rules template.