Skip to Content

CLI commands

Use modem-cli COMMAND --help for the options accepted by your build. Parent IDs are explicit: most project commands take --project-id; product commands also take --product-id.

Command groupSubcommands and purpose
authlogin, refresh, status, token, switch, rotate, logout.
api-keyslist, get, browser-approved create, revoke, permissions.
projectslist, get, create, update, delete.
accountslist, get, create, update, delete provider credentials in a project.
productslist, get, create, update, delete.
products accountsattach, detach provider accounts.
products usage-limitslist, create, update total allowances.
products rate-limitslist, create, update per-window allowances.
customerslist, Sandbox create, delete, suspend, unsuspend, complete.
customers product-grantscreate a manual entitlement.
starredlist, add, move, remove workspace sidebar items.
backupsexport, restore gzip archives.
secrets-integrationslist, get, doctor, create, delete, sync, vaults, items.
subscription-signinslist, provider import, account, chat, and current-source report-claude-quota.
subscription-relayslist, create, members, set-members, revoke.
logsStream accessible project gateway logs.

Some APIs have more operations than their CLI group. Use the admin SDK or REST endpoint reference when no corresponding CLI command exists.

Configure a product

modem-cli projects create --name 'My app' --mode sandbox --auth-provider none modem-cli products list --project-id PROJECT_ID modem-cli products create --project-id PROJECT_ID --sku assistant modem-cli products usage-limits create \ --project-id PROJECT_ID --product-id PRODUCT_ID \ --metric numberOfRequest --allowance 100 \ --scope-kind modelIdentifier --scope-value MODEL_ID

Choose an actual model ID from your configured provider’s catalog. Attach a provider account with products accounts attach --project-id PROJECT_ID --product-id PRODUCT_ID --account-id ACCOUNT_ID; creating a product or account alone does not establish every serving requirement.

Rate-limit creation additionally takes --frequency minute, hour or day. Rule updates change the allowance while retaining the existing metric, scope and window. usage-limits update can also take all existing --metric, --scope-kind and --scope-value fields when a damaged rule cannot be listed. An allowance update does not erase recorded usage.

Project creation defaults to customServer authentication; select the provider you intend. OIDC setup uses --auth-provider oidc, --oidc-issuer-url and --oidc-audience. For Clerk/Firebase configuration and lifecycle, follow the identity guides.

Customers

modem-cli customers create --project-id PROJECT_ID \ --name 'Test customer' --email test@example.com modem-cli customers product-grants create \ --project-id PROJECT_ID --customer-id CUSTOMER_ID --product-id PRODUCT_ID

Customer creation here is the Sandbox testing operation. --show-sandbox-secret explicitly includes its secret in supported create/list/suspension output; otherwise it is omitted. Protect captured output when opting in.

Manual grants are distinct from purchases. Suspension refuses customer access; unsuspension does not revive a revoked upstream identity. Deletion may be refused while purchase/provider cleanup is unfinished. See customer operations.

Ordered stars

modem-cli starred add project:PROJECT_ID modem-cli starred add product:PRODUCT_ID --below project:PROJECT_ID modem-cli starred move project:PROJECT_ID --first modem-cli starred remove product:PRODUCT_ID

Item IDs are TYPE:ID. Placement accepts exactly one of --above, --below, --first or --last. Adding an already-starred item without placement leaves its position unchanged; removal is idempotent.

See backup automation, subscription commands, 1Password, authentication and completion/output options.

Last updated on