CLI tool
T-Auto/dsh-ops avatar
T-Auto/dsh-ops

dsh-ops for Windows DSH: Bash, Rust Files, and PTC

A toolkit for low-level operations in DSH, designed to reduce token usage and task execution time / DSH 底层操作工具插件,旨在减少 Token 消耗与任务耗时

4,124 stars121 forksJavaScriptMIT

At a glance

What is it?
dsh-ops is a Windows x64 plugin for DSH that supplies isolated shell payloads, Rust-based file tools, background process management, and optional PTC batch processing. It is aimed at DSH users who want lower tool-output overhead and more predictable execution, but version 0.3.0 does not support Linux, macOS, or ARM64.
Who is it for?
Adopt dsh-ops when the target is Windows x64, DSH 0.2.0-rc.2, and the bundled shell or Rust tools fit the workflow. Do not choose it for other operating systems, architectures, or unrestricted shell fallback.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository received new commits within the last day.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 24, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Why dsh-ops targets DSH execution overhead

dsh-ops addresses a specific problem in Windows DSH: repeated shell errors and verbose tool interactions can consume tokens and delay task completion. The repository describes the project as a low-level operations toolkit, not a general operations or DevOps plugin. Its intended users are DSH users working on Windows who control code, files, and system processes through an AI agent.

The project uses progressive disclosure to keep unnecessary tool definitions out of the system prompt. It also supplies independent bash and PowerShell 7 payloads, plus Rust implementations for file retrieval and batch processing. The README says these choices are intended to reduce input and output overhead and to reduce avoidable error loops. The repository includes a self-use benchmark claiming 97% token reduction against Windows standard mode and 65% against Linux native PTC mode, but the README does not provide enough benchmark detail to treat those figures as a general performance guarantee.

The scope is narrower than the name might suggest. dsh-ops is not a full terminal replacement and does not change the system default terminal, the system PATH, or the host application's existing shell tool names. Instead, it changes what DSH presents to the model, especially by prioritizing `ops_bash` and falling back to the host `pwsh` tool when needed. This distinction matters for users who want plugin-scoped execution controls without altering their Windows environment.

How the dsh-ops component architecture routes work

The bundle declares four separately controlled components. `dsh-ops/shell` is enabled by default and publishes `ops_bash`; it also gives the host `pwsh` access to the bundled PowerShell 7. `dsh-ops/file` is also enabled by default and publishes four Rust file tools whose exact names and parameters are documented in the repository's component reference, although those names are not included in the README excerpt shown here.

`dsh-ops/background` is disabled by default. It is intended for long-running work such as research simulations, model training, and other long processes, with tools for starting a task, reading output, listing tasks, and terminating them. `dsh-ops/ptc` is disabled by default and is loaded only for a pure PTC session. Its published tools are `ops_batch` and `ops_result`. PTC means bounded result references in this project, with the native Rust worker and safe batch processing supplied as separate components.

The documented execution order is tool bundle first, then bash, then PowerShell 7. That order gives the model a preferred shell path without removing the existing host tool. The components can be enabled or disabled independently, so an installation can start with the shell and file components while leaving background jobs and PTC inactive. The README points readers to `docs/组件参考.md` and `docs/配置参考.md` for the complete argument, configuration, and permission model.

Installing dsh-ops on a Windows DSH profile

Version 0.3.0 supports Windows x64 and targets DSH `0.2.0-rc.2`. The package metadata also restricts the published package to Windows x64. The target DSH application must already be initialized, and Node.js must satisfy `^22.19 || >=24`.

The README gives two installation routes. The plugin market route is described as recommended: search for the npm package name `dsh-ops` in the target DSH application's plugin market, install it, and select enable. The command-line route requires an explicit profile. This installs the latest package into the `desktop` profile, which the README identifies as the profile used by the desktop application.

bash
npx --yes dsh-ops@latest install --profile desktop

After installation, use the status command to inspect the selected profile before relying on any component. Confirm that the profile is the intended one and that the required component state matches the expected setup.

bash
npx --yes dsh-ops@latest status --profile desktop

The desktop CLI path is normally discovered at `%LOCALAPPDATA%\Programs\DeepSeek Harness\resources\runtime\cli\bin\dsh.cmd`. If the application is elsewhere, the README documents the `--dsh-cli` option. Do not confuse this bundled desktop CLI with an ordinary DSH CLI, because the README states that an ordinary CLI cannot manage the reserved `desktop` profile. The same command structure can target `web` or `tui`, but `tui` refers to the `dsh-tui` profile, not the older `tui` directory.

Payload failures and permission boundaries in dsh-ops

The installation can finish with exit code 0 even when a native payload is absent. The README identifies `bash-win32-x64` as one of three pinned optional dependencies. If the package registry does not contain the platform package, the package manager silently skips it and the install still completes. Therefore, a zero exit code alone does not prove that every shell or native payload is present.

The missing `node_modules/@dsh-ops/bash-win32-x64` package is not automatically an installation failure. The project expects operators to inspect the documented fallback and status paths rather than immediately changing security configuration. The README specifically warns against `allowSystemShellFallback: true`. That setting changes the security posture by using an unpinned system bash. During the first upgrade startup, configuration migration changes the setting back to `false`, so treating it as a permanent repair would also conflict with the documented migration behavior.

