Skip to content

Repository files navigation

rein

rein is a minimal terminal coding agent built on DeepSeek Harness (dsh). It runs on a pure JavaScript runtime, adds no native dependencies, and targets Linux ARM64 and RISC-V64.

中文文档

Features

  • Interactive terminal sessions and one-shot prompts.
  • A persistent Bash tool that keeps shell state between calls.
  • str_replace_editor for controlled file edits.
  • Append-only JSONL sessions compressed with zstd.
  • Project-local settings, sessions, traces, and user presets.
  • High-risk command approval through dsh-user-approval.
  • A single built-in minimal preset with a pure JavaScript runtime.

Install

Node.js 24 or newer is required.

pnpm add -g @processmission/rein

Use

Start an interactive session:

rein

Run one prompt and exit:

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 high-risk commands.
--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.

Configuration and data

  • Credentials come from DEEPSEEK_API_KEY first, then ~/.rein/.credentials.yaml. The credentials file is expected to be mode 0600 and is hot-reloaded.
  • Home settings are stored in ~/.rein/settings.yaml. A project-level .rein/settings.yaml overrides the home layer by namespace and key.
  • The first run creates the default composition at ~/.rein/cordis.yml. Pass --config to use another composition file.
  • With a project marker, sessions and traces live under .rein/{sessions,traces}. Without one, they fall back to ~/.rein/{sessions,traces}.
  • The only built-in preset is minimal. User presets are copied into ~/.rein/presets and do not modify the built-in files.

The Bash backend uses a persistent pipe and has no pseudo-terminal. Programs that require an interactive TTY may behave incompletely; long-running work should be started in the background or with the detached option exposed by the tool.

Develop

pnpm install
pnpm lint       # TypeScript checks
pnpm test       # Build and run the complete test suite
pnpm build      # Build dist/bin.js

To run the local build without installing it globally:

pnpm build
./dist/bin.js --help

Architecture decisions are recorded in DESIGN.md. Development conventions are in AGENTS.md.

License

MIT

About

The rein of DeepSeek Harness — a minimal, Unix-shell-like TUI built as a plugin

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages