Skip to Content
CLI ReferenceCommand Reference

Command Reference

This page documents every command group available in the Foir CLI. Commands follow a consistent foir <group> <action> pattern. All commands support the global --json, --jsonl, --quiet, and --project flags described in the CLI Overview.

Authentication & Setup

login

Authenticate the CLI via browser-based OAuth. Opens your default browser to sign in and writes a session token to ~/.foir/credentials.json once you complete the flow. Run this first on any new machine.

foir login

The login flow:

  1. Opens your default browser at the Foir sign-in page.
  2. You sign in (or pick an existing session).
  3. The browser hands a short-lived authorization code back to the CLI listening on a local port.
  4. The CLI exchanges the code for a session token and saves it to ~/.foir/credentials.json.

No subcommands or flags — foir login is one-shot. If your browser doesn’t open automatically, the CLI prints a URL you can paste.

logout

Clear stored credentials. Removes ~/.foir/credentials.json and any cached session state.

foir logout

whoami

Show the current authentication status — which user is signed in, which tenant + project are active, and which credentials file is in use.

foir whoami

Useful for confirming you’re operating on the project you think you are before running a destructive command. Combine with --json to script against the output.

select-project

Pick the active project for subsequent CLI calls. Lists every project your session has access to and writes the selection to ~/.foir/credentials.json so later commands don’t need a --project flag.

foir select-project [options]
OptionDescription
--project-id <id>Skip the interactive picker and select a project directly.
--save-as <name>Save the selection as a named profile (see foir profiles).

Examples

# Interactive picker foir select-project # Switch without the prompt foir select-project --project-id prj_abc123 # Save the selection as a profile so you can switch back later foir select-project --project-id prj_abc123 --save-as staging

profiles

Manage named project profiles — bookmarks for tenant/project combinations so you can switch between environments (dev, staging, prod) without re-running select-project each time. Each profile is just a saved { tenantId, projectId } pair pinned to a name.

CommandDescription
foir profiles listList all saved profiles
foir profiles show [name]Show details of a profile (or the active one if no name)
foir profiles default [name]Show or set the default profile
foir profiles delete <name>Delete a named profile
OptionApplies toDescription
--confirmdeleteSkip confirmation prompt.

Activate a saved profile with the global --project <name> flag (see CLI Overview).

Examples

# List profiles foir profiles list # Inspect the active profile foir profiles show # Set the default profile so naked CLI calls use staging foir profiles default staging # Remove a profile foir profiles delete old-tenant --confirm

Content Management

records

Manage content records within a model.

CommandDescription
foir records list <modelKey>List records for a model
foir records get <id>Get a record by ID or natural key
foir records create <modelKey>Create a record
foir records update <modelKey> <id>Update a record
foir records delete <id>Delete a record
foir records publish <versionId>Publish a record version
foir records unpublish <id>Unpublish a record
foir records duplicate <modelKey> <id>Duplicate a record
foir records versions <parentId>List versions for a record
foir records variants <recordId>List variants for a record
foir records create-versionCreate a new version
foir records create-variantCreate a variant
foir records cancel-schedule <versionId>Cancel a scheduled publish or unpublish

Examples

# List published records with sorting foir records list blog-post --filter "status=published" --sort "createdAt:desc" --limit 10 # Get a record by natural key (requires --model-key) foir records get hello-world --model-key page # Create a record from a JSON file and publish it foir records create page --file page.json --publish # Publish using a natural key instead of version ID foir records publish my-page --model-key page # List all versions of a record foir records versions clx1234567890

models

Manage content models (schemas).

CommandDescription
foir models listList all models
foir models get <key>Get a model by key
foir models createCreate a model
foir models update <key>Update a model
foir models delete <id>Delete a model
foir models versions <modelId>List schema versions for a model

Examples

# List all models foir models list # Create a model from a JSON file foir models create --file blog-post-model.json # Create models from all files in a directory, updating if they already exist foir models create --dir ./models --upsert # View schema version history foir models versions clx1234567890