`bashPath` is effective only under `danger-full-access`. In read-only mode and workspace-only modification mode, dsh-ops runs the fixed-digest bundled or provisioned bash. The bundled Git for Windows bash is expected to return `EXECUTOR_UNAVAILABLE` in those restricted modes. This is a deliberate permission boundary, not a general shell installation defect. Users who need a different system shell should not solve a permission failure by weakening the fallback policy.

Background jobs and PTC are opt-in in dsh-ops

Background task management and PTC are useful when an agent needs to keep work running or condense batch results, but neither component is enabled on first installation. Background management provides start, output, list, and terminate operations for long processes. The README names research simulations and model training as examples, which indicates that this component is aimed at work that outlives a single foreground command.

PTC is more restrictive in operation. The native Rust file and PTC workers are included with the package, but PTC remains off until it is explicitly enabled. A pure PTC session loads `ops_batch` and `ops_result`; `ops_result` represents bounded result references rather than an unrestricted dump of process output. The detailed design and usage are assigned to `docs/native-ptc.md`.

This opt-in model reduces prompt and tool exposure for sessions that do not need those capabilities. It also means that an apparently successful default installation will not provide background execution or PTC tools. The relevant configuration must be changed, and the application restarted or hot-loaded, before those tools become available. The README does not claim that enabling PTC removes all output limits, and it does not document a general rollback procedure.

dsh-ops versus ordinary DSH shell execution

The practical alternative is to run DSH with its ordinary Windows shell tools and handle file retrieval and long-running commands without dsh-ops. That approach avoids the plugin's Windows x64 restriction, optional native payloads, profile installation, and separate component configuration. It is simpler when the surrounding workflow already works with the host `pwsh`, and it does not require the plugin's bundled bash.

dsh-ops takes a different approach. It provides a preferred bash tool, keeps PowerShell 7 as a fallback, and packages Rust file and PTC workers. The documentation also describes permission-aware execution intended to align tool use with DSH access rules. In exchange, the user must manage profiles, inspect optional dependency installation, understand restricted-mode behavior, and accept that the latest release is tied to Windows x64 and DSH `0.2.0-rc.2`.

The choice therefore depends on whether the token and output overhead of the existing shell is a recurring problem. If it is, the plugin offers a concrete mechanism rather than a general prompt recommendation. If the main requirement is cross-platform execution, the README makes dsh-ops a poor fit because Linux, macOS, and ARM64 support are deferred to later versions.

License, release cadence, and upgrade considerations

The plugin source is distributed under `MIT AND Apache-2.0`. Most source is under MIT, while the vendored `vendor/fastctx/` code is under Apache-2.0. The Windows payload packages retain their upstream licensing. Git for Windows includes GPL components, and PowerShell includes MIT and third-party components. The repository keeps provenance and original license notices with those payloads, as described in `PROVENANCE.md`. Organizations should review the notices when redistribution or compliance tracking matters, but this article does not provide legal interpretation.

The repository is not archived, and the last push was on 2026-10-15. Recent releases include `v0.3.0` on 2026-10-14, `v0.2.9` on 2026-10-11, and `v0.2.8` on 2026-10-10. Those dates show recent release activity, but they do not establish compatibility with every DSH version or guarantee that future upgrades will preserve configuration behavior.

An upgrade can involve configuration migration. The README states that `allowSystemShellFallback: true` is changed back to `false` during the first upgrade startup. It also says the migration completion marker should not be deleted, because deleting it causes the self-check to run again. Operators who rely on background jobs or PTC should review the component documentation before upgrading from an earlier release, especially if they have edited shell or fallback settings.

Editorial conclusion

Adopt dsh-ops when the target is Windows x64, DSH 0.2.0-rc.2, and the bundled shell or Rust tools fit the workflow. Do not choose it for other operating systems, architectures, or unrestricted shell fallback. Verify the selected profile, optional payload availability, permission mode, and PTC state first; the documented desktop install command and the installed component status are the concrete first checks.

Frequently asked questions

What platforms does dsh-ops support?

Version 0.3.0 supports Windows x64 and targets DSH `0.2.0-rc.2`. Linux, macOS, and ARM64 support are deferred to later versions.

How do I install dsh-ops for the DSH desktop application?

The README documents `npx --yes dsh-ops@latest install --profile desktop` for an initialized desktop application. It also requires Node.js `^22.19 || >=24` and says to use the desktop application's bundled CLI.

Why might bash-win32-x64 be missing after installation?

The README says `bash-win32-x64` is a pinned optional dependency, so a registry that lacks the platform package may cause it to be skipped while installation still exits with code 0. It recommends checking the documented fallback and status paths rather than setting `allowSystemShellFallback: true`.

Official sources

  1. Issues
  2. README
  3. Releases
  4. T-Auto/dsh-ops on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/t-auto-dsh-ops.svg)](https://hysenlabs.com/projects/t-auto-dsh-ops)

Was this useful?