Run the local Cursor CLI agent on a coding task in a workspace and continue the run by chat id.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:qyjqio/dsh-cursor-toolkit#path:/packages/dsh-cursor-cli
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DSH host plugin that adds the cursor_agent tool: run the Cursor CLI
(cursor-agent) headlessly on a task in a workspace, straight from any DSH
agent session.
Cursor runs its own agent loop (reads/edits files, calls tools) and the tool
returns its final message plus the Cursor chat id, so a run can be continued
later with resume.
Install
# from a DSH session with the plugin manager available — git source, pinned by the market index
plugin_manager install_bundle target="git+https://github.com/qyjqio/dsh-cursor-toolkit.git#<commit>&path:/packages/dsh-cursor-cli"
# or plain pnpm, inside a DSH profile directory
pnpm add "git+https://github.com/qyjqio/dsh-cursor-toolkit.git#<commit>&path:/packages/dsh-cursor-cli"
Then enable the bundle (include:cursor-cli) in Settings → Plugins, or add
@qyjqio/dsh-cursor-cli to the profile's dsh.profile.bundles.
Requirements
- Cursor CLI installed and logged in:
cursor-agent --version,cursor-agent login. - The executable is resolved from, in order:
PATH,~/.local/bin,/usr/local/bin,/usr/bin(override with theexecutableconfig field). - Headless runs need the workspace trusted, so the tool always passes
--trust.
Parameters
| name | type | meaning |
|---|---|---|
prompt |
string (required) | Task for Cursor; be explicit about goal and done criteria |
cwd |
string | Workspace dir; defaults to the session working directory, accepts ~ |
mode |
agent | plan | ask |
agent edits/runs tools; plan/ask are read-only |
model |
string | Cursor model id (e.g. auto, composer-2.5); default = CLI default |
force |
boolean | Pass --force (auto-approve tool calls). Default true; ignored for read-only modes |
resume |
string | Cursor chat id returned by a previous run |
continueSession |
boolean | Continue the most recent chat in the workspace |
timeoutSeconds |
integer 1..3600 | Run budget; default 900 |
Result
{ ok, result, cwd, mode, truncated, timedOut, aborted,
sessionId?, model?, durationMs?, exitCode?, stderr? }
ok is false when the process exits non-zero, Cursor reports is_error, or the
run times out / is aborted. The rendered card shows the final message plus a
footer with session id, model, mode, duration and cwd.
Config
Optional bundle config (all values are defaults in code when omitted):
| key | default | meaning |
|---|---|---|
executable |
auto-detected | Path to cursor-agent |
allowForce |
true |
Whether force may be passed at all |
model |
CLI default | Default model when the call omits one |
maxOutputChars |
60000 |
Result truncation limit |
timeoutMs |
900000 |
Default timeout |
Examples
cursor_agent({ prompt: "Fix the failing test in tests/auth.spec.ts" })cursor_agent({ prompt: "Review src/api for error handling gaps", mode: "plan" })cursor_agent({ prompt: "Now apply the plan", resume: "<sessionId>" })
Notes
- Tools run with the host process environment, so
CURSOR_API_KEYis honored. - Timeout: the tool kills the CLI with SIGTERM, then SIGKILL after 3 s.
cwdis validated before spawning; a missing directory fails fast instead of letting Cursor create one.
Links
More in this category
Tencent/WeKnora#dsh-weknora★ 35014
Four read-only tools over a WeKnora knowledge base: list knowledge bases, hybrid passage search, reassemble one document's chunks in order, and WeKnora's own cited RAG or ReAct-agent answer with a resumable session id.
superdesigndev/treg★ 5944
Tool catalog for agents: search ~2,600 external endpoints (SEO and SERP, backlinks, social, people and company enrichment, ad libraries, scraping) by the task you want done, read each one's parameters and per-call price, then call it with the credential injected server-side. Ships the skill plus an MCP row that stays disabled until TREG_TOKEN is set.
T-Auto/dsh-ops★ 3709
Provides bash, PowerShell 7, and high-performance Rust tools for DSH on Windows to reduce token usage.
TencentCloudBase/CloudBase-AI-Toolkit#dsh-plugin★ 1141
Tencent CloudBase backend for DeepSeek Harness — scaffold and deploy full-stack apps from chat, render query results as table cards with paging, sorting and CSV export, preview a deployment on its domain, and call the CloudBase MCP toolset (`mcp__cloudbase__*`) with device-code login.
sixtysevenlf/dsh-blender-plugin★ 1019
Lets a DSH agent drive a local Blender over a direct TCP channel with 16 tools: viewport frames, custom-angle renders, Python execution, headless and job offload, transaction rollback, and a planning layer of 186 ops across 28 families.
anysearch-team/anysearch-dsh★ 634
AnySearch-powered real-time web and vertical search provider for DeepSeek Harness.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.