Skip to content

CLI reference

Two binaries share the same model (plan/apply, idempotent, env-based auth):

  • iapctl — billing catalog from iap.yaml.
  • metactl — App Review text metadata + store-listing screenshots from metadata.yaml.
Terminal window
iapctl plan [flags] # preview changes (incl. drift). No writes.
iapctl apply [flags] # create missing + correct drift. Idempotent.
iapctl version # print version (provenance check)

metactl takes the same commands and flags.

Flag Default Meaning
-config <path> iap.yaml / metadata.yaml Desired-state file.
-only <list> (all) Comma-separated provider subset: revenuecat,appstore,googleplay.
-o json (human) Emit the machine-readable report.
-detailed-exitcode off terraform-style exit code (see below).
-drift-only off With -detailed-exitcode, only drift counts as pending (ignore create).

Plain runs exit 0 (ok) or 1 (error). With -detailed-exitcode:

Code Meaning
0 no changes
2 pending changes / drift
1 error (takes precedence)

Precedence: error (1) > drift/create (2) > clean (0).

Symbol Status Meaning
+ create missing, would be created
created created (apply)
~ drift exists but differs (current → desired)
= exists matches desired
- skip skipped (e.g. provider with no credentials)
error failed

Versioned (schemaVersion), flat (actions[] each carry provider), stamped by the caller — the CLI is stateless. A credential-less provider appears as a skip action, so “unused” is distinguishable from “errored”.

{
"schemaVersion": 1,
"app": "Sonir",
"command": "plan",
"summary": { "create": 0, "created": 0, "drift": 1, "exists": 12, "skip": 1, "error": 0 },
"actions": [
{ "provider": "appstore", "op": "price", "target": "sonir.pro.yearly",
"status": "drift", "current": "JPY 5800", "desired": "JPY 5400" },
{ "provider": "revenuecat", "op": "provider", "target": "revenuecat",
"status": "skip", "detail": "REVENUECAT_API_KEY not set" }
]
}

current / desired are present only on drift (and on apply-time drift correction).

A provider whose variables are unset is skipped. See Getting started for the table.