103 lines
3.0 KiB
Markdown
103 lines
3.0 KiB
Markdown
# Pipelines
|
|
|
|
Reusable, sequential workflows for your repositories. A Go CLI/TUI and native
|
|
server reuse your OpenCode login; Docker ntfy handles phone notifications.
|
|
|
|
## Install
|
|
|
|
Requires **Go 1.27+**, Python 3, Docker with Compose running, and OpenCode V2
|
|
connected to OpenCode Go.
|
|
|
|
```sh
|
|
git clone https://git.a-wan.net/alan/pipelines.git
|
|
cd pipelines
|
|
./install.sh --system-command
|
|
pipelines help
|
|
```
|
|
|
|
The installer builds with `go install` and exposes the Go `pipelines` binary in `/usr/local/bin`.
|
|
Run as your normal user: sudo is used only for the system command link. Services
|
|
and credentials remain per-user. Setup asks for your phone username, password,
|
|
and notification topic. Fresh installations contain no pipelines.
|
|
|
|
Prefer a user-local command? Use `./install.sh` instead (`~/.local/bin/pipelines`).
|
|
|
|
## Uninstall
|
|
|
|
```sh
|
|
pipelines uninstall # keep history, credentials, and ntfy data
|
|
pipelines uninstall --purge # explicitly delete this installation's data
|
|
```
|
|
|
|
## A three-stage pipeline
|
|
|
|
**Plan → Implement → Review**. Each stage receives the previous stage's output;
|
|
the first receives your task prompt. One outcome selects the next stage—no
|
|
parallel branches. Definitions use Markdown `output`, `prompt`, `tools`,
|
|
`configs`, and `edges` blocks. For example:
|
|
|
|
````markdown
|
|
# stage planner
|
|
|
|
```output
|
|
{ task, plan, acceptance_checks }
|
|
```
|
|
|
|
```prompt
|
|
Turn input.prompt into a focused plan and acceptance checks.
|
|
```
|
|
|
|
```tools
|
|
```
|
|
|
|
```configs
|
|
provider=opencode-go
|
|
model=deepseek-v4.1-flash
|
|
retries=0
|
|
```
|
|
|
|
```edges
|
|
success -> implementer
|
|
error -> #failure
|
|
```
|
|
````
|
|
|
|
The [complete three-stage example](examples/three-stage.md) adds the implementer
|
|
and reviewer. Review and explicitly submit it:
|
|
|
|
```sh
|
|
pipelines validate examples/three-stage.md
|
|
pipelines submit examples/three-stage.md --name "three stage" --create-only
|
|
pipelines run "three stage"
|
|
```
|
|
|
|
Every submission is validated and creates an immutable version. Examples are
|
|
optional; nothing is imported automatically. Go-file edits require explicit
|
|
runtime tool approval and exact allowed paths.
|
|
|
|
## Useful commands
|
|
|
|
```sh
|
|
pipelines # dashboard; b browses templates
|
|
pipelines list
|
|
pipelines run # fuzzy selection + multiline prompt
|
|
pipelines run "bug fix" "Fix the layout" # run in the current repository
|
|
pipelines new "daily digest" "Summarize changes"
|
|
pipelines edit "bug fix" "Add a review step"
|
|
pipelines drafts --json
|
|
pipelines validate /path/to/draft.md
|
|
pipelines submit /path/to/draft.md # explicit publication
|
|
pipelines runs
|
|
pipelines inspect 1
|
|
pipelines start # manages server + ntfy together
|
|
pipelines stop
|
|
pipelines doctor
|
|
pipelines help edit
|
|
```
|
|
|
|
`new`/`edit` open OpenCode with a preloaded pipeline-authoring skill. Changes stay
|
|
as drafts by default; CLI and TUI share validation and draft storage. Most
|
|
commands support `--json` for agents and scripts.
|
|
|
|
More: [CLI](docs/cli.md) · [installation](docs/install.md) · [pipeline format](internal/author/skill/references/format.md).
|