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

react-agent-cli

v0.2.0

Published

Baseline ReAct agent CLI (prebuilt binary installer).

Readme

react-agent-cli (npm)

This npm package installs the ra CLI.

Ra

Baseline ReAct agent CLI for OpenRouter-compatible models. View the specification.

ReAct is the most common architecture used in agent frameworks and is the baseline against which you should measure more complex agents (it can be surprisingly difficult to hand-tune agents that perform better than a ReAct agent against a diverse set of tasks!).

UK AISI

Quick Start

Install:

# Run one of the below commands:
npm i -g react-agent-cli
cargo install ra-cli
curl -fsSL https://raw.githubusercontent.com/justinwangx/ra-cli/main/install.sh | sh

The script installs ra into /usr/local/bin (if writable) or ~/.local/bin. Set RA_VERSION to pin a tag.

Set your OpenRouter API key:

export OPENROUTER_API_KEY="..."

Run a quick one-liner task (defaults to no-submit mode; exits on the first assistant response):

ra "Summarize the repo layout."

Usage

  • Modes:
    • Single-shot (default): ra "PROMPT" exits after the first assistant response
    • Exec/agent: ra --exec ... (or ra --prompt-file FILE) continues until the model calls submit

[!WARNING] ra is designed for agentic evaluations that run in sandboxed environments, as a baseline against more advanced CLI agents like Codex, Claude Code, and Gemini CLI. It can execute arbitrary shell commands and read/write files via tool calls. If you run it on your machine outside a sandbox, do so at your own risk and only in a workspace you’re comfortable exposing to the model.

Examples

# Single-shot (default)
ra "Say hi back"

# Configure the model (default: openai/gpt-4.1-mini)
ra --model openai/gpt-4.1 "Say hi back"

# Exec/agent mode for multi-step tasks
ra --exec "Summarize the repo layout and point out anything surprising."

# Run a longer task from a file (defaults to exec/agent mode)
ra --prompt-file /path/to/prompt.txt

# Use a local OpenAI-compatible server (e.g. Ollama: http://localhost:11434/v1)
ra --base-url "http://localhost:11434/v1" --api-key "local" --model "openai/gpt-4.1-mini" --exec "Explain what this repo does."

# Set your default model globally
RA_DEFAULT_MODEL="openai/gpt-4.1-mini" ra "Say hi back"

# Write logs somewhere specific
ra --log-dir /tmp/ra-logs --exec "List files."

# Emit JSONL log stream to stdout at the end
ra --json --exec "List files."

# Stream JSONL log events to stdout as they happen
ra --stream-json --exec "List files."

# Enable web browsing tools (off by default): web_search (Tavily), web_open, web_find.
export TAVILY_API_KEY="..."
ra --enable-search --exec --max-steps 25 "Find the latest release notes for Rust 1.75 and summarize them."

# Example of using open/find after a search:
ra --enable-search --exec "Search for 'Rust 1.75 release notes', open the official blog link, then find 'stabilized' and cite the line ranges."

Logs are written to a unique ra-<timestamp>-<session_id>.jsonl file in --log-dir (default: --cwd), or to --log-path if set. Format is a Codex exec --json-style JSONL stream with thread.started, turn.started, item.*, and turn.completed.

Install from source

cargo install --path ra

Build

Install targets:

rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl \
  x86_64-apple-darwin aarch64-apple-darwin

Linux:

cargo build --release --target x86_64-unknown-linux-musl
cargo build --release --target aarch64-unknown-linux-musl

macOS:

cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin

Optional universal macOS binary:

lipo -create -output ra-macos-universal \
  target/x86_64-apple-darwin/release/ra \
  target/aarch64-apple-darwin/release/ra

Cite

If you find ra helpful in your research or work, feel free to cite:

@misc{wang2026ra,
  title = {Ra: Baseline ReAct Agent},
  author = {Justin Wang},
  year = {2026},
  howpublished = {\url{https://github.com/justinwangx/ra-cli}},
}