Skip to content
Greenware
Esc
↑↓navigate↵open⌘Jpreview
On this page

CLI reference

Every gw command and flag, with examples. Plays are addressed as <client>/<play>.

gw --help prints the same list. Plays are addressed as <client>/<play>, for example acme/lookalikes-01. Errors print as gw: <message> and exit 1.

Commands that move a play (idea, answer, approve, reject, accept, reopen, retry) run it on to the next stop in your terminal and print where it landed and the next command. Add --no-run (on all of them but retry) to record the decision without running. Under runner: herdr the play’s tab runs it instead.

Setup

gw start

Guided setup: tools, a demo, your factory, your first client and play. Run it again to continue where you left off. Needs a terminal; without one it prints the same steps as commands. See Install.

gw demo

A full play on a simulated Clay in ~/.greenware/demo: no account, no model calls, no cost, about a minute.

gw doctor

gw doctor [--fix]

Checks Bun, Claude Code, the Clay CLI and each client’s login, Herdr, the factory and whether Claude Code trusts it. --fix installs the Clay CLI if it’s missing (with Bun, into ~/.greenware, no sudo) and, when stages run in Herdr panes, trusts the factory folder in Claude Code (after a backup of ~/.claude.json).

gw init

gw init [folder] [--runner headless|herdr|scripted] [--clay live|twin]

Creates a factory in folder (default: GW_HOME, else the current folder), writes factory.yaml and the factory .gitignore, and remembers it so gw uses it from any folder.

gw init ~/factory
gw init ~/twin-factory --runner scripted --clay twin

gw update

gw update [vX.Y.Z]

Updates this gw: an installed copy reinstalls the newest release (or the tag you name) with its installer, which also refreshes the Claude Code and Herdr plugins; a clean checkout of main moves to origin/main. A development checkout is refused. See Updating.

gw version

gw version     # or gw --version

Prints the version, for example 0.7.0.

Clients

gw client add

gw client add <id> [--name <name>] [--domain <company.com>] [--workspace-id <id>] [--clay-config-home <path>]

Adds a client. --workspace-id pins a Clay workspace up front (in twin mode, ws_demo is enough); --clay-config-home sets where its isolated Clay login lives (default clients/<id>/.clay).

gw client add acme --domain acme.com
gw client add acme --domain acme.com --workspace-id ws_demo    # twin

gw client login

gw client login <id> [--workspace <id>] [--yes]

Signs the client in to Clay in its own login and pins the workspace. --workspace picks one of several signed-in workspaces; --yes pins one whose name doesn’t look like the client’s without asking. See Onboarding.

gw client pin

gw client pin <id>

Pins the workspace the client’s Clay login resolves to now.

gw client research

gw client research <id> [--domain <company.com>] [--model <m>] [--skip-functions]

Onboards the client: reads the workspace (read-only), researches the company, and writes CLAUDE.md (or CLAUDE.proposed.md when you’ve edited it), research/brief.md, workspace.json, standards.proposed.json and the function shortlist. --skip-functions skips the shortlist; --model picks the model.

gw client functions

gw client functions <id> [--model <m>] [--force]

Shortlists the workspace’s Clay functions into clients/<id>/functions.md: which to reuse for which job, which to avoid. Keeps an untouched shortlist when the catalog is unchanged; --force rewrites it anyway.

gw client status

gw client status <id>

The onboarding checklist: what’s done, what’s missing, and the next command for each.

gw client refresh

gw client refresh <id>

Re-reads workspace facts (audiences, record counts, field ids) into workspace.json. On a plan without Audiences it records that and exits 0.

acme: companies 3, people 3, deals 3; 2 saved audiences; 6 fields → ~/factory/clients/acme/workspace.json

gw client standard

gw client standard <id> <key> --rule "..." [--impl "..."] [--golden "companies:123=excluded as customer;people:456=…"]

Sets an always-on client standard. Each change is a new version; every plan must map it. --golden adds golden records as <entity>:<record id>=<expected>, separated by ;.

gw client standard acme reach.company.exclude --rule "Never reach current customers or open opportunities" \
  --golden "companies:123=excluded as customer"

gw client standards

gw client standards <id> [--accept]

Lists the standards in force. --accept adopts the ones onboarding proposed in standards.proposed.json.

gw client decide

gw client decide <id> <key> "<value>" [--note "..."]

Records a client decision. The latest per key wins; every stage reads decisions.md.

gw client decide acme outreach.sequencer "instantly" --note "AEs already use it"

gw client decisions

gw client decisions <id>

The decisions in force.

gw client gold

gw client gold <id> <name> --audience <audience-id> [--limit <n>] [--keep-contact]
gw client gold <id> <name> --csv <file> [--limit <n>] [--keep-contact]

Exports a holdout into clients/<id>/gold/<name>.jsonl, from a saved audience or (without Audiences) a CRM CSV. Only Verify reads it. Email and phone fields are removed unless --keep-contact. --limit caps the records (default 1,000, at most 10,000).

gw client suppression

gw client suppression <id>                                          # list saved lists
gw client suppression <id> <name> --csv <file> [--column <c>] [--yes]

