opencode-rlm
AI-powered development tool with TUI interface and Recursive Language Model (RLM) context management for unlimited conversation context.
Features
- RLM Context Management: Automatic context archival and retrieval enables conversations beyond context window limits
- Multi-Provider Support: Anthropic (Claude), OpenAI (GPT-4), and more
- Rich TUI Interface: Full-featured terminal UI with Textual
- 14 Built-in Tools: bash, read, write, edit, glob, grep, todo, webfetch, memory, and more
- Session Management: Fork, export, and manage conversation sessions
- Slash Commands:
/context,/search,/compact,/models,/agents
Installation
via npm (recommended)
npm install -g opencode-rlm
via pip
pip install opencode-rlm
From source
git clone https://github.com/tekcin/opencode-rlm.git
cd opencode-rlm
pip install -e .
Requirements
- Python 3.11+
- Node.js 16+ (for npm installation)
Usage
# Start the TUI
opencode
# Start with a specific project
opencode /path/to/project
# Continue last session
opencode --continue
# Run a single command (non-interactive)
opencode run "explain this codebase"
# List available models
opencode models
Configuration
Create ~/.config/opencode/config.json:
{
"model": "anthropic/claude-sonnet-4",
"theme": "opencode",
"rlm": {
"enabled": true,
"threshold_ratio": 0.33,
"auto_retrieve": true
}
}
Environment Variables
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...
RLM (Recursive Language Model)
RLM enables unlimited context by automatically:
- Tracking token usage across the conversation
- Archiving older context when threshold is reached (default: 33%)
- Retrieving relevant archived context for new queries
- Injecting context into the conversation seamlessly
Manual RLM Commands
/context- Show current token usage/search <query>- Search archived context/compact- Manually trigger context archival
RLM Tools
memory- Search and retrieve archived contextrlm_query- Execute Python queries on archived context
License
MIT
Author
Michael Thornton (tekcin@yahoo.com)
Metadata
Release files for opencode-rlm 0.1.0
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 |
|---|---|---|---|---|
| opencode_rlm-0.1.0.tar.gz | 81.7 kB | Without provenance | Details for opencode_rlm-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| opencode_rlm-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for opencode_rlm-0.1.0-py3-none-any.whl |
Total release size: 197.3 kB
Release files / opencode_rlm-0.1.0.tar.gz
| Download URL | opencode_rlm-0.1.0.tar.gz |
|---|---|
| Size | 81.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48e858c7a9795156a61f11215fee9f9b49741db6892738afdf63e1215e213add
|
|
BLAKE2b-256 checksum How to use checksums |
561bfed322dd042690a1c122537afa24ba56a67107c39308107325078e1bc750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Release files / opencode_rlm-0.1.0-py3-none-any.whl
| Download URL | opencode_rlm-0.1.0-py3-none-any.whl |
|---|---|
| Size | 115.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b4393b88d0760950b8fa99973a5a4daff3c4ecb86ad1520da8fcc7e95fc499ad
|
|
BLAKE2b-256 checksum How to use checksums |
dc6b3b45cdc00eef372a62a306b0e5ac268e7da997a09ad79939283ca81397fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.14
|
Security for opencode-rlm 0.1.0
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.