• Nix 82.1%
  • JavaScript 17.9%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-09-08 08:54:45 -04:00
pkgs Update pkgs/dsh.nix 2026-09-08 08:54:45 -04:00
flake.lock init 2026-09-07 13:46:18 -04:00
flake.nix init 2026-09-07 13:46:18 -04:00
overlay.nix dsh: build and wire dsh-llm-opencode-go-session into the package 2026-09-07 16:08:17 -04:00
README.md docs: document the bundled opencode session plugin 2026-09-07 16:09:48 -04:00

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 cordisPatch on purpose: a patch argument would be silently auto-filled by callPackage with pkgs.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-plugins is an included example you can test with nix 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.