Saves a suppression list of domains or emails for plays on a plan without Audiences. A person confirms at the terminal, or with --yes. Saving re-checks plays waiting on that client’s lists. See Workspaces without Audiences.

gw client list

gw client list
acme	workspace=ws_demo

Plays

gw idea

gw idea <client> "<raw idea>" [--id <play-id>] [--no-run]

Starts a play and runs it to its first stop (usually Clarify’s questions). Under Herdr it opens the play’s tab.

gw idea acme "lookalikes off last 45 days of closed-won, routed to AEs" --id lookalikes-01

gw run

gw run [<client>/<play>]

Advances every ready play, or one. Under Herdr, makes sure every active play (or the one named) has a live tab.

gw status

gw status [<client>] [--json] [--watch]

The board as text: plays × stages and what each is waiting on. --json prints the play states; --watch redraws every 2 seconds.

PLAY                DEC CLA RES SPC PLN A   BLD VER AUD B   PUB DOC  STATUS
acme/lookalikes-01  ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓   ✓    done

gw show

gw show <client>/<play>

State, the idea and how the agent read it, the blueprint, the folder, which artifacts exist, open questions, gate status and pending rulings, credits, and the next command.

gw questions

gw questions <client>/<play>

How the agent read your idea, and every question with its priority, status, default and answer.

gw answer

gw answer <client>/<play> <Qn> "<answer>" [--no-run]
gw answer <client>/<play> <Qn> -              # take the default
gw answer <client>/<play> --defaults          # every open question takes its default
gw answer <client>/<play> reading "<what it should be>"

Answers Clarify’s questions. reading corrects how the agent read your idea, while Clarify waits on you.

gw approve

gw approve <client>/<play> --gate A|B [--comment "..."] [--no-run]

Approves a gate. When the planner asked for rulings (needs-ruling.md) or a requirement is blocked, --comment "<your rulings>" is required at Gate A and goes to Build.

gw reject

gw reject <client>/<play> --gate A|B --comment "what to change" [--approve] [--no-run]

Sends the play back to Plan (A) or Build (B) with your comment. --approve (Gate A only): your comment is the ruling and approves the replan, unless the planner raises something new.

gw accept

gw accept <client>/<play> --comment "..." [--no-run]

Accepts what Verify or Audit stopped on (a play in manual at either stage) and continues. Recorded in your name and shown at Gate B. Fixable failures still go back to Build with your ruling.

gw reopen

gw reopen <client>/<play> --gate A|B --comment "..." [--approve] [--no-run]

Voids a passed gate from a blocked or manual play: back to Plan (A) or Build (B) with your rulings as feedback. --approve (Gate A only): your ruling approves the replan, unless the planner raises something new.

gw retry

gw retry <client>/<play> [--from <stage>]

Re-runs a blocked or manual play with fresh budgets, or resumes a stopped one where it was. --from restarts at the current or an earlier agent stage that doesn’t undo an approved gate (after Gate A: --from build).

gw stop

gw stop <client>/<play> --comment "why"

Takes a play off the active board. gw retry resumes it.

gw logs

gw logs <client>/<play> [-n 40]

The last n events (default 40) from events.jsonl: time, stage, type and data.

gw export

gw export <client>/<play> [--status completed]

Writes the play’s results to deliverables/results.csv from its [GREENWARE] result node, through Clay’s run export. --status picks which runs (default completed).

gw board

gw board [--plain]

The full-screen board (OpenTUI): plays × stages, inbox, gates, and per-play Spec, Plan, Graph, Contract, Log and Cost tabs. --plain, or a non-terminal output, prints the text board once. See the board.

gw watch

gw watch <client>/<play> [--drive]

Renders one play live. --drive also runs its engine; it’s what the Herdr viewer pane runs.

Clay

gw clay

gw clay <args...>

The guarded Clay CLI (clayx): stage permissions, the workspace check, the budget and the ledger. Arguments pass through to clay untouched. Run by a person, it allows reads, saving [GREENWARE] audiences and adding [GREENWARE] fields, for the client in GW_CLIENT (default: the first client). See the security model.

gw clay audiences list
GW_CLIENT=acme gw clay audiences create --entity-type companies --name "[GREENWARE] Closed-won: last 12 months" --filter won.json

Herdr

With runner: herdr, every client is a workspace, every play a tab and every stage a live Claude Code pane. See Herdr.

Command What it does
gw herdr setup Check Herdr, link the Greenware plugin, install the Factory view, set runner: herdr, offer to trust the factory folder
gw herdr open <client>/<play> Open (or re-open) a play’s tab
gw herdr inbox The questions popup
gw herdr gates The gates popup
gw herdr idea The new-idea popup
gw herdr client The onboard-a-client popup
gw herdr doctor What Greenware sees in Herdr: binary, session, server, socket, plugin, each play’s tab

gw herdr view and gw herdr open-pane are hooks the plugin itself calls.

Environment

GW_HOME (factory root), GW_RUNNER, GW_CLAY=twin, GW_SCENARIO. The full list is in Configuration.

Was this page helpful?