locales

Manage locales for content localization.

CommandDescription
foir locales listList all locales
foir locales get <idOrCode>Get a locale by ID or code
foir locales defaultGet the default locale
foir locales createCreate a locale
foir locales update <id>Update a locale
foir locales delete <id>Delete a locale

Examples

# List all locales foir locales list # Get a locale by code foir locales get en-US # Get the default locale foir locales default # Create a new locale foir locales create --data '{"locale":"fr-FR","displayName":"French","nativeName":"Francais"}'

media

Upload and manage media files. The media group handles file uploads via the storage service, while file metadata commands are available through the dynamic files group.

CommandDescription
foir media upload <filepath>Upload a file
foir media listList files
foir media get <id>Get file details
foir media update <id>Update file properties
foir media update-metadata <id>Update alt text, caption, description
foir media delete <id>Delete a file
foir media restore <id>Restore a deleted file
foir media usageGet storage usage stats

Examples

# Upload a file to a specific folder foir media upload ./images/hero.jpg --folder banners # List files filtered by folder foir media list --folder banners # Search for files foir media list --search "hero" # Update file metadata foir media update-metadata clx123 --alt-text "Hero banner image" --caption "Welcome banner" # Check storage usage foir media usage # Permanently delete a file (cannot be restored) foir media delete clx123 --confirm --permanent

files

Inspect and manage files in the media library. For uploads use foir media upload; this group covers everything after upload — listing, renaming, tagging, moving between folders, editing alt text and captions, and reporting storage usage.

CommandDescription
foir files listList files
foir files get <id>Get a file by ID
foir files usageStorage usage statistics
foir files update <id>Update file properties (filename, folder, tags)
foir files update-metadata <id>Update alt text, caption, description
foir files delete <id>Delete a file
OptionApplies toDescription
--folder <folder>list, updateFilter by folder / move to folder.
--mime-type <type>listFilter by MIME type.
--search <term>listSearch by filename.
--limit <n>listMax results. Default: 50.
--offset <n>listSkip results. Default: 0.
--filename <name>updateNew filename.
--tags <tags>updateComma-separated tags.
--alt-text <text>update-metadataAlt text.
--caption <text>update-metadataCaption.
--description <text>update-metadataDescription.
--confirmdeleteSkip confirmation prompt.

Examples

# List images in the /banners folder foir files list --folder banners --mime-type image/jpeg # Search by filename foir files list --search hero # Move a file to a different folder foir files update clx123 --folder archive # Tag a file foir files update clx123 --tags "homepage,launch,q2" # Add alt text + caption for accessibility / SEO foir files update-metadata clx123 \ --alt-text "A woman walking through a field of barley at sunrise" \ --caption "Spring '26 campaign" # Storage usage summary foir files usage --json

Search across all records globally.

foir search <query> [options]
OptionDescription
--models <keys>Filter to specific model keys (comma-separated)
--limit <n>Maximum number of results (default: 20)

Examples

# Search across all content foir search "getting started" # Search within specific models foir search "pricing" --models page,blog-post --limit 5 # Output as JSON for scripting foir search "hello" --json

rollouts

Manage rollouts — bulk scheduled-publishing batches that promote a mixed set of records, models, operations, auth providers, and other publishable resources together at a chosen time. The admin equivalent is Scheduled Publishing → Rollouts; see Scheduled Publishing for the feature overview.

CommandDescription
foir rollouts listList rollouts
foir rollouts get <id>Get a rollout (with its items)
foir rollouts createCreate a rollout
foir rollouts update <id>Update name, description, or scheduledAt
foir rollouts delete <id>Delete a rollout before it runs
foir rollouts trigger <id>Trigger a rollout immediately (ignore its scheduled time)
foir rollouts pause <id>Pause an in-flight rollout
foir rollouts resume <id>Resume a paused rollout
foir rollouts retry <id>Retry failed items in a rollout
foir rollouts rollback <id>Roll back a completed rollout
foir rollouts add-items <id>Add items (records / models / operations / etc.) to a rollout
foir rollouts remove-items <id>Remove items from a rollout
OptionApplies toDescription
--status <status>listFilter by status.
--limit <n>listMaximum results. Default: 50.
--offset <n>listPagination offset.
-d, --data <json>create, update, add-items, remove-itemsPayload as a JSON string.
--file <path>create, update, add-items, remove-itemsPayload from a JSON file.
--previewrollbackPreview the rollback without executing — useful for confirming scope.
--confirmdelete, rollbackSkip confirmation prompt.

