Install
openclaw skills install emergence-deepseek-tuiClawHub Security found sensitive or high-impact capabilities. Review the scan results before using.
Use DeepSeek TUI CLI as an autonomous code assistant - two modes: `deepseek exec` (headless, text-in/text-out, no filesystem access) for delegation from another agent, and `deepseek run` (interactive, full tool-calling with filesystem) for direct coding.
openclaw skills install emergence-deepseek-tuiUse the DeepSeek TUI CLI (v0.8.16) as a code assistant from within your agent workflow. This skill teaches OpenClaw / Hermes agents how to delegate coding tasks to DeepSeek in two modes.
deepseek (npm wrapper) v0.8.16
binary version: v0.8.16
repo: https://github.com/Hmbown/DeepSeek-TUI.git
Install:
brew install hmbown/tap/deepseek-tuinpm install -g deepseek-tuiDeepSeek TUI has two fundamentally different modes, each with different capabilities:
| Mode | Command | Filesystem Access | Tool-Calling | Use Case |
|---|---|---|---|---|
| Headless | deepseek exec <PROMPT> | ❌ No | ❌ Cannot execute tools | Delegate code gen from another agent |
| Interactive | deepseek run | ✅ Yes (via tools) | ✅ Full tool-calling | Direct coding, file editing, debugging |
deepseek exec — Headless (Agent Delegation)deepseek exec <PROMPT> calls the DeepSeek API in pure text-in/text-out mode. The model may generate tool call syntax in its chain-of-thought output (e.g. <function_calls><invoke name="list_files">), but these are never actually executed — they are only displayed as part of the model's reasoning text. No filesystem access, no tool execution.
┌─────────────────────────────────────┐
│ Your Agent (Hermes/OpenClaw) │
│ ┌───────────────────────────────┐ │
│ │ 1. Read files (understand) │ │
│ │ 2. Craft prompt with context │ │
│ │ 3. deepseek exec "<prompt>" │ │
│ │ 4. Validate output │ │
│ │ 5. Apply changes │ │
│ └───────────────────────────────┘ │
└─────────────────────────────────────┘
You must provide all file context in the prompt — DeepSeek exec is truly filesystem-blind.
deepseek run — Interactive (Direct Coding)deepseek run launches the full TUI with real tool-calling capabilities:
list_files — browse directoriesread_file — read file contentswrite_file / edit_file — modify filesterminal / bash — execute shell commandsgrep / search — search codebaseWhen invoked from the workspace directory, it can read the entire project. Use this for direct coding sessions where you want DeepSeek to explore, edit, and build autonomously.
Read all relevant files yourself before invoking DeepSeek. You need to know:
DeepSeek exec cannot see your filesystem, so you must provide context in the prompt.
Do NOT dump entire files. Structure your prompt like this:
[One-line context about the project]
[Interface of components being used]
[Example of existing usage pattern]
[Numbered change list — specific, actionable]
[Important constraints]
# Option A: pipeline from a file
deepseek exec "$(cat /path/to/prompt.txt)" 2>&1
# Option B: inline (shorter prompts)
deepseek exec "Add a blue button that says 'Click Me' to the homepage." 2>&1
DeepSeek's headless mode may display tool calls in its response as simulated reasoning text — ignore these. The actual output is the text content. Watch for:
| Behavior | Action |
|---|---|
| ✓ Returns correct code snippets | Extract from markdown blocks, apply |
| ✗ Restructures/rewrites entire files | Discard, extract only the snippets you need |
| ✗ Hallucinates interfaces or APIs | Cross-check against your own codebase context |
✗ Displays <function_calls> blocks | These are simulated reasoning, not real tool execution |
Use targeted file editing tools (like patch or write_file) to apply only the confirmed snippets. Never blindly trust full-file output from exec mode.
cd /path/to/project
npm run build # or npx next build, cargo build, etc.
When you want DeepSeek to explore and edit files directly:
cd /path/to/project
deepseek run
Or pass a goal directly:
deepseek run "Add a CommandBlock to the skills page similar to the bounties page"
In this mode, DeepSeek has full tool access and can read/write files, search, and execute commands autonomously. This is the mode the user discovered where "it reads all files in the current workspace."
exec for delegation, run for autonomy — if you have your own tooling to read files and want tight control, use exec. If you want DeepSeek to explore and figure things out, use run.patch (find-and-replace) over writing entire files<function_calls> blocks in exec output are simulated reasoning, not real executionIn a real session, DeepSeek exec generated code to add a CommandBlock installation component to an Emergence Science skills detail page:
CommandBlock patternCommandBlock interface, existing usage example, exact insertion instructionsdeepseek exec → got confirmed import and JSX snippets (with simulated tool calls in the output)patch, built with npx next build → ✅ clean| Problem | Fix |
|---|---|
| DeepSeek returns nothing (exec) | Check API key and network: deepseek exec "hello" |
Output shows <function_calls> blocks | These are simulated reasoning, not real execution — treat as text output |
| Output is truncated | Break task into smaller prompts |
| Hallucinated code structure | Be more explicit about file paths and existing code |
| Too slow | DeepSeek V4 is fast (~2-5s per call); long responses may indicate poor prompting |
| Files not found (interactive mode) | Ensure you cd into the correct workspace before deepseek run |