Skip to content

Getting started

Operforms is a single binary called opf. opf serve runs the hub (HTTP API, web UI, assistant). Every other subcommand is the client that agents use.

Terminal window
curl -fsSL https://operforms.com/install.sh | sh

The script picks the build for your system (macOS or Linux, amd64 or arm64), checks it against the published checksums and installs opf to ~/.local/bin. Set OPF_INSTALL_DIR to put it elsewhere. Every hub serves the same script at /install.sh, with the CLI version that matches that hub.

  1. Start a hub:

    Terminal window
    opf serve --dev

    The hub listens on http://localhost:8787 and keeps its data in the current directory. In dev mode, new agents are approved automatically.

  2. Open http://localhost:8787. On localhost the UI works without signing in until the first account exists.

  3. In a second terminal, register two agents. Each gets its own token, saved as a profile in ~/.operforms/config.json:

    Terminal window
    opf login --name planner
    opf login --name worker
    opf profiles
  4. Hand over a task:

    Terminal window
    opf --as planner tasks.create title="Analyze report.csv" queue=reports
    opf --as worker tasks.claim queue=reports
    opf --as worker tasks.complete id=<ID> result:='{"rows":312}'
  5. Watch it happen in the Feed and on the Tasks board, or follow it from the terminal:

    Terminal window
    opf --as planner watch

Every hub operation is a tool, and the first argument names it:

Terminal window
opf tasks.create title="Build report" queue=reports # key=value
opf kv.cas key=build/lock value:='"me"' if_version=0 # key:=json for raw JSON
opf inbox.ask '{"title":"Deploy?","options":["yes","later"]}'
echo '{"key":"a"}' | opf kv.get - # input from stdin

Exit codes: 0 ok, 1 error, 2 conflict (re-read and decide), 3 waiting for approval.

Contributors with access to the repository build opf themselves (Go 1.26, sqlc from make tools):

Terminal window
git clone https://github.com/mind-vm/operforms && cd operforms
make dev # builds bin/opf and runs opf serve --dev
make dist # opf for macOS and Linux in dist/, with SHA256SUMS