In development scenarios for DeepSeek Harness (DSH), environment variables are often used to connect to databases or configure secrets. The conventional approach is to modify the host machine’s shell configuration files and restart DSH, which is cumbersome. In addition, some plugins (such as dsh-sql) only read a snapshot of environment variables once at startup, so subsequent changes do not take effect. The dsh-settings-params plugin solves both problems through a GUI-based YAML configuration: it centrally manages variables, supports persisting them to process.env, and enables hot reloading of specific plugins through a whitelist mechanism.
Installation and Activation¶
Use the officially provided command to install the plugin. After installation, you must restart the host process to load the new configuration.
dsh plugin --profile web add github:felixpu/dsh-settings-params
Core Features¶
- Centralized management: All variables are stored in a single YAML file. Each variable records a “value” and a “note”, and the variable name is the key.
- Persistent application: After saving the configuration, variables are immediately written to
process.envand persisted to disk. - Whitelist-based hot reloading: Select specific plugins (such as
dsh-sql) into the whitelist. Saving parameters triggers a reload, allowing them to read new values without restarting. - Access control: By default, no variables can be read by the model. Explicit authorization is required in the interface.
How to Use¶
In the DSH web interface sidebar, click Plugins and go to the dsh-settings-params plugin details page.
1. Edit Variables¶
Edit the YAML file directly in the page. Changes take effect after saving.
2. Authorize Model Access¶
By default, no variables can be read by the model. You must select the variable names in the “expose” list in the interface before the model can read them through tools.
The model accesses variables through the following two tools:
env_param_list: Lists authorized variables, returning only names, notes, and masked values, not plaintext.env_param_get: Reads the plaintext of a specific authorized variable.
Security Notice: The plaintext content retrieved enters the model context and the current session record. It is not recommended to authorize highly sensitive secrets (such as database passwords).
3. Configure Hot Reloading¶
In the “reload” section of the interface, select the plugins that require hot reloading (for example, dsh-sql). When parameters are saved, the host reloads these plugins so they can read the new environment variable values.
Configuration File¶
The plugin configuration file is located at ~/.dsh/.dsh-settings-params/params.yml.
This path is outside the plugin package directory, so the configuration is not lost when uninstalling, reinstalling, or upgrading the plugin. The file format is as follows:
variables:
DSH_SQL_PASSWORD_OPENCROWD:
value: "******"
note: 生产库只读账号
DEEPSEEK_API_KEY:
value: "sk-..."
note: ""
expose: [] # 允许模型读取明文的变量名(默认空 = 都不可读)
reload:
targets: # 保存后需要热重载的插件条目名
- dsh-sql
Notes¶
- Mandatory restart: You must restart the host process after installation for the configuration to take effect.
- Sensitive data visibility: Once a variable is authorized in
expose, its plaintext enters the model context and the current session record. - Plugin startup mechanism: Some plugins (such as
dsh-sql) read environment variables only once at startup. This plugin solves that issue through the hot reloading mechanism. - Interface language: Supports switching between Chinese and English, following the platform’s general settings.
Related Resources¶
- GitHub repository: https://github.com/felixpu/dsh-settings-params
- Plugin directory: https://www.skillhub.cn/plugins/felixpu/dsh-settings-params