CLI reference¶
The fgai command-line interface is a thin, uniform front end over the same
public Bazaar API you can call directly over HTTPS. Every command maps
one-to-one to a /<capability>/v1/... endpoint on api.flexgalaxy.ai — the CLI adds nothing
the API does not expose, and exposes nothing the API does not.
The Bazaar commands ship inside the single fgai binary alongside the other
FlexGalaxy.AI tiers.
Command shape¶
fgai <group> <verb> [--<id> <value> …] [--body <json> | --body-file <path>] [--idempotency-key <key>]
<group>is a capability group (below). Most groups have short aliases (e.g.dev2m→publisher,ota→rollouts).<verb>is the operation (fgai <group> --helplists them).Path identifiers are passed as flags (
--request,--grant,--rollout, …).Writes take a JSON body via
--bodyor--body-file(-reads stdin). A randomIdempotency-Keyis generated per write unless you pass one — supply a stable--idempotency-keyto make retries idempotent.Responses print as pretty JSON; a successful empty response prints
ok.
Authentication¶
The CLI resolves credentials from your active fgai profile (fgai configure):
Credential |
Header |
Groups |
|---|---|---|
Interactive user |
|
tenant / publisher groups |
Access key / secret key |
|
|
none |
— |
|
Capability groups¶
Group (aliases) |
What it drives |
|---|---|
|
EntitleKit — license request lifecycle, grants & assignments, revoke / renew |
|
EntitleKit — account billing profile & commercial change preview / confirm |
|
External integrator licensing API (AK/SK) — poll requests, post decisions & compensations, delegate an offer’s approval, change feed, licensed-subject roster, webhooks, sandbox |
|
Rollouts — OTA rollout preview / create / drive / reconcile (Marketplace rollouts, Dev2M delivery rules) |
|
Marketplace Configure — factory software assignment policies (configure / enable / disable) |
|
Dev2M — publisher profiles, products, releases, reviews, offers, channels, rollout requests, lifecycle |
|
Marketplace — public web-app listing browse ( |
|
SkillStore — public device-software listing browse (applet/firmware) and device acquisition |
|
EntitleKit — your acquired applications + terminal assignments |
|
EntitleKit — acquire / assign application provisioning + request voting |
|
Public artifact-signing key discovery |
|
Settlement — proceeds-ledger reads, CSV export and payout settings (the payee is masked) |
|
Software bundles & claims — author, activate, withdraw, resolve rights, claim journal, automatic consents |
|
Feature flags — read your tenant’s feature-flag state (the write is console-only) |
|
Artifact publishing — register an artifact your build pushed (see Artifact publishing) |
Run fgai <group> --help for the full verb list of any group.
platform-operations (operations) is not in this table: every one of its verbs
is a platform-operator operation, so the tenant fgai binary does not carry the
group. The operator surface is published in fgai-admin.
Examples¶
# Publish flow (Dev2M): create a product, then a release
fgai publisher product-create --body '{"slug":"clean-suite","kind":"APPLET","title":"Clean Suite","summary":"Floor cleaning applet"}'
fgai publisher release-create --product <product-id> --body-file release.json
fgai publisher release-submit --release <release-id>
# Declare (or re-declare) which device models the product runs on. This is what the
# SkillStore `--model` filter matches, and it can be changed after the product exists.
fgai publisher product-compatibility --product <product-id> \
--body '{"compatibility":[{"platform":"device","vid":"broit","model":"broit-cleaner-x1"}]}'
# Browse the public marketplace — no credential required
fgai marketplace list
# --listing takes the numeric listing id from `marketplace list`, not a slug
fgai marketplace get --listing 12
# Get (acquire) it for your account — the customer-side Get step
fgai app-provisioning create --body '{"listing_id":12}'
# SkillStore — device software (applets/firmware). Same two-step shape: Get the
# product for the account (above), then request the licence for a scope. That
# request takes the *offer* id, so take `offer.id` from the listing read: it is
# published once the account holds the product, and it is absent for accounts the
# offer does not apply to — a non-null id is always one `acquire` accepts.
fgai skillstore list
fgai skillstore get --listing <id> # -> "offer": {"id":"<offer-uuid>", ...} once held
fgai skillstore acquire \
--body '{"offerId":"<offer-uuid>","subjectFrn":"frn:<ownerAccountId>:thinghub:scope/<scopeId>","quantity":1,"scope":{"scopeId":"<scopeId>"}}'
# Fetch the public artifact-signing key
fgai signing-keys platform
Listing licence requests across an organization¶
A licence request is held by the account that owns its subject — for a robot,
the account that owns the robot, which is often a member account rather than the
one that filed the request. licensing requests-list therefore takes an
organization scope:
# Your own account's requests (default)
fgai licensing requests-list
# Every request held by your organization's member accounts
fgai licensing requests-list \
--scope-type ORG --target-frn "frn::bazaar:org/<organization-id>"
Over HTTPS the same read is
GET /software-licensing/v1/requests?scope_type=ORG&target_frn=frn::bazaar:org/<organization-id>.
Each row carries the accountId that holds it, so you can answer “which of my
sites hold a licence for this” and spot two requests for the same subjectFrn —
retract the surplus one with licensing requests-withdraw --request <id>.
The organization scope is authorized on the organization, not on the individual accounts: your organization’s management account sees all of them, and a partner you have delegated to sees exactly the accounts its delegation covers. A caller with neither is refused rather than shown an empty list.
Acting on a request by id¶
Listing across an organization and operating on a request are authorized
differently. Every per-id operation — requests-get, requests-submit,
requests-withdraw, requests-decision, requests-issue, and the grant verbs — is
authorized against the account that holds the request. You can act on it if
that account is your own, or if you hold a delegation covering it; otherwise the
call is 403 forbidden. Seeing a row in the organization-scoped list does not by
itself grant you authority over it.
An offer declares its commercial terms and where the resulting license is held — see Offers. A release body may declare a publish-time application config-schema — see Application config-schema.
Note
Marketplace moderation (publishing and listing review decisions, delisting)
is a platform-operator surface, not a tenant one: it is not in the tenant fgai
CLI, and its verbs are published in fgai-admin (platform-operations). The
feature-flag write is console-only; fgai feature-flags carries the tenant read.