An independent community project; not an official DeepSeek or DeepSeek Harness project.
rdsh is a fast, safe launcher for DeepSeek Harness (dsh).
It ports frequently used CLI operations (token calculation, code search, session management) to native Rust, while delegating conversation workflows and model execution transparently to upstream dsh. All existing arguments and options continue to work as-is.
- ⚡ Sub-millisecond startup & low memory:
--versionlaunches in ~0.90 ms with ~2.9 MB peak memory, compared to ~88 ms and ~66 MB for Node.js-baseddsh. - 🔄 100% Drop-in Compatible: Subcommands that are not rdsh-native are passed straight to upstream
dsh. Existing scripts and workflows keep running unchanged. - 🛠 Fast Native Utilities: Estimate tokens, search code, list sessions, and run health diagnostics (
rdsh doctor) instantly without starting Node.js. - 🛡 Safe by Default: Read-only commands never mutate files, credentials are never automatically synced or exported, and agent tools can be confined to explicitly shared files on Linux.
- Quick Start
- Requirements
- Installation
- Usage
- Web UI & Dashboard
- Using with Smart-DSH
- Benchmarks
- Safety Design
- FAQ
- Documentation
- Community
- Credits
- License
Linux / macOS / WSL:
curl -fsSL https://github.com/jimoto-no-llm/rustdsh/releases/latest/download/install.sh | bash -s -- --from-releaseWindows (PowerShell):
$f = Join-Path $env:TEMP 'rdsh-install.ps1'
Invoke-WebRequest -Uri https://github.com/jimoto-no-llm/rustdsh/releases/latest/download/install.ps1 -OutFile $f -UseBasicParsing
& $f -FromReleaserdsh --version && rdsh doctor # verify install and original dsh
rdsh setup # interactive setup (or rdsh setup --web for browser UI)Note: If you have an existing login from Codex CLI (ChatGPT OAuth) or opencode, import it with rdsh auth --import --provider openai-codex.
rdsh tui # start with TUI profile
# or
rdsh --profile web # start with Web profile| Item | Detail |
|---|---|
| OS | Linux, macOS, WSL, Windows (native) |
| DSH runtime | Required for conversations and agent runs (native tools and diagnostics run standalone) |
| Rust | 1.85+ (only needed when building from source; prebuilt binaries require no Rust) |
| Optional | Node.js 22+ for the Node.js dashboard; SearXNG for search-web |
Linux / macOS / WSL:
git clone https://github.com/jimoto-no-llm/rustdsh.git
cd rustdsh
./install.sh # build + install to ~/.local/bin/rdsh
./install.sh --as-dsh # also replace `dsh` command (original backed up as dsh-orig)
./install.sh --restore # undo the replacement
./install.sh --prefix=DIR # custom install directory (default: ~/.local/bin)Windows (PowerShell):
git clone https://github.com/jimoto-no-llm/rustdsh.git
cd rustdsh
.\install.ps1 # build + install to %LOCALAPPDATA%\rdsh\bin
.\install.ps1 -AsDsh # also replace `dsh` command
.\install.ps1 -Restore # undo the replacement
.\install.ps1 -Wsl # also install inside WSL via install.sh| OS | Script | Notes |
|---|---|---|
| Linux / macOS | ./install.sh |
Needs cargo or curl (guided via rustup if missing). |
| WSL | ./install.sh inside distro |
Auto-detects WSL. install.ps1 -Wsl installs in both environments. |
| Windows (native) | .\install.ps1 |
Needs Rust and MSVC build tools (winget install Rustlang.Rustup). |
Run any standard dsh command unchanged:
rdsh tui # equivalent to: dsh --profile tui
rdsh --profile web --patch x.yml # launch with configuration overlay
rdsh --dry-run tui -- --resume id # print what would be executedWhen installed with ./install.sh --as-dsh, typing dsh automatically uses the fast rdsh launcher.
Native tools execute in Rust without starting Node.js:
rdsh tokens ./README.md # estimate token count (~4 chars = 1 tok, CJK = 1 tok each)
echo "..." | rdsh prune --max-tokens 4000 # prune context within a token budget
rdsh search TODO --dir . --max 100 # fast parallel text search
rdsh sessions --limit 20 --tokens # list sessions and unpacked token estimates
rdsh compact ./s.jsonl # compact session JSONL (source remains untouched)
rdsh doctor # check health of dsh, environment, and paths
rdsh profiles / rdsh skills # list available profiles and skills
rdsh desktop status # detect the DeepSeek Harness Desktop app and profile
rdsh bench --n 5 # benchmark startup speed between rdsh and dshSafely import credentials from other tools into $DSH_HOME/.credentials.yaml:
rdsh auth # inspect recognized login status
rdsh auth --import --provider openai-codex # import credentials from Codex CLI or opencode
rdsh setup # interactive setup wizard
rdsh setup --web # browser-based setup interfaceNote: rdsh never exports or syncs external credentials without explicit user command.
Delegated agent tools keep normal file access by default: the model reads and writes the project like any other tool. On Linux (with bubblewrap and prlimit) you can instead confine them to files you explicitly share:
rdsh --share-file README.md --share-file src/main.rs --profile tuiOnly the shared files are mounted read-only, host files stay out of reach and
the sandbox has no network. Turn the same boundary on for every run with
rdsh features on agent_tool_sandbox (off again with
rdsh features off agent_tool_sandbox, or force it with RDSH_SECURITY=1).
Integrates with DSH hooks.json to inspect and block dangerous commands before execution:
echo "$input" | rdsh guard --deny "rm -rf /*" --deny "*token*"{
"hooks": {
"PreToolUse": [
{ "matcher": "Bash", "hooks": [{ "type": "command", "command": "rdsh guard --deny \"rm -rf /*\"" }] }
]
}
}Native execution overhead is ~1 ms per invocation.
A lightweight status and token estimation page running on localhost (default :38080, does not conflict with DSH :3080):
rdsh settings set extras.enable serve # enable the server feature
rdsh serve # launch (bound to localhost, protected with a one-time token)Optional Node.js dashboard for project metrics, human-in-the-loop Q&A, and mobile access (requires Node.js 22+):
rdsh-dashboard project --project <directory>On native Windows, the dashboard runs in the system tray and can be opened or stopped from the taskbar (--no-tray keeps it in the terminal). See dashboard/README.md.
DeepSeek Harness Desktop is an Electron shell around the complete Web
application. It shares $DSH_HOME with the CLI but owns a reserved profile
($DSH_HOME/profiles/desktop) and its own bundled command runtime, so the npm
dsh CLI cannot manage its plugins. rdsh desktop detects all of that and
forwards plugin attachment to the app's own command — rdsh never boots or
rewrites the profile:
rdsh desktop status # app, command runtime, profile, plugin state (read-only)
rdsh desktop install --plugins-dir . # attach rdsh-settings to the desktop profile
rdsh desktop install --plugins-dir . --compute # + the resident compute bridge
rdsh desktop verify # exit nonzero when the profile has no rdsh pluginThe same is available through the profile installer and the installers:
PROFILE=desktop ./plugins/install.sh # every recommended package, forwarded correctly
./install.sh --desktop # attach the rdsh plugins during installationQuit the app before attaching plugins, reopen it afterwards. The app's own Plugins page installs the same packages without any command. The Electron runtime itself is never replaced: in-app delegation stays limited to the opt-in, fail-open compute bridge. See DESKTOP-INTEGRATION.md.
Smart-DSH (a web-profile plugin bundle) works smoothly alongside rdsh:
rdsh doctor # check dsh version and Smart-DSH bundles
rdsh plugin --profile web add /path/to/bundle # add plugins
rdsh --profile web # boot web with plugins enabledPorts never collide (DSH Web: 3080, rdsh serve: 38080).
Measurements conducted on Linux x86_64:
| Benchmark | rdsh | Upstream dsh / Baseline | Improvement |
|---|---|---|---|
--version startup |
~0.90 ms | ~88 ms | ~98x faster |
--version peak RSS |
~2.9 MB | ~66 MB | ~1/23 memory |
| Hook-equivalent memory | ~2.7 MB | ~45 MB (Node equivalent) | ~1/16 memory |
Code search (search) |
~17 ms | ~41 ms | ~2.4x faster |
Token estimate (tokens) |
~12 ms | ~35 ms | ~2.9x faster |
Session list (sessions --tokens) |
~0.41 s | ~1.65 s | ~4.0x faster |
| Binary size | ~1.97 MB (single binary) | ~508 MB (Node tree) | Ultra compact |
Reproduce with rdsh bench --n 5. See docs/BENCHMARKS.md for detailed test setups and measurements.
- Upstream Fidelity: Never reimplements conversation loops or agent logic; delegates directly to upstream
dsh. - Non-Destructive: Read operations (tokens, search, session listing, compacting) never modify source files.
- Explicit Auth: Credentials are never sent externally or synced automatically; only user-approved items are imported.
- Tool Sandboxing (opt-in): On Linux,
--share-filemounts only the files you share, read-only and without network, so the model never touches the rest of the host.
-
Q. Do I need the original
dshinstalled?
Yes, for conversations and agent execution. Standalone commands like token calculation, file search, and health checks (rdsh doctor) work without it. -
Q. Can I replace my existing
dshcommand?
Yes. Install with./install.sh --as-dsh(or.\install.ps1 -AsDshon Windows) to shadowdshtransparently. Revert anytime with--restore. -
Q. What if there is a port collision?
Upstream DSH Web uses:3080whilerdsh servedefaults to:38080. To pick an arbitrary free port, specify--port 0. -
Q. Will my existing scripts break?
No. Any argument not belonging to an rdsh-specific command is forwarded verbatim to upstreamdsh.
| Document | Description |
|---|---|
| docs/USER-FLOW.md | End-to-end installation, usage, and recovery flow |
| docs/ARCHITECTURE.md | Architecture design and delegation model |
| docs/BENCHMARKS.md | Benchmark methodology and reproduction steps |
| docs/RDSH-SETTINGS.md | Settings UI and CLI options |
| docs/DESKTOP-INTEGRATION.md | DeepSeek Harness Desktop (Electron) integration |
| docs/ROADMAP.md | Project roadmap and planned capabilities |
| docs/RELEASING.md | Release procedures |
| CHANGELOG.md | Changes per version |
- Contributions: See CONTRIBUTING.md.
- Issues & Ideas: Issue tracker (Japanese or English).
- Security: Please report vulnerabilities privately according to SECURITY.md.
- Support: SUPPORT.md / Code of Conduct: CODE_OF_CONDUCT.md.
DeepSeek Harness provides the upstream runtime; without it, rustdsh would not exist. Thanks to the upstream developers and everyone contributing code, reviews, tests, and ideas:
- Icon by PENTACoXIAN
- Security reports & review: GrEarl, PENTACoXIAN
- Contributions & validation: StudioYebisu, RNA4219, eightman999
- Ideas & feedback: @remydre8
MIT — see LICENSE. Upstream DeepSeek Harness and its dependencies retain their respective licenses.