npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zweicli/cli

v1.1.8

Published

Dual-agent coding CLI. Student writes, Supervisor verifies. Fork of opencode.

Downloads

723

Readme

Zwei CLI

Experimental dual-agent coding tool. PhD writes, Supervisor verifies.

A different take on how coding agents compose: two isolated minds, one codebase, asymmetric memory.

Fork of opencode.

"Zwei" — German for "two".


Why

Most coding agents cram everything into a single context: read, write, run tests, grade, retry. As runs get longer, attention thins, test output drowns out intent, and the agent ends up grading its own homework.

Zwei borrows a pattern from academia: PhD writes, Supervisor grades. Two isolated sessions, two independent skill sets, one-way information flow at the boundary. The writer never peeks at the grader's reasoning — so it can't optimise against it.

Core Ideas

  • Dual Attention — two physically isolated sessions. The PhD focuses on writing; the Supervisor focuses on reviewing. Neither role burns attention on the other's job.
  • Independent Skills — each role loads its own skill set. Nothing is shared by default — the PhD isn't distracted by review tooling, the Supervisor isn't tempted to reach in and edit.
  • Asymmetric Memory — the PhD never sees the Supervisor's reasoning; only a structured verdict crosses the boundary. The Supervisor sees the PhD's code and test output. Memory flows one way, by design.
  • Write / Test Separation — the PhD has no bash and no read access to tests. Self-verification is physically impossible, and the writer's context stays clean — no tool traces, no test output, no file dumps polluting it.

The combined effect: the writer can't Goodhart the grader, and neither context contaminates the other.

Install

From source

git clone https://github.com/ZweiAI/ZweiCli
cd ZweiCli
bun install
bun run --cwd packages/zwei dev --help

From npm

npm install -g @zweicli/cli
zwei --help

Auto-update is on by default and tracks @zweicli/cli@latest on npm. To manually bump: zwei upgrade, or npm install -g @zweicli/cli@latest.

For everything outside the dual loop (auth, models, providers, sessions, web UI), upstream opencode conventions still apply. See opencode.ai.

Usage

Start the TUI:

zwei

Slash commands

Once inside the TUI, type / at the prompt. The commands that matter for the dual-agent workflow:

| Command | Does what | |---|---| | /agents (or /agent) | Pick mode × role. See the mode table below | | /model | Change model for both PhD and Supervisor | | /model1 | Change model for PhD only (the writer) | | /model2 | Change model for Supervisor only (the grader) | | /clear | Wipe conversation in all three sessions (you + PhD + Supervisor) | | /clear1 | Wipe PhD's session only | | /clear2 | Wipe Supervisor's session only |

/agents — pick a mode

The agents dialog shows six options — the product of three modes and two roles:

| Mode | What it does | When to use | |---|---|---| | dual | Every round, PhD writes then Supervisor reviews. Supervisor always runs | Long tasks, strict review, anti-Goodhart eval settings | | auto | PhD writes first. If a test gate passes, Supervisor is skipped; otherwise invoked | Default — saves tokens when writer nails it on the first round | | single | PhD only, no Supervisor. Equivalent to upstream opencode's single-agent flow | Tasks a strong model can one-shot — no point paying for review |

The role suffix (fast vs plan) picks the agent variant:

  • fast — execution mode; the agent actually edits and runs
  • plan — planning mode; read-only, produces a plan document before switching to fast

So dual fast means "PhD + Supervisor, both in execution mode", auto plan means "PhD plans first, Supervisor checks the plan on demand", etc.

Different models for PhD and Supervisor

The whole point of the asymmetric split is that the writer can be cheap and the grader strong (or vice versa):

/model1   # pick a fast / cheap model for PhD (e.g. Haiku 4.5)
/model2   # pick a strong / picky model for Supervisor (e.g. Opus 4.6)

Switching models works mid-run too — the change lands on the next round, not the current one.

Status

Pre-1.0, experimental. Architecture and terminology may still shift. Issues and PRs are welcome — especially workload reports showing where dual wins or loses against single-agent baselines.

License

MIT. See LICENSE — the original opencode copyright is retained alongside ZweiAI's.