Baseline ReAct agent CLI (prebuilt binary installer).
npm install react-agent-cliThis npm package installs the ra CLI.
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
Install:
``sh`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.RA_VERSION
Set to pin a tag.
Set your OpenRouter API key:
`sh`
export OPENROUTER_API_KEY="..."
Run a quick one-liner task (defaults to no-submit mode; exits on the first assistant response):
`sh`
ra "Summarize the repo layout."
- Modes:
- Single-shot (default): ra "PROMPT" exits after the first assistant responsera --exec ...
- Exec/agent: (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.
`shSingle-shot (default)
ra "Say hi back"
Logs are written to a unique
ra- 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
`sh
cargo install --path ra
`Build
Install targets:
`sh
rustup target add x86_64-unknown-linux-musl aarch64-unknown-linux-musl \
x86_64-apple-darwin aarch64-apple-darwin
`Linux:
`sh
cargo build --release --target x86_64-unknown-linux-musl
cargo build --release --target aarch64-unknown-linux-musl
`macOS:
`sh
cargo build --release --target x86_64-apple-darwin
cargo build --release --target aarch64-apple-darwin
`Optional universal macOS binary:
`sh
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:`BibTeX
@misc{wang2026ra,
title = {Ra: Baseline ReAct Agent},
author = {Justin Wang},
year = {2026},
howpublished = {\url{https://github.com/justinwangx/ra-cli}},
}
``