rein is a minimal terminal coding agent built on DeepSeek Harness (dsh). It keeps the runtime focused by composing dsh's public capabilities and targets Linux ARM64 and macOS ARM64, with RISC-V64 support where the selected dsh providers are available.
- Interactive terminal sessions and one-shot prompts.
- dsh's shell tool for bounded commands and its persistent Bash tool over the PTY seam.
- dsh's filesystem, editor, task, skill, goal, plan, subagent, and terminal tools when they are mounted by the active preset.
- A line-oriented command surface covering session, workspace, model, provider, settings, permissions, skills, plugins, and trace operations.
- Append-only JSONL sessions compressed with zstd.
- Project-local sessions and traces, plus user presets.
- Command approval through
dsh-user-approval. - A single built-in
minimalpreset composed from public dsh modules.
Node.js 24 or newer is required.
pnpm add -g @processmission/reinStart an interactive session:
reinThe REPL uses ❯ for a new input and … for continuation. End a physical
line with \ to continue the same logical prompt on the next line. Accepted
input is recalled per workspace from the private ~/.rein/history.jsonl file.
Type / or a slash-command prefix and press Tab to complete a registered
command. Multiple candidates are shown as aligned command/description rows,
bounded to the terminal width and twenty entries. Candidates come from the
active dsh command registry. Enter / or use /help <text> for the searchable
command catalog; discovered skills remain available through completion and
/skills without flooding Help.
The command surface includes /status, /resume, /tree, /fork, /trace,
/workspace, /settings, /model, /preset, /skills, /plugins, and
/help. Commands that need a picker print a numbered list and accept a number
or an exact name. /trace inspect <seq> and /trace aggregate provide text
diagnostics for the current session.
!command runs a local command through dsh's shell seam and prints its output;
!!command also sends the captured output back as model context.
Run one prompt and exit:
rein --ask "run the tests"
# short aliases:
rein "run the tests"
rein ask "run the tests"Resume a persisted session:
rein ask --resume <session-id> "continue from the last step"Useful run-time options:
--model <id> Select a model for this run.
--preset <id> Select a preset for this run.
--resume <id> Resume a persisted session.
--config <path> Use an alternate cordis.yml.
--yes Automatically approve dsh approval requests.
--version Print the version.
--help Print command help.
Use --yes only when the invocation is already trusted. In non-interactive
input, approval fails closed unless this option is present.
- Credentials come from
DEEPSEEK_API_KEYfirst, then~/.rein/.credentials.yaml. The credentials file is expected to be mode0600, is hot-reloaded, and is always global. - The Harness home is relocated by setting
DSH_HOME=~/.rein. dsh therefore keeps its original names under that root:settings.yaml,.credentials.yaml,.env,skills/, and.agent-presets/. rein adds its directcordis.yml, preferences,history.jsonl, and fallback data there. - A project opts in by creating
.rein; projectskills/,sessions/, andtraces/stay local. Project settings, credentials, compositions, and presets are not separate layers. --configoverrides the global~/.rein/cordis.ymlfor one run.- The only built-in preset is
minimal. dsh discovers and authors user presets through~/.rein/.agent-presets.
Ordinary commands use the dsh shell seam. Work that requires persistent state or interactive stdin uses dsh's line-oriented terminal capability. rein does not provide a second shell or PTY implementation; a deployment must declare the dsh provider required by the selected preset.
pnpm install
pnpm lint # TypeScript checks
pnpm test # Build and run the complete test suite
pnpm build # Build dist/bin.jsTo run the local build without installing it globally:
pnpm build
./dist/bin.js --helpThe same flow is available through the Makefile:
make run
make run ARGS='ask "run the tests"'
make cli ARGS='--ask "run the tests"'
make cli ARGS='"run the tests"'
make cli ARGS='--model deepseek-v4-flash "inspect this project"'Architecture decisions are recorded in DESIGN.md. Development conventions are in AGENTS.md.
MIT