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

@iannuttall/ralph

v0.1.3

Published

Minimal, file-based agent loop for autonomous coding.

Readme

Ralph

Ralph

Ralph is a minimal, file‑based agent loop for autonomous coding. Each iteration starts fresh, reads the same on‑disk state, and commits work for one story at a time.

How it works

Ralph treats files and git as memory, not the model context:

  • PRD (JSON) defines stories, gates, and status
  • Loop executes one story per iteration
  • State persists in .ralph/

Ralph architecture

Global CLI (recommended)

Install and run Ralph from anywhere:

npm i -g @iannuttall/ralph
ralph prd # launches an interactive prompt
ralph build 1 # one Ralph run

Template hierarchy

Ralph will look for templates in this order:

  1. .agents/ralph/ in the current project (if present)
  2. Bundled defaults shipped with this repo

State and logs always go to .ralph/ in the project.

Install templates into a project (optional overrides)

ralph install

This creates .agents/ralph/ in the current repo so you can customize prompts and loop behavior. During install, you’ll be asked if you want to add the required skills.

Install required skills (optional)

ralph install --skills

You’ll be prompted for agent (codex/claude/droid/opencode) and local vs global install. Skills installed: commit, dev-browser, prd. If you skipped skills during ralph install, you can run ralph install --skills anytime.

Quick start (project)

  1. Create your PRD (JSON) or generate one:
ralph prd

Requires the prd skill (install via ralph install --skills).

Example prompt text:

A lightweight uptime monitor (Hono app), deployed on Cloudflare, with email alerts via AWS SES

Default output (agent chooses a short filename in .agents/tasks/):

.agents/tasks/prd-<short>.json
  1. Run one build iteration:
ralph build 1 # one Ralph run

No‑commit dry run:

ralph build 1 --no-commit # one Ralph run

Override PRD output for ralph prd:

ralph prd --out .agents/tasks/prd-api.json

Optional human overview (generated from JSON):

ralph overview

This writes a tiny overview alongside the PRD: prd-<slug>.overview.md.

PRD story status fields are updated automatically by the loop:

  • open → selectable
  • in_progress → locked by a running loop (with startedAt)
  • done → completed (with completedAt)

If a loop crashes and a story stays in_progress, you can set STALE_SECONDS in .agents/ralph/config.sh to allow Ralph to automatically reopen stalled stories.

Override PRD paths

You can point Ralph at a different PRD JSON file via CLI flags:

ralph build 1 --prd .agents/tasks/prd-api.json # one Ralph run

Optional progress override:

ralph build 1 --progress .ralph/progress-api.md # one Ralph run

If multiple PRD JSON files exist in .agents/tasks/ and you omit --prd, Ralph will prompt you to choose.

Optional config file (if you installed templates):

.agents/ralph/config.sh

Choose the agent runner

Set AGENT_CMD in .agents/ralph/config.sh to switch agents:

AGENT_CMD="codex exec --yolo -"
AGENT_CMD="claude -p --dangerously-skip-permissions \"\$(cat {prompt})\""
AGENT_CMD="droid exec --skip-permissions-unsafe -f {prompt}"
AGENT_CMD="opencode run \"$(cat {prompt})\""

Or override per run:

ralph prd --agent=codex
ralph build 1 --agent=codex # one Ralph run
ralph build 1 --agent=claude # one Ralph run
ralph build 1 --agent=droid # one Ralph run
ralph build 1 --agent=opencode # one Ralph run

If the CLI isn’t installed, Ralph prints install hints:

codex    -> npm i -g @openai/codex
claude   -> curl -fsSL https://claude.ai/install.sh | bash
droid    -> curl -fsSL https://app.factory.ai/cli | sh
opencode -> curl -fsSL https://opencode.ai/install.sh | bash

State files (.ralph/)

  • progress.md — append‑only progress log
  • guardrails.md — “Signs” (lessons learned)
  • activity.log — activity + timing log
  • errors.log — repeated failures and notes
  • runs/ — raw run logs + summaries

Notes

  • .agents/ralph is portable and can be copied between repos.
  • .ralph is per‑project state.
  • Use {prompt} in AGENT_CMD when agent needs a file path instead of stdin.
  • Examples: see examples/commands.md.
  • OpenCode server mode: For faster performance with OpenCode, run opencode serve in a separate terminal and uncomment the AGENT_OPENCODE_CMD lines in .agents/ralph/agents.sh to use --attach http://localhost:4096. This avoids cold boot on every run.

Tests

Dry-run smoke tests (no agent required):

npm test

Fast agent health check (real agent call, minimal output):

npm run test:ping

Optional integration test (requires agents installed):

RALPH_INTEGRATION=1 npm test

Full real-agent loop test:

npm run test:real