Note on lifecycle: use delete for rollouts that haven’t been triggered yet, rollback for ones that have. The CLI rejects mixing these.

Examples

# Create a rollout scheduled for next Monday foir rollouts create --data '{ "name": "Weekly Release", "scheduledAt": "2026-05-19T09:00:00Z", "items": [ { "kind": "record", "versionId": "ver_abc123" }, { "kind": "record", "versionId": "ver_def456" } ] }' # Inspect the rollout, including its items foir rollouts get rollout_abc123 --json # Add more items to a draft rollout foir rollouts add-items rollout_abc123 --file ./additional-items.json # Trigger immediately, skipping the scheduled time foir rollouts trigger rollout_abc123 # Pause while it runs, then resume foir rollouts pause rollout_abc123 foir rollouts resume rollout_abc123 # Retry items that failed during the run foir rollouts retry rollout_abc123 # Preview a rollback before committing foir rollouts rollback rollout_abc123 --preview # Execute the rollback foir rollouts rollback rollout_abc123 --confirm # Delete a rollout that never ran foir rollouts delete rollout_abc123 --confirm

Customers and Targeting

customers

Manage customer accounts.

CommandDescription
foir customers listList customers
foir customers get <idOrEmail>Get a customer by ID or email
foir customers createCreate a customer
foir customers delete <id>Delete a customer

Examples

# List all customers foir customers list # Get a customer by email foir customers get user@example.com # Create a customer foir customers create --data '{"email":"new@example.com","name":"New User"}'

customer-profiles

Manage customer profile schemas and data.

CommandDescription
foir customer-profiles schemaGet the customer profile schema
foir customer-profiles update-schemaUpdate the profile schema
foir customer-profiles get <customerId>Get a customer’s profile data
foir customer-profiles set <customerId>Set a customer’s profile data

Examples

# View the current profile schema foir customer-profiles schema --json # Update the profile schema foir customer-profiles update-schema --file profile-schema.json # Set profile data for a customer foir customer-profiles set clx123 --data '{"preferences":{"theme":"dark"}}'

segments

Define and manage customer segments with rule-based targeting.

CommandDescription
foir segments listList segments
foir segments get <idOrKey>Get a segment by ID or key
foir segments createCreate a segment
foir segments update <id>Update a segment
foir segments delete <id>Delete a segment
foir segments previewPreview segment rules against sample data
foir segments test <segmentId> <customerId>Test if a customer matches a segment

Examples

# List active segments foir segments list # Preview rules before saving foir segments preview --file segment-rules.json # Test a segment against a specific customer foir segments test clx_seg_123 clx_cust_456

variant-catalog

Manage the variant catalog for content personalization.

CommandDescription
foir variant-catalog listList variant catalog entries
foir variant-catalog get <idOrKey>Get an entry by ID or key
foir variant-catalog createCreate a variant catalog entry
foir variant-catalog update <id>Update a variant catalog entry
foir variant-catalog delete <id>Delete a variant catalog entry

Examples

# List all variant catalog entries foir variant-catalog list # Get a variant by key foir variant-catalog get premium-users # Create a new variant catalog entry foir variant-catalog create --data '{"key":"mobile","name":"Mobile Users","isActive":true}'

context

Manage context dimensions used for targeting and personalization.

CommandDescription
foir context listList context dimensions
foir context get <idOrKey>Get a context dimension by ID or key
foir context createCreate a context dimension
foir context update <id>Update a context dimension
foir context delete <id>Delete a context dimension

