DeepSeekSoftwareShipping codeAI score · 82/100AI-assisted edit · no obvious prompt-injection riskGitHub

Install envsel to select Python/R environments per session

Install a DeepSeek Harness plugin to bind Python, R, or CLI environments per session, supporting conda, standalone installs, WSL, or custom paths

Some experienceStepsTip
Who
Developers using DeepSeek Harness who need to switch Python/R/CLI environments across sessions
You get
After installing the plugin, select and pin a runtime environment at the session level; the model executes in that environment from the very next turn
You need
DeepSeek

Constraints

Prerequisites: DeepSeek Harness 0.1.7-rc.1 or newer installed, with pnpm on PATH. The plugin installs via `dsh plugin` without source patching or monorepo checkout. After installation, restart `dsh web` and open an existing session; the Env dropdown appears in the conversation header, and `/env` plus `session_env` are immediately available. Selections are persisted per-session in local `$DSH_HOME/envsel-state.json`, not in the session log.

What they did

Author beihzb developed and open-sourced the dsh-envsel plugin for DeepSeek Harness, enabling per-session selection of Python, R, and CLI tool environments. The plugin is distributed via npm and installs directly with `dsh plugin add` without modifying DSH source code.

How it went

The author reports that the plugin implements the `/env` chat command, `session_env` model tool, header Env dropdown, per-turn runtime context injection, and cross-platform environment auto-discovery (conda, standalone R, WSL, custom paths). Environment selections persist across restarts per session.

Worth knowing

Version compatibility: DSH 0.1.7-rc.1 or newer is required to load; 0.2.0-rc.1 or newer is needed for the runtime context block (registerContext). For DSH 0.1.0-rc.7 through 0.1.5-rc.x, install `@beihaizb/[email protected]` instead. WSL scanning runs only on Windows and is automatically skipped on non-Windows hosts. Optional configuration: adjust listTtlMs, condaCommand, wslEnabled, registerTool, registerContext, etc. in your profile's cordis.patch.yml. Selections are stored in a local JSON file, not the session log, so they do not migrate with session export/import.

Steps

  1. Install the plugin

    Run the install command in your terminal to add envsel to the DSH web profile.

    Execution prompt · Source text。Terminal command line to install the envsel plugin into the DSH web profile

    dsh plugin --profile web add @beihaizb/dsh-envsel
  2. Restart DSH and verify the UI

    Restart `dsh web`, open an existing session, and check whether the Env dropdown appears in the conversation header. If it appears, the plugin is loaded and `/env` and `session_env` are ready to use.

  3. Select or switch the runtime environment

    Set the current session's environment using any of the following: 1. **`/env` command**: Type `/env python=conda-env-name` to set the Python slot, `/env r=R-version` for R, `/env cli=prefix` for CLI; `/env list` to list discoverable environments; `/env clear` to clear all slots. 2. **Header dropdown**: Click the Env button and choose from the Python / R / CLI tools dropdowns. The catalog scans lazily on first open (probing conda and WSL takes a few seconds). Use "Add path" to pin any absolute interpreter or install directory. 3. **`session_env` tool**: The model can call `action=list|get|set|pin|unpin` to manage selections itself.

Prompt you can copy

Reference prompt · Editorial suggestion。Confirm the destination, input variables and output format before use.

This block is the prompt. Ads are never placed here.

dsh plugin --profile web add @beihaizb/[email protected]

This is a plugin installation and configuration guide; there is no main prompt to copy to an AI. Follow the terminal commands step by step.

Source

安装 envsel,按会话选择 Python/R 等运行环境 · beihzb · GitHub · 2026-10-31T09:09:20Z

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related