- Nix 82.1%
- JavaScript 17.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| pkgs | ||
| flake.lock | ||
| flake.nix | ||
| overlay.nix | ||
| README.md | ||
dsh — DeepSeek Harness Nix package
This repository provides a Nix package for the DeepSeek Harness (dsh) CLI. It includes an overlay, flake outputs, a dev shell, and a plugin catalog. This repo is exclusively for packaging dsh.
Usage
We recommend using this as an overlay so it builds with your local nixpkgs:
# In your nixpkgs config:
pkgs = import nixpkgs {
overlays = [ inputs.dsh-pkgs.overlays.default ];
};
# Use pkgs.deepseek-harness in your buildEnv or home.packages
You can also use it directly as a flake input:
# Per-system (flake-parts):
inputs'.dsh-pkgs.packages.dsh
# Or legacyPackages:
inputs'.dsh-pkgs.legacyPackages.${system}.deepseek-harness
# Or run/install directly:
nix run github:you/dsh-pkgs#dsh
nix profile install github:you/dsh-pkgs#dsh
To open a dev shell for building against the upstream source:
nix develop /path/to/this/repo#
Plugins
The repository provides a plugin catalog at pkgs.dshPlugins.
pkgs.deepseek-harness.override {
plugins = [
pkgs.dshPlugins.dsh-about
pkgs.dshPlugins.bundle-example
];
# Nix-based cordis patch entries for configuration:
cordisPatch = [
{ id = "timer"; config = { root = [ "." ]; }; }
{ id = "hmr"; disabled = true; }
{ insert = [ { id = "x"; name = "@deepseek-ai/dsh-llm"; config = { }; } ]; }
];
}
Named
cordisPatchon purpose: apatchargument would be silently auto-filled bycallPackagewithpkgs.patch(GNU patch).
- Catalog objects: These are independent packages. Adding a plugin just combines store paths without rebuilding the large base store.
cordisPatch: Use Nix data to override, disable, or insert configuration. This converts to YAML at build time. For complex JS expressions, you can still use a YAML file directly (plugins = [ { patch = ./file.yml; } ]).pkgs.dsh-with-pluginsis an included example you can test withnix run .#dsh-with-plugins.
Bundled plugin: dsh-llm-opencode-go-session
pkgs.dshPlugins.dsh-llm-opencode-go-session (active by default in the dsh package)
registers an OpenCode Go provider route whose every inference request carries
x-opencode-session: <conversation id> — required by OpenCode's managed
inference gateways since 2026-09-05. The catalog entry carries peers
(@deepseek-ai/dsh-llm, @earendil-works/pi-ai), which the dsh derivation
links into apps/cli/node_modules so the plugin's bare imports resolve.
Configure the model route as opencode-go and keep it out of llm-pi-ai
settings (adapter routes are exclusive).
Updating
To update the dsh input:
nix flake lock --update-input dsh
You only need to manually update the dependency hash (pnpmDeps.hash in pkgs/dsh.nix) if the upstream pnpm-lock.yaml changes. To find the new hash:
nix build /path/to/this/repo#dsh 2>&1 | grep ' got: '
Just copy the printed hash into pnpmDeps.hash.