spanexx-rlm
v0.1.5
Published
RLM CLI (Go) for searching and chunking large context files
Readme
RLM
rlm is a fast Go CLI for working with large context files: listing files, searching text, peeking byte ranges, and chunking files for LLM/agent workflows.
Install
npm (recommended)
Requires Go to be installed (the package builds the Go binary during install).
npm install -g spanexx-rlm@latest
rlm --versionFrom source
go build -o rlm ./cmd/rlm
./rlm --helpQuick start
1) Set your context directory
The context directory is where you keep your large files.
Precedence:
--dir > RLM_CONTEXT_DIR > workspace config > global config > default
Default:
<workspace>/large context files
Examples:
# Per-workspace
rlm config set --scope workspace --context-dir "/absolute/path/to/large context files"
# Global
rlm config set --scope global --context-dir "/absolute/path/to/large context files"
# Verify
rlm config show --json2) List files
rlm files3) Search
JSON output is default (agent-friendly).
rlm search --query "SOFTBANK"
rlm search --query "term" --ignore-case
rlm search --query "EX-2\\.1" --regex
rlm search --query "term" --max-matches 20 --max-per-file 5Exit codes:
0matches found1no matches2error
4) Peek (byte ranges)
rlm peek "somefile.txt" --start 0
rlm peek "somefile.txt" --start 0 --end 2000
rlm peek "somefile.txt" --start 0 --end -1 # to EOF5) Chunk
rlm chunk "somefile.txt" --size 200000 --overlap 2000
rlm chunk "somefile.txt" --size 200000 --overlap 2000 --out "/tmp/rlm-chunks"Docs
rlm readmeRepository
- Repo URL:
https://github.com/spanexx/RLM.git - npm package:
spanexx-rlm
Repository structure
.
├── .agent/
│ └── skills/
│ └── rlm/
│ └── SKILL.md
├── cmd/
│ └── rlm/
│ └── main.go
├── internal/
│ ├── rlmchunk/
│ ├── rlmconfig/
│ ├── rlmfiles/
│ └── rlmsearch/
├── scripts/
│ └── postinstall.js
├── large context files/
├── LICENSE
├── package.json
└── deployment.mdLicense
MIT — see LICENSE.
