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

@spectral-zx/toolkit

v0.1.0

Published

Spectral — AI agent toolchain for the ZX Spectrum: assemble, run headless, observe, debug, iterate.

Readme

Spectral

AI agents for the ZX Spectrum.

Spectral is a toolchain that lets AI coding agents (Claude Code, Codex, and friends) write ZX Spectrum 48K games autonomously, with a real feedback loop:

assemble → run headless → observe (screenshot + state) → debug → iterate

It is built on zx-generation, a cycle-accurate ZX Spectrum emulator in pure JavaScript — itself 100% LLM-generated. An LLM-written emulator, running LLM-written games.

Quick start

npm install
npm run build
node dist/cli/index.js doctor          # check toolchain (needs sjasmplus)

# The agent loop, end to end:
node dist/cli/index.js build game.asm
node dist/cli/index.js run --bin build/game.bin --org 0x8000 \
    --frames 300 --screenshot screen.png --json

Every command supports --json for machine-readable output. Exit codes: 0 ok · 1 build/user error · 2 hang detected · 3 environment problem.

You need sjasmplus ≥ 1.20 on your PATH (zxs doctor tells you how to install it).

How fast?

The emulator runs headless in-process — no sockets, no external emulator binaries. On an Apple Silicon laptop: ~6,600 frames/second, 132× real hardware (~463 MHz Z80-equivalent). Running 5 emulated seconds of a game costs ~40ms.

MCP server

zxs-mcp exposes the same toolkit over the Model Context Protocol with a persistent live machine — and zx_screen returns the display as an image, so Claude literally sees the Spectrum screen. The repo ships a project-scoped .mcp.json; open it with Claude Code (after npm run build) and ask:

load build/bounce.bin and tell me what's on the screen

Tools: zx_build, zx_run, zx_screen, zx_inspect, zx_debug (breakpoints/watchpoints/step/disasm/trace), zx_keys, zx_state.

Status

  • Phase 0 — walking skeleton: headless 48K Spectrum in Node (boots the real ROM), zxs build (JSON diagnostics + did-you-mean hints), zxs run, PNG screenshots, doctor/bench, deterministic golden tests
  • Phase 1 — agent feedback loop: .zxs/ sessions resumable across processes, frame-accurate key plans, ROM-font screen OCR (cheap text eyes), hang watchdog (di-halt / tight-loop / rom-error / sp-corrupt / pc-in-rom, exit code 2), SNA load + .z80 export
  • Phase 2 — debugger & tracer: full Z80 disassembler (round-trip verified), SLD symbols (breakpoints by label or file.asm:line), watchpoints, step --over, hot-spot tracing — all symbolicated
  • Phase 3 — MCP server: persistent machine over stdio, screen as image content
  • Phase 4 — knowledge layer: zxs new scaffolding (working skeleton + agent playbook), 8 reference docs, CI-tested recipe cookbook, zxs test declarative runner — milestone passed: an AI agent built a playable Pong unassisted in ~8 iterations
  • Phase 5 — hardening & launch: pc-in-rom watchdog ✅, recipe cookbook complete (12/12) ✅, gallery site ✅ (npx serve gallery — play the agents' games in your browser); left: GitHub/npm publish, upstream PRs, the time-lapse video

License

MIT. The bundled 48K ROM ships with zx-generation under Amstrad's long-standing emulator-distribution permission.