Skip to content

CLI

One binary serves the local UI and drives the same server-side workflow executor the canvas uses.

threadle [server-options]
threadle run <file|recipe|template|graphId> [run-options]
threadle jobs|status [--all]
threadle attach <jobId>
threadle logs [jobId] [--follow]
threadle stop <jobId>
threadle services|health
threadle providers | agents | sessions | graphs | models | nodes | templates | recipes
threadle --list-templates
threadle help | -h | --help
InvocationEffect
threadleStart the API + UI on 127.0.0.1
threadle serveSame as bare threadle — the command name is optional
threadle run <target>Import or load a graph and execute it (foreground, in-process)
threadle run <target> --detachStart on the running server; print jobId and exit
threadle jobsList recent jobs (all statuses)
threadle statusList running jobs (--all = history)
threadle attach <jobId>Follow a job’s logs until it ends (same as logs -f)
threadle logs [jobId]Print logs (--follow / -f until the job ends)
threadle stop <jobId>Cancel a running job
threadle services / healthServer process + provider availability
threadle providersProvider adapters only
threadle agentsAgents discovered for --dir / cwd
threadle sessionsSessions (-q, --provider, --limit)
threadle graphs / workflowsSaved graphs
threadle modelsModels returned by /api/models
threadle nodesInstalled custom nodes
threadle templatesBundled teaching examples
threadle recipesJob recipes (examples/recipes)
threadle --list-templatesSame as templates
threadle help / --helpPrint help and exit

Unknown commands exit 2. Override the server base with THREADLE_URL (default http://127.0.0.1:<port> from --port).

Most inventory commands require a running server (threadle --no-open). templates and recipes work offline from the bundled / repo catalogs.


FlagDefaultMeaning
--port <n>4570TCP port — the host is always 127.0.0.1
--no-openoffDon’t open a browser tab
--dir <path>cwdProject directory highlighted for agents and discovery
-h, --helpShow help
Terminal window
threadle --port 4600 --no-open

Keep this process up for UI / , run --detach, and every job / inventory command below. Startup also begins the read-only filesystem watchers over Claude Code, opencode, and Cursor storage. SIGINT / SIGTERM shut down managed helper processes and exit 0.


Same registry as the Runs view and UI server runs.

CommandEffect
threadle jobsRecent jobs — running, done, failed, cancelled
threadle statusRunning only; pass --all for the same history jobs shows
threadle attach <jobId>Follow that job’s logs until it ends
threadle logs [jobId] [-f]One job’s log, or recent lines across jobs; -f = attach
threadle stop <jobId>Cancel a running job
Terminal window
threadle run knot-concat --detach
threadle attach job_….…
threadle jobs
threadle stop job_….…

Read-only probes against the live server (except templates / recipes, which use the local catalogs when the server is down).

CommandEffectUseful flags
threadle services / healthHealth, process info, and every provider’s availability
threadle providersProvider adapters only
threadle agentsAgents discovered for a project--dir <path>
threadle sessionsRecent sessions-q / --query, --provider, --limit, --dir
threadle graphs / workflowsGraphs under ~/.config/threadle/graphs/
threadle modelsModels from /api/models
threadle nodesCustom nodes under ~/.config/threadle/nodes/
threadle templatesBundled teaching examplesalso --list-templates
threadle recipesJob recipes (examples/recipes)offline
Terminal window
threadle services
threadle agents --dir .
threadle sessions -q auth --provider cursor --limit 20
threadle graphs
threadle models
threadle nodes
threadle templates
threadle recipes

Same executor as UI server jobs: prompts, converters, custom nodes, agents, sessions, iterators, knots, tripwires, frames, mute/bypass, retry, error policy, and {{param:…}} substitution. Results are written back into the graph under ~/.config/threadle/graphs/.

<target> is resolved in this order — the first match wins.

#KindMatched when
1Recipe idA job recipe (repo-brief, diff-review-panel, …) — threadle recipes
2Template idA bundled teaching example (hello-wire, plan-implement-review, …)
3Portable graph fileThe path exists as a file; parsed as threadle/graph@1 and imported
4Example / recipe pathexamples/recipes/<target>[.json] or examples/workflows/<target>[.json] relative to cwd
5Saved graph idA graph with that id exists under ~/.config/threadle/graphs/
FlagMeaning
--param <name>=<value>Fill {{param:name}}. Repeatable. Name must match [a-zA-Z0-9_-]{1,64}; value capped at 100 000 characters
--approve-allAuto-pass approval gates, live handoffs, and tripwire parks
--dir <path>Project directory for agent CLI runs (default: cwd)
--detachPOST /api/run/workflow on the running server; print jobId; exit. Requires threadle already listening
--keepKeep an imported graph after a foreground run (default for files/templates)
--ephemeralDelete the imported graph after a foreground run (--keep wins; refused with --detach)
ModeBehaviorAppears in Runs / threadle jobs?
Foreground threadle runBlocks the terminal; streams logs to stdoutNo (unless you later open the kept graph)
threadle run --detachHands the job to the live server and exitsYes — same registry as UI /
Terminal window
# terminal A
threadle --no-open
# terminal B — several workflows in parallel
threadle run detached-delay --detach
threadle run knot-concat --detach
threadle jobs
threadle attach <jobId>
threadle logs <jobId> --follow

The executor preflights the graph and refuses before any agent work happens.

SituationBehavior
Approval gate / live handoffNeeds --approve-all / UI approve-all, otherwise refused
Context node with no payloadAlways blocks — cannot distill mid-run. Materialize in the Library first, or mute
Payload hash present but blob deleteddetached run blocked — context "<label>" payload is missing
Agent node with no modelBlocks — pick a model in the inspector
Required input not wiredBlocks — see Loose ends
Cycle in the graphcycle detected — workflow can never finish

Muted and bypassed nodes are exempt — muting is the escape hatch for a node you don’t want in this run.


Foreground log lines are prefixed by lane — a space for node output, · for meta, ! for stderr. Banner lines bracket the run:

❯ running "Starter workflow" (a1b2c3d4) [imported]
✓ done — 2 output node(s) updated
· graph kept as a1b2c3d4 — open with: threadle
Exit codeMeaning
0Workflow finished (or detach accepted)
1Execution / server error
2Usage error — missing target, bad --param, unknown command

Terminal window
threadle recipes
threadle run repo-brief --dir ~/code/unfamiliar-project --approve-all
threadle --list-templates
threadle run plan-implement-review \
--param task="Add a regression test for the login race" \
--approve-all --dir .
# or background it on a running server
threadle run plan-implement-review \
--param task="Add a regression test for the login race" \
--approve-all --detach
threadle jobs
threadle services