Reference

CLI Commands

Binary name: o7

Global flags

FlagDescription
--help, -hShow usage
--version, -VShow version
--project <dir>Set project root (applies to run, inspect, resume, reset)

o7 run <file.7> [workflow]

Execute a workflow headless. Events print to stdout.

o7 run build.7          # runs "main" workflow
o7 run build.7 deploy   # runs "deploy" workflow

Exit code 1 on failure, 0 on success.

o7 tui <file.7> [workflow]

Execute with the interactive terminal UI. Requires a TTY.

Keybindings: ↑/↓ or j/k — navigate · v — toggle detail · p — pause · ^P — command palette · q — quit

o7 parse <file.7>

Validate syntax and list workflows.

$ o7 parse build.7
OK — 4 workflow(s): main, plan, implement, test

o7 lint <file.7>

Machine-readable diagnostics (JSON output).

o7 inspect [run-id]

List all previous runs, or inspect a specific run's step-by-step state.

o7 inspect              # list runs
o7 inspect abc123       # inspect run abc123

o7 resume <run-id>

Resume a paused run from its last boundary.

o7 reset <run-id> <step-index>

Roll back a run to an earlier boundary index (found via o7 inspect).

o7 wiz [--project <dir>]

Interactive configuration wizard. Sets up harnesses in .7/harnesses.toml and global config at ~/.config/o7/config.toml.


DSL Syntax

Every .7 file begins with:

version 1

Workflow declaration

workflow my-task
  run step-one
  run step-two

Names: letters, numbers, hyphens, underscores, :: separator. Duplicate names are an error. Indentation is meaningful.

run

Call a named workflow:

workflow main
  run plan
  run implement
  run test

exec

Call a harness with a prompt:

workflow plan
  exec
    harness: claude
    prompt: "Write an implementation plan."

workflow implement
  exec
    harness: claude
    prompt_file: prompts/implement.md

prompt — inline string. prompt_file — path to a file.

if / if not

Conditional execution. The check workflow must return {"result": true} or {"result": false}.

workflow main
  if needs-setup
    run do-setup
  if not already-built
    run build

match

Branch on a variant. The check workflow must return {"variant": "name"}.

workflow main
  match review-check
    approved   -> run deploy
    needs-work ->
      run fix-issues
      run deploy
    else -> run escalate

Each arm: single run, or an indented block. else is optional; without it, unmatched variants error.


Harness configuration

Create .7/harnesses.toml in your project root:

[harness.claude]
command = "claude"
args_mapping = "flags"
prompt_slot = "--prompt"

[harness.echo-test]
command = "echo"
args_mapping = "flags"
prompt_slot = ""

command — binary to invoke. args_mapping — always "flags". prompt_slot — flag used to pass the prompt (empty string appends as positional arg).