Examples

# List all context dimensions foir context list # Get a context dimension by key foir context get device-type # Create a new context dimension foir context create --data '{"key":"region","name":"Region"}'

Automation

operations

Manage server-side operations (custom endpoints).

CommandDescription
foir operations listList operations
foir operations get <key>Get an operation by key
foir operations createCreate an operation
foir operations update <key>Update an operation
foir operations delete <key>Delete an operation
foir operations executeExecute an operation
foir operations statsGet execution statistics
foir operations dead-lettersList failed (dead letter) operations
foir operations retry-dead-letter <id>Retry a failed operation
foir operations dismiss-dead-letter <id>Dismiss a failed operation

Examples

# List all operations foir operations list # Execute an operation with input data foir operations execute --data '{"key":"send-welcome-email","input":{"userId":"clx123"}}' # View dead letter queue foir operations dead-letters # Retry a failed operation foir operations retry-dead-letter clx_dl_456

hooks

Manage lifecycle hooks — webhooks that fire on platform events (record.published, record.deleted, etc.). Hooks can also be declared in foir.config.ts and reconciled with foir push; this group is for one-off CRUD and for inspecting delivery history that lives outside the config file.

CommandDescription
foir hooks listList hooks
foir hooks get <keyOrId>Get a hook by key or ID
foir hooks createCreate a hook
foir hooks update <id>Update a hook
foir hooks delete <id>Delete a hook
foir hooks deliveries <hookId>List recent deliveries for a hook
foir hooks retry-delivery <deliveryId>Retry a failed delivery
foir hooks test <hookId>Send a test delivery
OptionApplies toDescription
--event <event>listFilter by event name.
--activelist, updateList only active hooks / activate a hook.
--inactivelistList only inactive hooks.
--no-activeupdateDeactivate a hook.
--limit <n>list, deliveriesMaximum results. Default: 50.
--offset <n>list, deliveriesPagination offset.
--status <status>deliveriesFilter deliveries by status (success, failed, pending).
-d, --data <json>create, update, testPayload as a JSON string.
--file <path>create, update, testPayload from a JSON file.
--confirmdeleteSkip confirmation prompt.

Examples

# List active hooks for a specific event foir hooks list --event record.published --active # Create a hook from a JSON file foir hooks create --file ./hooks/on-publish.json # Inline create foir hooks create --data '{"key":"on-publish","name":"On Publish","event":"record.published","url":"https://example.com/webhook"}' # Deactivate without removing foir hooks update hook_abc123 --no-active # Recent failed deliveries for a hook foir hooks deliveries hook_abc123 --status failed --limit 20 # Send a synthetic delivery to verify the receiver foir hooks test hook_abc123 --data '{"message":"test"}' # Retry one failed delivery foir hooks retry-delivery del_456

schedules

Manage scheduled tasks with cron expressions.

CommandDescription
foir schedules listList schedules
foir schedules get <key>Get a schedule by key
foir schedules createCreate a schedule
foir schedules update <key>Update a schedule
foir schedules trigger <key>Trigger a schedule immediately
foir schedules pause <key>Pause a schedule
foir schedules resume <key>Resume a paused schedule
foir schedules delete <key>Delete a schedule

Examples

# List all schedules foir schedules list # Create a scheduled task foir schedules create --file daily-sync.json # Trigger a schedule immediately (outside its cron) foir schedules trigger daily-sync # Pause a schedule foir schedules pause daily-sync

Administration

settings

Manage project settings.

CommandDescription
foir settings listList all settings
foir settings get <key>Get a setting by key
foir settings setSet a setting value
foir settings delete <key>Delete a setting

Examples

# List all settings foir settings list # Get a specific setting foir settings get site.name # Set a setting value foir settings set --data '{"key":"site.name","value":"My Site"}'

design-tokens

Manage the project’s design tokens document.

