Skip to content
jimoto-no-llmPublic

About

Fast Rust launcher for DeepSeek Harness, with clear Claude Code/Codex migration, model setup and lightweight local tools

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

71 stars

Watchers

0 watching

Forks

Latest commit

 

History

601 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rdsh icon

rdsh — a fast, safe Rust launcher for dsh

ci dashboard docs release license rust

Japanese version

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.

Why rdsh?

  • ⚡ Sub-millisecond startup & low memory: --version launches in ~0.90 ms with ~2.9 MB peak memory, compared to ~88 ms and ~66 MB for Node.js-based dsh.
  • 🔄 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.

Table of Contents

Quick Start

1. Install (Prebuilt Binary)

Linux / macOS / WSL:

curl -fsSL https://github.com/jimoto-no-llm/rustdsh/releases/latest/download/install.sh | bash -s -- --from-release

Windows (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 -FromRelease

2. Verify & Setup

rdsh --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.

3. Start a Conversation

rdsh tui                        # start with TUI profile
# or
rdsh --profile web              # start with Web profile

Requirements

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

Installation

Building from Source & Advanced Options

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).

Usage

Running with dsh Compatibility

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 executed

When installed with ./install.sh --as-dsh, typing dsh automatically uses the fast rdsh launcher.

Fast Native Commands

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 dsh

Credential Management (rdsh auth)

Safely 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 interface

Note: rdsh never exports or syncs external credentials without explicit user command.

Agent Tool Isolation

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 tui

Only 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).

Hook Guard (rdsh guard)

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.

Web UI & Dashboard

Lightweight Local Web UI (rdsh serve)

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)

Extended Dashboard (rdsh-dashboard)

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.

Desktop App (Electron)

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 plugin

The 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 installation

Quit 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.

Using with Smart-DSH

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 enabled

Ports never collide (DSH Web: 3080, rdsh serve: 38080).

Benchmarks

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.

Safety Design

  1. Upstream Fidelity: Never reimplements conversation loops or agent logic; delegates directly to upstream dsh.
  2. Non-Destructive: Read operations (tokens, search, session listing, compacting) never modify source files.
  3. Explicit Auth: Credentials are never sent externally or synced automatically; only user-approved items are imported.
  4. Tool Sandboxing (opt-in): On Linux, --share-file mounts only the files you share, read-only and without network, so the model never touches the rest of the host.

FAQ

  • Q. Do I need the original dsh installed?
    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 dsh command?
    Yes. Install with ./install.sh --as-dsh (or .\install.ps1 -AsDsh on Windows) to shadow dsh transparently. Revert anytime with --restore.

  • Q. What if there is a port collision?
    Upstream DSH Web uses :3080 while rdsh serve defaults 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 upstream dsh.

Documentation

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

Community

Credits

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:

License

MIT — see LICENSE. Upstream DeepSeek Harness and its dependencies retain their respective licenses.

About

Fast Rust launcher for DeepSeek Harness, with clear Claude Code/Codex migration, model setup and lightweight local tools

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

71 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages