Files
pipelines/internal/cli/help.go
T
alan 2bde6b6344 CLI for agents: non-TTY safe run/confirmations, compact inspect, wait hints and exit codes
- Without a terminal, run behaves as --json, tui refuses and confirmations
  fail fast naming --yes instead of prompting.
- inspect prints a compact summary by default; --step N, --transcripts and
  --json give detail.
- wait names a failed run's stage and first diagnostic line, prints how to
  answer a run waiting on a person, and exits 2 when any run failed,
  was canceled or interrupted (1 stays for client errors).
- help describes the current # outcome / # handoff format.
- Task starter's Land stage drops edit to match format.md; skill docs
  document run --json --yes, retry --yes --json and the new behaviour.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 00:27:14 +00:00

129 lines
7.4 KiB
Go

package cli
const help = `PIPELINES — reusable workflows for your repositories
Usage: pipelines <command> [arguments] [options]
EXECUTE
provider-check Validate a provider/model with a tool-free response
run [name] [prompt] Fuzzy selection, multiline prompt, live inspector
runs List audited runs; --pipeline filters results
inspect <run-id> Compact run summary; --step N, --transcripts, --json for detail
wait <run-id> ... Block until runs finish, then report each (read-only)
cancel <run-id> Cancel a run; changes are NOT rolled back
decide <run-id> [stage] Choose an option for a run waiting on a person
retry <run-id> Resume a failed stage (use --mode=restart for a full restart)
title <run-id> "<title>" Rename a run after the fact; input/steps unchanged
debug <run-id> Investigate a run with a configured harness or nvim
repair-session-export <run-id> <seq>
Read back a settled visit's native session (read-only)
chat-adopt <session-id> Adopt an existing OpenCode, Claude Code or Codex chat
draft-delete <draft.md> Delete a selected retained draft and its metadata
connection Server and public phone connection (no secrets)
status Server/ntfy health, ports and server computer IPs
stats All-history usage, pipeline counts and daily activity
ping Check connection and identify the running server build
version Identify this CLI build without connecting (--version)
rpc <request.json|-> Send any protocol command (automation escape hatch)
BROWSE
list List active pipelines; --archived/--all show archived ones
search QUERY Search pipelines, versions, runs, steps, field text, artifacts
show <name|id> Inspect graph, settings, source and history
versions <name|id> List immutable versions
export [name|id ...] Select/export definitions as ZIP; one name prints Markdown
templates List optional templates (never seeds the DB)
skills list | show <name> List library skills stages can load, or inspect one
template <key> Inspect a template; --source prints Markdown
AUTHORING — only when the user explicitly asks to create or change a definition
new [name] [prompt] Create a draft and open the configured harness
edit [name|id] [prompt] Pick a pipeline, draft changes, open a configured harness
drafts List retained draft files (including TUI drafts)
validate <draft.md> Check a draft using the server's validator
submit <draft.md> Explicitly publish a new immutable version
import [FILE.zip] Select/import definitions; explicitly resolve conflicts
skills import <folder> Add a skill (or new version) to the library for stages
MAINTAIN
archive <name|id> Hide an unused pipeline; versions and runs are kept
unarchive <name|id> Return an archived pipeline to lists and runs
retention report Show what a run-history policy would remove (read-only)
retention apply Remove it after approval; artifacts go with their run
SERVER / INTERFACE
harness [opencode|pi] Launch the configured default harness in this directory
harness setup <claude|codex|opencode|pi>
Install check, sign-in, models and verify for one harness
harness list Installed / signed-in / configured / default for all four
claude-account list|save|use|remove|auto
Save and switch the Claude login of this directory's
CLAUDE_CONFIG_DIR (--dir DIR); running sessions follow
tui Open the dashboard (default with no command)
serve Start native server in the foreground (Ctrl+C stops it)
service enable Configure user autostart
service disable | status Stop/remove autostart, or inspect OS service status
skill install Install/update the workflow skill for OpenCode, Claude Code and Codex
update Update this installation from its source checkout
uninstall [--yes] Remove verified Go binaries; retain data and drafts
Legacy managed installs: select PIPELINES_PREFIX explicitly for start/stop,
restart/doctor/logs and retained-data or --purge uninstallation.
Options: --url ws://127.0.0.1:8080/connect --json --help
Use pipelines help <command> for its flags. Names with spaces must be quoted.
Stage result format:
A model stage writes markdown to output.md. Only "# outcome" is parsed: its
first non-blank line is exactly one of the stage's declared outcome words
(case-insensitive). "# handoff" is the short note the next stage receives;
everything else is free markdown evidence. Larger results go in public/.
# handoff
Changed a.go; tests pass. Review the retry path.
# outcome
done
Agents and scripts (no terminal): pass --yes and --json. Without a terminal the
CLI never opens a full-screen view or prompts; a missing --yes fails at once.
pipelines run "bug fix" "Fix the layout" --json --yes
pipelines wait <run-id> exit 0 succeeded, 2 a run failed/canceled/interrupted, 1 client error
pipelines inspect <run-id> compact summary (--step N, --transcripts, --json)
pipelines retry <run-id> --yes --json
Examples:
pipelines run "bug fix" "Fix the layout" --json --yes
pipelines run "bug fix" "Fix the layout" --model openai/gpt-5 --stage-model review=openai/o4 --json
Authoring examples — use only when the operator explicitly requested a definition change:
pipelines edit "bug fix" "Add a review step"
pipelines new "release notes" "Summarize changes and notify my phone"
pipelines new "Add a feature" --template task --no-open --json --yes
pipelines validate /path/to/draft.md --json
pipelines submit /path/to/draft.md
Run retention (local, explicit, never automatic):
pipelines retention report --db ~/.local/share/pipelines/data/pipelines.db --keep 200 --json
pipelines retention apply --db ~/.local/share/pipelines/data/pipelines.db --keep 200 --yes
Launch-time model overrides: 'pipelines run --model P/M' covers every model stage;
'--stage-model STAGE=P/M' (repeatable; a repeated key is last-wins) overrides one
stage and wins over --model, which wins over the model pinned in the pipeline
version. Overrides apply to that run only, are recorded on the run, and are
validated before the run starts (an unknown stage key names the valid keys).
Draft-first: the configured harness (Pi/OpenCode; host by default, or Docker-linked
when a checkout is linked) edits a private draft; nvim remains a client editor.
Nothing is published automatically.
Every submission is validated server-side. Submission activates any schedules.
JSON mode never launches an editor or picker; supply explicit arguments.
Search: the 'pipelines search QUERY' command and the TUI '/' popup find pipelines,
versions, runs, steps/visits, artifact names and the text of stage inputs,
outputs and evidence. A bare status word (queued, running, succeeded, failed,
canceled, interrupted) or a date (today, yesterday, this week, or YYYY-MM-DD in
local time) selects runs. --type narrows to pipeline, version, run, step, field
or artifact; unrecognised words stay text.
`