coderlm
Make codex, gemini-cli, or any other coding agent into an RLM.
Install
# npm / bun
bunx coderlm@latest
npx coderlm@latest
# pypi
uvx coderlm
pipx run coderlm
Or install globally:
npm i -g coderlm # npm
uv tool install coderlm # pypi
Usage
coderlm <agent> --prompt "<task>" [--max-depth N] [--allowedTools TOOLS]
Examples
# Codex
coderlm codex --prompt "Find all TODO comments in src/"
coderlm codex --prompt "Find dead code in src/, lib/, and test/"
coderlm codex --prompt "Summarize the codebase" --max-depth 2
# Gemini
coderlm "bunx --bun @google/gemini-cli" --prompt "Review **/*.py for security issues"
coderlm "bunx --bun @google/gemini-cli" --prompt "Architecture overview of src/"
# Claude (non-recursive only — Claude cannot spawn nested Claude sessions)
coderlm claude --prompt "Fix type errors in src/" --allowedTools "Bash,Edit"
How It Works
- Build a system prompt with RLM instructions (discover, explore, decompose, aggregate)
- Inject context guards via
BASH_ENVso every bash subshell the agent spawns has output truncation active - Launch the agent with agent-specific flags for non-interactive execution
The agent starts with no file contents in context. It uses shell tools (fd, rg, cat, head, jq, etc.) to discover and inspect files as needed. For large file sets (>20 files), it spawns recursive sub-agents on subsets.
Context Guards (bundled)
bashrlm.sh is bundled and auto-activates for every agent run. It wraps high-output commands (cat, grep, rg, jq, find, ls, curl, etc.) with automatic truncation, preventing the agent from flooding its own context window with oversized output.
Truncation uses head+tail mode — the agent sees the start and end of any large output, with the middle omitted:
[TRUNCATED — showing 2000 of 15000 chars, first and last 1000]
Guards are redirect-aware: piping to a file (> /tmp/out.txt) bypasses truncation, so multi-step processing works naturally. The agent's system prompt includes instructions for this pattern.
Supported Agents
| Agent | Command | Notes |
|---|---|---|
| OpenAI Codex | codex |
Recommended — supports recursive sub-agents |
| Google Gemini | bunx --bun @google/gemini-cli |
Supports recursive sub-agents |
| Claude Code | claude |
Non-recursive only — cannot spawn nested Claude sessions |
| Any CLI | my-agent |
Combined prompt passed as single argument |
When to Use
- Many files to analyze (>10)
- Task benefits from divide-and-conquer
- Total content exceeds a comfortable context window
- You want the agent to explore strategically rather than read everything upfront
Metadata
Release files for coderlm 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| coderlm-0.2.1.tar.gz | 18.8 kB | Without provenance | Details for coderlm-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| coderlm-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for coderlm-0.2.1-py3-none-any.whl |
Total release size: 30.9 kB
Release files / coderlm-0.2.1.tar.gz
| Download URL | coderlm-0.2.1.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ae13f3c794d79fce05146385a128de0d4c4f00e15a0794d2908b2a4823ffd07
|
|
BLAKE2b-256 checksum How to use checksums |
2f602cef15e4cbdef6573c7da7ce5fd53bd1b4a37c1c08d5f7aed5e34c8c0c43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / coderlm-0.2.1-py3-none-any.whl
| Download URL | coderlm-0.2.1-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
502197f394ef3d8cd3051d9f797a8ddba7211957c99c085a67de518c442c06fc
|
|
BLAKE2b-256 checksum How to use checksums |
190ec5d059eb3d9dfbccdae4c99b091a65985c7c7267993bfbf7b5c61bf087cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for coderlm 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.