Skip to content
CLI
Organisation

Organisation

The org command group manages organisation-level settings — creating sub-organisations and managing member seat assignments and who-pays-what.

org create

Create a sub-organisation (an office or an individual seat) under the current org. There are three input modes:

# Interactive (the default in a TTY)
hutly org create

# From a YAML file
hutly org create ./sub-orgs/sydney.yaml

# From flags
hutly org create --kind office --name "Sydney Office" \
  --parent-org "$HUTLY_ORG_ID" \
  --payer seat:auto-top-up,event=5000,month=50000 \
  --payer credit:event=2000,month=20000 \
  --json --pretty

# Preview the resolved payload without calling the API
hutly org create --kind office --name "Sydney Office" --dry-run

Kinds

  • office — a child business sitting under a brand (the current org). The API key must belong to an owner of the parent org.
  • individual — a per-seat workspace activated for the caller. The API key must belong to the seat-holder themselves, not the brand owner.

YAML format

kind: office                   # required: office | individual
organizationId:  # written back on first deploy; absent on first run
name: Sydney Office            # required for both kinds
parentOrgId:  # defaults to $HUTLY_ORG_ID
abn: "12345678901"             # office only
contractedTokens: 1000000      # office only
allowExternalEmailSend: false  # office only
payers:                        # office only
  - chargeType: seat           # seat | credit
    autoTopUpAuthorised: true
    maxCentsPerEvent: 5000
    maxCentsPerMonth: 50000
seatPayer: parent              # individual only; 'parent' | 'self'; default 'parent'
creditPayer: parent            # individual only; same

Re-running and idempotency

Re-running a YAML file that already contains an organizationId prints a friendly “already deployed” notice and exits 0 — no second org is created. If the create succeeds server-side but the CLI cannot write the organizationId back to the file (read-only mount, file moved), it prints the new organizationId and the line to add, then exits non-zero so automation does not blindly retry into a duplicate.

There is currently no CLI command to change settings on an existing org after creation.

Agent mode

Under HUTLY_AGENT_INVOCATION=1, interactive mode is refused (exit code 8) — supply input via flags or a YAML file instead. See Configuration.

org seats update

Update an existing member’s seat type and who pays for their subscription and credits. The caller must be an admin or owner of the current org, and at least one of the three flags must be provided.

hutly org seats update member@example.com \
  --individual-seat \
  --subscription-payer parent \
  --credits-payer self
Flag Purpose
--individual-seat Assign the member an individual seat
--subscription-payer <parent|self> Who pays the member’s subscription
--credits-payer <parent|self> Who pays for the member’s credits