Introduction¶
When working with DeepSeek Harness (dsh), prompts are entered directly into the session interface and do not pass through the shell. To trace “how I asked this question at the time” or “what the original fine-tuning prompt was,” you have to scroll through session logs one by one. If you already use atuin to manage your shell history, a natural idea arises: these prompts could also be stored in the same history database and searched directly using atuin search and Ctrl-R.
dsh-atuin does exactly that. Below is an introduction to its principles, installation, and configuration.
What is it¶
dsh-atuin is a DSH plugin maintained by RealAlexantuereAI – correction: the author is RealAlexandreAI, current version 0.1.1, MIT license. It appends every prompt you enter in the dsh web interface to the atuin shell history, allowing you to search it using atuin search and shell integration (Ctrl-R).
It is a port of pi-atuin. Since dsh has no terminal UI, this plugin serves as a bridge between dsh and atuin.
How it Works¶
The plugin listens to session/event → user/message events and executes two atuin commands for every user input:
atuin history start -- "<prompt>"
atuin history end --exit 0 <ID>
start starts a history record and returns an ID, while end ends this record with an exit code of 0.
Two points worth noting:
- Only records prompts you input yourself; replies, tool calls, and file contents are never recorded.
- If atuin is missing or the daemon is not running, the plugin skips silently, and the session will never be interrupted because of this.
Installation and Enablement¶
First, confirm that atuin is installed on your machine and the daemon is running (part of a standard atuin installation). Then, execute the following in dsh:
dsh plugin --profile web add dsh-atuin
--profile web indicates that it is installed to the web profile.
Configuration¶
The plugin provides four configuration items, with example usage as follows:
- id: atuin
name: dsh-atuin
config:
# atuin_bin: /opt/homebrew/bin/atuin
# deny: "^/clear$,password"
# max_len: 2000
# session_match: "project-x"
| Configuration | Purpose |
|---|---|
atuin_bin |
The path to the atuin binary; defaults to atuin in PATH |
deny |
Comma-separated regex; prompts matching this are not recorded. For example, the example above blocks inputs starting with /clear and inputs containing password |
max_len |
The truncation length for long prompts; defaults to 2000. Set to 0 to disable truncation |
session_match |
Comma-separated regex; only records sessions matching the title. Leaving it empty records all sessions |
Privacy and Data Storage¶
- Only the prompts you input are recorded; replies, tool calls, and file contents are never written.
denycan mask sensitive prompts, such as inputs containing passwords or keys.- Entries are stored in the local atuin database
~/.local/share/atuin/history.db; data does not leave the local machine.
Development and Testing¶
If you want to modify the code or build it yourself, the repository provides a standard workflow:
npm install
npm run typecheck
npm test # covers text extraction, deny rules, truncation
npm run build
For testing against a real atuin database (requires the daemon to be running):
node --import tsx tests/real/real-atuin.mjs
Use Cases and Considerations¶
Suitable for developers who use both dsh (web profile) and atuin: those who want to consolidate prompts scattered across dsh sessions into a searchable local history database for reuse and tracing. Before using, please note the following points:
- The plugin runs with the permissions of the current dsh process. Before installing any third-party plugin, it is recommended to read the source code and license (this plugin is MIT).
- The plugin package requires Node.js >= 20.0.0 (as per the
enginesfield in package.json). - It relies on a standard atuin installation and a running daemon. If atuin is missing or the daemon stops, the plugin skips silently—no error is reported, but no records are generated. When troubleshooting, first confirm the daemon status.
- The default
max_len: 2000will truncate long prompts. If you need the full original text, increase the value or set it to0.
Conclusion¶
dsh-atuin solves a specific problem: allowing prompts in dsh to share the same atuin history as shell commands, so that searching and reuse are completed within the familiar atuin search and Ctrl-R. The implementation is restrained, the privacy boundaries are clear, and it does not affect the session itself in bad environments.
- GitHub: https://github.com/RealAlexandreAI/dsh-atuin
- Community Plugin Directory: https://www.skillhub.cn/plugins/RealAlexandreAI/dsh-atuin
Finally, a reminder: the community directory is an independent site with no official affiliation with DeepSeek or High-Fidelity. The philosophy of DSH is “everything is a plugin”, and dsh-atuin is a small yet complete example under this concept.