Introduction¶
When integrating MCP tools or running automation scripts in DSH (DeepSeek Harness), whether environment variables are complete and whether .env matches code references are often hidden obstacles before integration. Manually comparing .env.example and searching the entire repository for process.env is not only time-consuming but also prone to accidentally leaking sensitive values in logs or conversations.
The community plugin dsh-plugin-env-doctor (maintainer thegabopacheco-sudo) turns “comparing .env / .env.example with code references and marking missing and unused items” into an ability callable within Harness, and emphasizes that the scanning process does not display variable values. It is categorized under admin-security in the official directory, currently has 0 stars on GitHub, version 0.1.0, and license MIT.
What is it¶
dsh-plugin-env-doctor is an MCP-type plugin for DSH: it scans project environment variable configurations, compares .env, .env.example with variable names actually used in the source code, reports missing (required by code but not in file) and unused (present in file but not referenced by code) items, and does not expose specific values in the output.
The plugin’s main entry point is the packaged dist/server.mjs, requiring Node.js >= 20. There is no official affiliation with DeepSeek / Huanfang; installation and discovery rely on DSH’s own plugin mechanism and community directory sites, rather than an “official app store”.
Core Functions¶
The tools exposed in the README are as follows.
| Tool | Function (as per original README) |
|---|---|
status |
View plugin / scan related status |
scan |
Scan project environment variables and perform comparative analysis |
The scope of capabilities (according to project description and README) can be summarized as:
- Read
.env,.env.example(and allowed similar files as defined by the plugin implementation) in the project. - Identify referenced environment variable names on the code side.
- Output structural issues like missing and unused items, without displaying variable values, reducing the risk of leaking keys in AI conversations.
Security-related behaviors (README “Security” section):
- Works in read-only mode by default; write operations require
confirm:trueand explicit user confirmation. - Set environment variable
DSH_ENV_DOCTOR_MODE=read-onlyto disable writable actions. - Whitelists and audit logs are located at
<DSH_HOME>\cache\env-doctor\audit.jsonl(path as per README;DSH_HOMEis the current DSH configuration directory).
Installation and Enablement¶
Below are two installation methods consistent with the README.
Graphical Interface: In DSH, open Settings → Plugins, install the plugin identified as github:thegabopacheco-sudo/dsh-plugin-env-doctor, and follow the prompts to allow script execution (postinstall will run node scripts/postinstall.mjs).
Command Line: Add the plugin under a specific profile (replace <perfil> with your profile name):
dsh plugin --profile <perfil> add github:thegabopacheco-sudo/dsh-plugin-env-doctor
Before installation, it is recommended to review the repository source code and the MIT license yourself; the plugin runs with the current DSH process user and permissions, just like any local MCP plugin, so you should only execute scans on project paths you trust.
Typical Usage¶
After the plugin is loaded into the current DSH session, call it via the MCP tools exposed by Harness (specific entry points depend on your DSH version’s tool panel):
- First call
statusto confirm the plugin is ready and whether the mode is read-only, etc. - Then call
scanto perform an environment variable health check on the workspace root directory (or project root specified by tool parameters). - Update
.env.exampleor local.envkey names based on the returned “missing / unused” list; do not paste real.envcontent into the conversation for the model to compare; this is exactly the manual step the plugin is meant to replace.
If read-only is required, you can set it before starting DSH or running a scan:
export DSH_ENV_DOCTOR_MODE=read-only
When you need to trace who triggered which operations and when, check the audit file:
<DSH_HOME>/cache/env-doctor/audit.jsonl
(Windows-style paths in the README use backslashes; on Linux, this corresponds to the sibling relative path under DSH_HOME.)
Applicable Scenarios and Notes¶
Suitable for:
- Quickly checking if environment variable names match the code before handover or integrating a new MCP.
- Performing “configuration hygiene” checks under the admin-security category while wanting to reduce the chance of keys entering logs.
- Cooperating with DSH’s “everything is a plugin” ecosystem by delegating repetitive verification to the tool instead of pure manual search.
Notes:
- Scan quality depends on the plugin’s recognition range for various frameworks and dynamic reference methods; variables injected at runtime still need manual review.
- It only reports key name consistency and cannot replace operational security measures like key rotation or least privilege.
- Version 0.1.0, community stars 0; it is advisable to read the CHANGELOG and Issues before use to confirm if it meets your language stack.
Conclusion¶
dsh-plugin-env-doctor turns the manual diff of “what’s missing, what’s extra” in environment variables into two steps: status / scan, and is designed with read-only by default and optional auditing, making it suitable as a lightweight security check plugin in the DSH workflow.
- Community directory: https://www.skillhub.cn/plugins/thegabopacheco-sudo/dsh-plugin-env-doctor
- Source code and README: https://github.com/thegabopacheco-sudo/dsh-plugin-env-doctor