CommandDescription
foir design-tokens getPrint the current document
foir design-tokens apply <path>Apply a W3C-formatted JSON document from disk
foir design-tokens publishPromote draft → published
foir design-tokens unpublishRemove the published snapshot
foir design-tokens statusShow draft / published version status
OptionApplies toDescription
--channel <draft|published>getChannel to read. Default: draft.
--resolvedgetPrint the server-resolved view (typed arrays, references expanded) instead of the raw W3C document.
--publishapplyAlso publish after applying.

Examples

# Print the draft document as JSON foir design-tokens get # Print the resolved view (groups expanded into flat arrays) foir design-tokens get --resolved # Diff what the storefront is serving against the draft foir design-tokens get --channel published > published.json foir design-tokens get --channel draft > draft.json diff published.json draft.json # Apply a hand-authored or generated tokens document foir design-tokens apply ./tokens.json # Apply and publish in one step foir design-tokens apply ./tokens.json --publish # Promote the current draft to published foir design-tokens publish # Check whether draft and published are in sync foir design-tokens status

Tip: For projects that track tokens in foir.config.ts, use foir push --publish instead — it applies models, operations, and design tokens (and publishes them) in one step.

secrets

Manage vault secrets — opaque references your app code resolves to plaintext at runtime. Plaintext values never leave your machine; the CLI stores only encrypted blobs on the platform.

CommandDescription
foir secrets putStore a new secret and print its ref
foir secrets listList secret metadata (no plaintext)
foir secrets rotate <ref>Replace plaintext for an existing ref; returns a new ref
foir secrets delete <ref>Soft-delete a secret (recoverable until purged)
foir secrets restore <ref>Undo a soft-delete (only valid before the purge window passes)
foir secrets pushReconcile a foir.secrets.ts declaration file with the vault
foir secrets purgeDrop every soft-deleted secret past its TTL
OptionApplies toDescription
--label <label>putOptional human-readable label.
--app <name>put, listOwner: app name. Default: project-owned.
--file <path>put, rotateRead plaintext from file (binary-safe).
--value <plaintext>put, rotatePlaintext value (string only; prefer --file for binary).
--include-soft-deletedlistInclude soft-deleted entries.
--config <path>pushPath to foir.secrets.ts (default: auto-discover).
--plaintext <path>pushPath to local.foir.secrets.ts (default: auto-discover).
--rotatepushRotate plaintext for secrets that already exist.
--dry-runpushShow what would change without writing.
--confirmrotate, delete, purgeSkip confirmation prompt.

Examples

# Store a new secret from a file (binary-safe) foir secrets put --file ./stripe.key --label "Stripe API key" # Store a string value foir secrets put --value "sk_test_..." --label "Stripe (test)" # List project-owned secrets foir secrets list # Reconcile a declarative secrets file foir secrets push --config foir.secrets.ts --plaintext local.foir.secrets.ts # Rotate (returns a new ref — update your app code) foir secrets rotate vault:abc123 --file ./new-stripe.key # Soft-delete and undo foir secrets delete vault:abc123 --confirm foir secrets restore vault:abc123

api-keys

Manage API keys for programmatic access.

CommandDescription
foir api-keys listList API keys
foir api-keys createCreate an API key
foir api-keys rotate <id>Rotate an API key
foir api-keys revoke <id>Revoke an API key

Examples

# List all API keys foir api-keys list # Create a new API key foir api-keys create --data '{"name":"CI Pipeline"}' # Rotate an existing key (requires confirmation) foir api-keys rotate clx123 --confirm # Revoke a key foir api-keys revoke clx123 --confirm

auth-providers

Manage customer authentication providers (OAuth, SAML, etc.).

CommandDescription
foir auth-providers listList customer auth providers
foir auth-providers get <id>Get an auth provider
foir auth-providers createCreate an auth provider
foir auth-providers update <id>Update an auth provider
foir auth-providers delete <id>Delete an auth provider

Examples

# List configured auth providers foir auth-providers list # Create a Google OAuth provider foir auth-providers create --file google-auth.json

auth

