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

@dev7studios/ralph-cli

v0.1.0

Published

Autonomous AI agent runner that orchestrates iterative coding workflows using opencode

Readme

Ralph CLI

Autonomous AI agent runner that orchestrates iterative coding workflows using opencode.

Ralph runs an AI agent in a loop, allowing it to work through a plan of tasks autonomously. It provides a real-time TUI dashboard showing progress, token usage, and live output.

Features

  • Iterative Execution: Runs the AI agent in a loop until all tasks are complete or max iterations reached
  • Real-time TUI: Beautiful terminal dashboard showing iteration progress, elapsed time, and token usage
  • Task Detection: Automatically detects and displays the current task being worked on
  • Completion Detection: Detects when the agent signals completion via <promise>COMPLETE</promise>
  • Retry Logic: Automatically retries failed iterations up to 3 times
  • Debug Logging: Optional detailed logging of all opencode output to .ralph/logs/
  • Git Safety: Warns about uncommitted changes before starting

Requirements

  • Node.js 18+
  • opencode installed and configured

Installation

# Clone the repository
git clone https://github.com/gilbitron/ralph-cli.git
cd ralph-cli

# Install dependencies
npm install

# Run directly (development)
./bin/ralph

# Or build and install globally
npm run build
npm link
ralph

Usage

ralph [options]

Options

| Option | Description | Default | |--------|-------------|---------| | -i, --iterations <number> | Maximum number of iterations | 100 | | -m, --model <string> | Model to use for opencode | opus-4.5-thinking | | -p, --prompt <path> | Path to custom prompt file | (built-in) | | --debug | Enable debug logging to .ralph/logs/ | false | | -h, --help | Display help information | | | -v, --version | Display version number | |

Required Files

Ralph requires two files in the current working directory:

plan.md

A structured plan of tasks for the agent to work through. Use markdown checkboxes to track completion:

# Project Plan

## Phase 1: Setup

### Task 1.1: Initialize Project
- [x] Create package.json
- [x] Install dependencies

### Task 1.2: Configure TypeScript
- [ ] Create tsconfig.json
- [ ] Set up strict mode

## Phase 2: Implementation

### Task 2.1: Create Core Module
- [ ] Define types
- [ ] Implement main function

progress.md

A log where the agent records its progress after each task. This helps maintain context across iterations:

## 2024-01-15 - Task 1.1: Initialize Project
- Created package.json with ES module support
- Installed dependencies: typescript, tsx
- Files changed: package.json, package-lock.json
- **Learnings:**
  - Project uses ES modules
  - Node 18+ required
---

Custom Prompt

Ralph includes a built-in prompt that instructs the AI agent on how to work through tasks. You can override this with a custom prompt file using the -p or --prompt option:

ralph -p ./my-custom-prompt.md

A custom prompt file should include instructions for the agent, typically covering:

  • How to read and update the plan (plan.md)
  • How to log progress (progress.md)
  • Quality requirements (testing, linting, etc.)
  • How to signal completion with <promise>COMPLETE</promise>

See the built-in prompt in src/prompt.ts for an example.

Debug Logging

When --debug is enabled, Ralph creates detailed logs in .ralph/logs/:

.ralph/
└── logs/
    ├── iteration-001.json
    ├── iteration-002.json
    └── iteration-003.json

Development

# Type check
npm run typecheck

# Run directly with tsx
npm run dev

# Build to JavaScript
npm run build

License

MIT