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

@avikalpa/zcode-tui

v0.6.38

Published

A functioning, **polished** TUI for ZCode — so the subsidized ZCode workflow is not locked to the Electron desktop. Owner objective, 2026-09-07. Priority above the bridge work.

Downloads

728

Readme

zcode-tui

A functioning, polished TUI for ZCode — so the subsidized ZCode workflow is not locked to the Electron desktop. Owner objective, 2026-09-07. Priority above the bridge work.

Architecture

┌──────────────┐  ZCode Protocol v4 (NDJSON/stdio)   ┌───────────────────┐
│ zcode-tui    │ ──────────────────────────────────► │ zcode … app-server │
│ (OpenTUI)    │ ◄────────────────────────────────── │ (Electron-as-node  │
└──────────────┘   v4/conversation/frame pushes      │  runtime, SAME     │
                                                     │  stores+identity)  │
                                                     └───────────────────┘
  • Stack: Bun + TypeScript + OpenTUI (anomalyco/opentui — Zig core, TS bindings; the OpenCode production TUI stack).
  • We do not reimplement the agent loop. The TUI is a frontend speaking the ZCode Protocol v4 to app-server — the same wiring shape the Electron desktop uses (desktop → host → zcode-cli children).
  • Same stores, same credentials, same subsidized identity as the desktop: ~/.zcode/cli/db/db.sqlite, ~/.zcode/v2/*, memories under ~/.zcode/cli/memories/. Reflection TUI↔GUI falls out of shared stores.
  • UX reference: the opencode2 TUI. Quality bar: beat ZCode's built-in default tui command (exists today; not polished).

Quick start

curl -fsSL https://raw.githubusercontent.com/yggdrasilhq/yggterm/main/scripts/install.sh | sh
ynpx @avikalpa/zcode-tui

The package is managed by ynpm, so a verified generation is reused locally and can be distributed to the rest of the yggterm fleet. For source development, run bun install && bun run tui (bun ≥ 1.1), then publish or distribute the dev build with ynpm dev.

Auth

zcode-tui's auth IS the zcode machine settings. At startup it syncs the SSOT provider config (~/.zcode/v2/provider_config.json) — read locally on the SSOT host or over ssh <host> elsewhere (fleet default: jojo) — stores it verbatim in ~/.config/zcode-tui/auth-provider-config.json (0600, with metadata in auth.json), heals the local machine settings from it (~/.zcode/v2/provider_config.json + the api key field in ~/.zcode/cli/config.json, dated .pre-authsync-<date> backups), and hands the stored copy to the spawned backend via ZCODE_PERSONAL_PROVIDER_CONFIG_FILE. Configure with ~/.config/zcode-tui/config.json{"auth": {"source": "jojo", "syncAtStartup": true}} or the ZCODE_TUI_AUTH_SOURCE env. Sync failure never blocks the boot.

Keys

Launch opens the centered zcodetui front page. Type a prompt and press Enter to create a session, or type /sessions to open the session browser.

Ctrl+X then a key (the OpenCode leader): b sidebar · t themes · l sessions · n new · c compact · q quit. Ctrl+P (or Ctrl+K) command palette (all verbs, type-to-filter) · Shift+Tab cycle mode (plan/build/edit/yolo/auto) · a new session · i focus composer · Enter open/send · s sessions · m model dialog · t themes · e reasoning effort · b sidebar (session view) · f fork · c compact · o cycle mode · [/] page conversation · r refresh/reconnect · q quit · permission asks: y allow · a always (project) · n deny

Dialogs follow OpenCode's selection pattern: type-to-filter, date-grouped sessions, arrows, Enter, Esc, and compact footer hints. Themes are the 33 official OpenCode TUI palettes (ported verbatim from the upstream theme assets, tools/opencode-themes/) plus Z.ai light/dark; markdown and syntax colours follow the active theme. Status rides the composer underline and the per-turn footer (mode · model · duration · tok/s) — there is no permanent bottom bar.

Status

v0.6.0 — OpenCode visual parity (2026-09-10). Composer with the mode-tinted left accent and OpenCode status grammar, user message blocks, per-turn footers, optional session sidebar, full official theme set.

v0.5.7 — OpenCode-shaped UX (2026-09-08). The TUI lists/resumes/streams/sends against the real backend with the same store and identity as the desktop, with an OpenCode-shaped home surface, /sessions browser, grouped session picker, state-controlled composer, and theme arms.

  • bun run tui — the TUI (keys: a new · i type · Enter send/open · m model · r refresh · q quit)
  • bun run probe:battery — protocol acceptance battery (no model calls)
  • bun run probe:live — scripted create→subscribe→send with stream capture
  • bun run src/tui/live-smoke.tsx — headless OpenTUI acceptance frame

Phases landed: protocol captured (docs/protocol.md) · full loop proven · TUI v0 read-only · send path + streaming · scrollbox/markdown polish · model switcher · acceptance battery · fork + compact verbs · theme arms · release v0.1.0.

Layout

  • src/protocol/ — client + types for the v4 protocol (zero-dep).
  • src/auth/ — startup auth sync from the zcode machine settings (SSOT).
  • src/bin/ — probe, probe-script, live (stream capture), battery.
  • docs/screenshots/ — captured character frames (real app, real data).
  • docs/ — capture notes + evidence. docs/evidence/strace-cli-50s.txt is local-only (gitignored; contains owner conversation bytes).

Licence

GPL-3.0-or-later — see LICENSE and NOTICE. Contributions welcome (see CONTRIBUTING.md and CLA.md); third-party notices in THIRD-PARTY-NOTICES.md.

Trademark: ZCode is a trademark of Z.ai. zcode-tui is an unofficial, independent client for a locally installed ZCode runtime; it is not affiliated with or endorsed by Z.ai. See TRADEMARKS.md.