Inspect customer-auth configuration and verify customer tokens. Distinct from auth-providers, which manages the OAuth/OIDC providers themselves — this group is about the project’s overall customer-auth settings and the tokens those providers issue.

For end-user auth concepts see Customer Authentication.

CommandDescription
foir auth configPrint the project’s customer-auth configuration
foir auth verify-token <token>Verify a customer JWT and print its claims

verify-token calls the platform — the same code path the admin app uses. Useful for diagnosing token issues from CI or a local shell without writing client code.

Examples

# Show the active customer-auth configuration foir auth config --json # Verify a JWT carried in a request header during local debugging foir auth verify-token "eyJhbGciOi..."

notifications

Manage platform notifications.

CommandDescription
foir notifications listList notifications
foir notifications read <id>Mark a notification as read
foir notifications read-allMark all notifications as read

Examples

# List unread notifications foir notifications list # Mark all as read foir notifications read-all

notes

Manage notes attached to entities (records, models, etc.).

CommandDescription
foir notes listList notes
foir notes get <id>Get a note
foir notes createCreate a note
foir notes resolveResolve a note
foir notes delete <noteId>Delete a note

Examples

# Create a note on a record foir notes create --data '{"entityType":"record","entityId":"clx123","content":"Needs review before publishing"}' # Resolve a note foir notes resolve --data '{"id":"clx_note_456"}' # Delete a note foir notes delete clx_note_456 --confirm

Apps

apps

Install and manage apps — pluggable units delivered by manifest URL.

CommandDescription
foir apps listList installed apps
foir apps get <name>Get an installed app by name
foir apps install <manifestUrl>Install an app from a manifest URL
foir apps update <name>Check for updates and apply if no rejected changes
foir apps uninstall <name>Uninstall (runs __uninstall first if declared)
foir apps trigger <appName> <operationKey>Trigger an app-owned operation
foir apps validate <manifestUrl>Dry-run validation of a manifest URL

Examples

# List installed apps foir apps list # Install with inline mappings (ad-hoc) foir apps install https://shopify.apps.foir.io/manifest.json \ --source-map '{"product":{"toModel":"product","naturalKey":"handle","fields":{"title":"title","handle":"handle"}}}' # Install via foir.config.ts (golden path) — declare apps.<name> and run: foir push # Check for updates with a diff foir apps update redirector --dry-run # Apply updates (only safe-auto changes apply automatically; rejected changes block) foir apps update redirector # Trigger a specific operation on an installed app foir apps trigger redirector deploy-worker --data '{"force":true}' # Force-uninstall (skip middleware __uninstall, remove platform state regardless) foir apps uninstall redirector --force # Validate a manifest before installing foir apps validate https://my-app.example.com/manifest.json

The CLI namespaces app-owned operation keys as <appName>/<operationKey> when storing them, but foir apps trigger accepts the bare key form too.

Scaffolding

create-config

Scaffold a new app or extension project — a Vite UI + Hono API monorepo wired up for Foir’s scoped-token verification.

npx @eide/foir-cli create-config <name> [options]
OptionDescription
--type <type>Project type: custom-editor, workflow, or widget

Examples

# Custom editor placement (UI + middleware) npx @eide/foir-cli create-config my-editor --type custom-editor # Pure backend operation (no UI) npx @eide/foir-cli create-config my-summarizer --type workflow # Static iframe (no middleware) npx @eide/foir-cli create-config color-picker --type widget

See Building an App and Building Operations for end-to-end walkthroughs.

init

Generate starter files for a project — a fresh foir.config.ts, a single model definition, or a tree of seed records for existing models. Run from inside a project that already has a foir.config.ts.

CommandDescription
foir initGenerate a starter foir.config.ts in the current directory
foir init model <key>Generate a starter model definition file
foir init recordsGenerate seed files for one or more existing models (interactive picker)
OptionApplies toDescription
-o, --output <dir>model, recordsOutput directory. Default: models for model, seed for records.
--tsmodel, recordsEmit TypeScript (.ts) instead of JSON.

Examples

# Scaffold a fresh foir.config.ts in this folder foir init # Create a starter model file at ./models/blog-post.ts foir init model blog-post --ts # Generate seed records into ./seed/ for models you pick interactively foir init records --ts

create-extension

Legacy alias for the extension scaffolder. New projects should use create-config.

Config Management

configs

Manage platform configs (bundles of models, operations, hooks, and schedules).

CommandDescription
foir configs listList all configs
foir configs get <idOrKey>Get a config by ID or key
foir configs registerRegister a new config
foir configs applyApply a config
foir configs uninstall <id>Unregister a config and its resources
foir configs sync <configId>Trigger a config data sync

Examples

# List all configs foir configs list # Get a config by key foir configs get my-blog-config # Apply a config foir configs apply --file config.json # Trigger a sync foir configs sync clx123

pull

Export the current platform state of a config back into a local foir.config.ts file. Inverse of push — useful when an admin edited models or operations in the dashboard and you want those changes back in source control.

foir pull [options]
OptionDescription
--key <configKey>Config key to export (default: auto-discover from the current foir.config.ts)
--out <path>Output file (default: foir.config.ts next to the current one)
--forceOverwrite an existing file without prompting

Examples

# Pull the current project's config into ./foir.config.ts foir pull # Pull a named config and write to a different file foir pull --key my-blog-config --out ./configs/blog.config.ts # Overwrite without prompt (useful in CI / pre-commit hooks) foir pull --force

push

Push a local foir.config.ts file to the platform. This registers or updates a config and all its associated resources.

foir push [options]
OptionDescription
--config <path>Path to config file (default: auto-discovers foir.config.ts)
--forceOverwrite platform state on three-way-merge conflicts with admin-UI edits
--publishPromote updated models, operations, auth providers, profile schema, and design tokens to the published channel after the push. New resources auto-publish; this flag covers updates, which are otherwise left as drafts.
--rotate-keysRotate existing API keys and rewrite their values in .env
--env <path>Path to .env file (default: .env)

Examples

# Push the config file in the current directory foir push # Push a specific config file foir push --config ./configs/blog.config.ts # Apply and publish in one step — including design tokens foir push --publish # Overwrite admin-UI edits when the three-way merge reports conflicts foir push --force

remove

Remove a config and all its provisioned resources (models, operations, hooks, schedules).

foir remove <key> [options]
OptionDescription
--forceSkip the confirmation prompt

Examples

# Remove a config (with confirmation prompt) foir remove my-blog-config # Remove without confirmation foir remove my-blog-config --force

Embeddings and AI

embeddings

Manage vector embeddings for semantic search and similarity. Pairs with the AI & Search feature; the embedding pipeline runs on the platform but the CLI is how you trigger writes, deletes, and ad-hoc searches outside the admin app.

CommandDescription
foir embeddings writeWrite an embedding vector for a record
foir embeddings delete <recordId>Delete the embedding for a record
foir embeddings searchSearch by vector similarity
foir embeddings list <recordId>List embeddings stored for a record
foir embeddings stats [modelKey]Embedding statistics, optionally scoped to a model
foir embeddings similar <recordId>Find records similar to the given record
OptionApplies toDescription
-d, --data <json>write, searchInput payload as a JSON string.
--file <path>write, searchInput payload from a JSON file.
--confirmdeleteSkip confirmation prompt.
--model-key <key>similarLimit matches to a specific model.
--limit <n>similarMaximum results. Default: 10.

Examples

# Write an embedding from a file foir embeddings write --file embeddings.json # Semantic search (JSON payload describes the query) foir embeddings search --data '{"query":"machine learning","modelKey":"article","limit":10}' # Find similar records, scoped to a model foir embeddings similar clx123 --model-key article --limit 5 # Embedding statistics for a single model foir embeddings stats article --json # Project-wide stats (no model key) foir embeddings stats --json # Delete the embedding attached to a record foir embeddings delete clx123 --confirm
Last updated on