> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI reference

> Fimo commands grouped by area, with links to task guides for complete workflows.

Sites use the existing project command names and IDs: `fimo projects`, `--project-id`, and `.fimo/project.json` are unchanged. Use the commands below exactly as written.

Run a one-off command with the latest CLI release without installing it globally:

> [tab] npm
>
> ```bash theme={null}
> npx fimo@latest <command>
> ```

> [tab] Bun
>
> ```bash theme={null}
> bunx fimo@latest <command>
> ```

> [tab] pnpm
>
> ```bash theme={null}
> pnpm dlx fimo@latest <command>
> ```

> [tab] Yarn
>
> ```bash theme={null}
> yarn dlx fimo@latest <command>
> ```

Inside a site with dependencies installed, run the site-pinned CLI:

> [tab] npm
>
> ```bash theme={null}
> npm exec -- fimo <command>
> ```

> [tab] Bun
>
> ```bash theme={null}
> bunx --no-install fimo <command>
> ```

> [tab] pnpm
>
> ```bash theme={null}
> pnpm exec fimo <command>
> ```

> [tab] Yarn
>
> ```bash theme={null}
> yarn fimo <command>
> ```

The tables use `fimo <command>` for brevity. Run `fimo --help` for the full surface and `fimo <command> --help` for every argument and flag.

Site-scoped commands target the current Git Branch. Use `--branch <name>` to override it for one command; the removed `--env <name>` selector is rejected. Other global options include `--json`, `--no-color`, and `--ascii`. Some commands add their own output flags.

## Paginated lists

Paginated list commands share three flags:

```bash theme={null}
fimo <list-command> --limit 20
fimo <list-command> --limit 20 --cursor <next-cursor>
fimo <list-command> --all-pages
```

`--limit` sets the page size. When more results exist, the command returns a `nextCursor` or prints an exact continuation command using `--cursor`. Use `--all-pages` when you intentionally need every remaining result. The older `--before`, `--offset`, and schedule `--all` spellings remain accepted as compatibility aliases, but new scripts should use the shared flags.

## Sites & onboarding

| Command | What it does |
| - | - |
| `fimo init [dir]` | Create a new Next.js App Router site by default. |
| `fimo init [dir] --framework react-router` | Create a new React Router site explicitly. |
| `fimo init [dir] --framework astro` | Create a minimal content-backed Astro site. |
| `fimo init [dir] --framework nextjs` | Create a minimal Next.js App Router site. |
| `fimo init [dir] --framework sveltekit` | Create a minimal SvelteKit site. |
| `fimo init --project-id <id>` | Link and clone an existing site. |
| `fimo clone [projectId] [dir]` | Clone an existing site locally. |
| `fimo link [projectId]` | Adopt the application in the current folder, in place. |
| `fimo projects list` | List sites in an org. |
| `fimo projects create [dir]` | Create a site through the `init` flow. |
| `fimo projects clone [projectId] [dir]` | Clone a site. |
| `fimo projects delete [projectId]` | Delete a site. |
| `fimo projects publish [projectId]` | Publish a site. |
| `fimo projects unpublish [projectId]` | Take a site offline. |
| `fimo projects rename <name> [projectId]` | Set a site's display name. |
| `fimo projects transfer [projectId]` | Move a site to an organization you administer. |
| `fimo rename "<name>"` | Set the site/dashboard name; commit and deploy to apply it. |
| `fimo unpublish` | Take the site offline. |
| `fimo delete` | Delete the current site. |
| `fimo validate` | Run all checks + codegen. |
| `fimo update <version>` | Update the site's Fimo packages to an exact release. |

## Migration

> [!NOTE]
>
> See [Migrate an existing site](/docs/migration/overview.md) for what to provide and the review it needs.

| Command | What it does |
| - | - |
| `fimo migrate init <dir> --project-id <id>` | Prepare a migration target in an existing site. |
| `fimo migrate init <dir> --org <orgId>` | Create a new site and prepare it as the migration target. |

`fimo migrate init` only sets the target up: it creates or links the site, scaffolds it, and pushes the first commit. It never reads the source site. Your coding agent reads the source and does the rebuild.

### Migration flags

| Flag | What it does |
| - | - |
| `-C, --cwd <dir>` | Use an existing site directory instead of the `<dir>` argument. |
| `--project-id <projectId>` | Link an existing site. |
| `--org <organizationId>` | Select the organization for a new site. |
| `--source-platform <platform>` | Say where the site comes from: `webflow`, `framer`, `squarespace`, `wix`, `carrd`, `wordpress`, `nextjs`, `astro`, `react-router`, or `other`. |
| `--framework <framework>` | Select the target site framework. |
| `--template-root <path>` | Override the site template directory. |
| `--install`, `--no-install` | Control dependency installation. |
| `--agents <list>` | Select coding agents when creating a site. |
| `-a, --agent <id>` | Add one coding agent. Repeat for more than one. |
| `--mode <mode>` | Select `symlink` or `copy` for installed skills. |
| `--json` | Print the setup receipt as structured output. |

## Account & organizations

| Command | What it does |
| - | - |
| `fimo login` | Sign in via browser. |
| `fimo logout` | Revoke the session, clear credentials. |
| `fimo whoami` | Show the signed-in user + active org. |
| `fimo orgs list` | List orgs you belong to. |
| `fimo orgs members` | List members of an org. |
| `fimo orgs switch` | Change the active organization. |
| `fimo credits` | Inspect the org's AI credit balance (read-only). |
| `fimo referral link` | Print your referral link. |
| `fimo referral stats` | Show your referral statistics. |

## Support

| Command | What it does |
| - | - |
| `fimo support report "<message>"` | Submit a site-scoped report to Fimo's internal support queue; it does not open a Pylon ticket. |

## Content

| Command | What it does |
| - | - |
| `fimo schemas push [TypeName]` | Create/update schemas (omit name to push all). |
| `fimo schemas list` | List registered schemas. |
| `fimo schemas get <TypeName>` | Get a single schema. |
| `fimo schemas delete <TypeName>` | Delete a schema. |
| `fimo entries create <TypeName> --body '<json>'` | Create an entry. |
| `fimo entries list <TypeName>` | Query paginated entries (`--where`, `--sort`, `--fields`, `--populate`, ...). |
| `fimo entries get <TypeName> <id>` | Get an entry (`--locale`, `--populate`). |
| `fimo entries update <TypeName> <id> --body '<json>'` | Update an entry. |
| `fimo entries delete <TypeName> <id>` | Delete an entry. |
| `fimo entries query --sql '<select>'` | Run read-only SQL over the entries table. |
| `fimo entries bulk-create <TypeName>` | Create entries from a JSON array. |
| `fimo entries bulk-update <TypeName>` | Update entries by IDs, filter, file, or stdin (`--locale` for one language). |
| `fimo entries bulk-delete <TypeName>` | Delete entries by IDs or filter. |
| `fimo singles get <TypeName>` | Get a single content value. |
| `fimo singles update <TypeName> --body '<json>'` | Update a single content value. |

See [Content and schemas](/docs/cli/content.md) for the content workflow.

## Forms

| Command | What it does |
| - | - |
| `fimo forms push [formName]` | Push form JSON (patches `id` back). |
| `fimo forms list` | List registered forms. |
| `fimo forms get <id>` | Get a single form. |
| `fimo forms delete <id>` | Delete a form. |
| `fimo forms submissions list <formIdOrName>` | List paginated submissions (newest first). |
| `fimo forms submissions get <formIdOrName> <submissionId>` | Get one submission. |
| `fimo forms submissions stats <formIdOrName>` | Submission stats. |

## Media

| Command | What it does |
| - | - |
| `fimo assets upload <path>` | Upload a file to the library. |
| `fimo assets bulk-upload <path>` | Upload files from a directory. |
| `fimo assets list` | Browse the paginated library (filters + search). |
| `fimo assets read <id>` | Read supported asset content for an agent. |
| `fimo assets open <id>` | Print metadata / `--download` / `--browser`. |
| `fimo assets create-folder <name>` | Create a media folder. |
| `fimo assets move <id> --parent-id <folder>` | Move an asset into a folder. |
| `fimo assets usage <id>` | Check Current, Main, and Live reference impact. |
| `fimo assets replace <id> --with <id>` | Replace Current Branch structured references. |
| `fimo assets remove <id>` | Safely remove from the current Branch. |
| `fimo assets remove <id> --permanent` | Confirm site-wide destruction. |
| `fimo image generate` | Generate an image from a prompt. |
| `fimo image edit` | Edit one or more images from an instruction. |
| `fimo image remove-background` | Create a transparent cutout. |
| `fimo image upscale` | Increase image resolution. |
| `fimo video generate` | Generate video from text or an image. |
| `fimo video animate` | Transfer motion from a video to an image. |
| `fimo video replace` | Replace people in a video. |

## Labels

| Command | What it does |
| - | - |
| `fimo labels set <key> --value <v>` | Create/update one label. |
| `fimo labels set-many --data '<json>'` | Bulk set labels (`--file` also works). |
| `fimo labels list` | Inspect labels in the DB. |
| `fimo labels delete <key>` | Delete a label. |
| `fimo validate` | Verify every `t()` key has a DB value. |

## Locales

| Command | What it does |
| - | - |
| `fimo locales list` | List configured locales and content coverage. |
| `fimo locales add <locale>` | Add a locale to the current Branch. |
| `fimo locales set-default <locale>` | Set the current Branch's default locale. |
| `fimo locales remove <locale>` | Remove a locale and permanently delete its stored content. |

## Deploy & publish

| Command | What it does |
| - | - |
| `fimo deploy [-m "<msg>"]` | On-demand hosted preview / shareable link. |
| `fimo deploy --description "<why>"` | Record why the change was made in its commit body. |
| `fimo deploy --publish` | Publish from the configured Production source. |
| `fimo preview url` | Show the Branch's hosted preview URL (no push). |
| `fimo publish` | Publish the revision on the Fimo remote; no push. |
| `fimo publish list` | List paginated publication attempts. |
| `fimo publish inspect <publicationId>` | Inspect one publication attempt. |
| `fimo publish logs <publicationId>` | Read one publication's build log. |
| `fimo logs` | Read paginated site logs. |

See [Deploy and publish](/docs/deploy/overview.md) for the workflow.

## Site checks

| Command | What it does |
| - | - |
| `fimo site check <paths...>` | Check named pages of the Branch's hosted preview (at most 50). |
| `fimo site check --all` | Check every page: home, sitemap, llms.txt and what they link to. |
| `fimo site check ... --topic <topics>` | Only these topics, comma-separated (`meta-tags`, `broken-links`, …). |
| `fimo site check ... --browser` | Render every page in a real browser: accessibility, phone layout, consent. |
| `fimo site check ... --url <origin>` | Check another address instead of the hosted preview. |
| `fimo site links <paths...>` | List the named pages' links and each target's status. |

See [Check your site](/docs/deploy/site-checks.md) for topics and results.

## Branches

| Command | What it does |
| - | - |
| `fimo branch [<name>]` | List or create Branches (`-d` deletes). |
| `fimo checkout [-b] <name>` | Switch Branches; your app follows the git branch (`-b` creates + switches). |
| `fimo switch <name>` | Switch to an existing Branch. |
| `fimo pull` | Bring the current Branch's latest code from Fimo into your checkout. |
| `fimo diff [from] [to]` | Compare two Branches across all surfaces. |
| `fimo status` | Multi-surface status vs the parent Branch. |
| `fimo merge <from>` | Merge another Branch in. |
| `fimo history list` | List paginated restore points. |
| `fimo history show <versionId>` | Show one restore point. |
| `fimo history create <name>` | Create a restore point. |
| `fimo history restore <versionId>` | Restore a recorded version. |

## Environments

Environments group Branches for deployment. They are a different concept from a Branch: Production and Preview are built in, and a custom Environment claims Branches by name or pattern.

| Command | What it does |
| - | - |
| `fimo environments list` | List built-in and custom Environments. |
| `fimo environments create <name>` | Create a custom Environment. |
| `fimo environments update <name-or-id>` | Update a custom Environment. |
| `fimo environments delete <name-or-id>` | Delete a custom Environment. |

## Site variables & secrets

Every command targets one Environment with `--env production`, `--env preview` or `--env <name>` for a custom Environment. Without `--env`, it targets the Environment of the checked-out Branch, so `main` targets Preview, not Production.

| Command | What it does |
| - | - |
| `fimo vars list [--env <environment>]` | List variables; private values are masked. |
| `fimo vars add <key> <value>` | Create a variable. |
| `fimo vars add <key> --private --stdin` | Create a private variable for server-side keys. |
| `fimo vars update <key> <value>` | Update a variable. |
| `fimo vars unset <key>` | Remove a variable. |
| `fimo vars pull [file]` | Write the Environment's public variables to an env file. |
| `fimo secrets list [--env <environment>]` | List masked secrets. |
| `fimo secrets add <key> --stdin` | Create a secret. |
| `fimo secrets update <key> --stdin` | Rotate a secret. |
| `fimo secrets unset <key>` | Remove a secret. |

For example, `fimo vars add STRIPE_SECRET_KEY --private --stdin --env production` sets the live key, and the same command with `--env preview` sets the test key. Each result names the Environment it changed. A Production change reaches the live site only after you publish again, and the command warns about it. Picking the Environment with `--branch` still works for these commands but is deprecated and prints a warning.

Public variables are readable and may use browser-safe prefixes such as `VITE_`, `PUBLIC_`, `NEXT_PUBLIC_`, or `NUXT_PUBLIC_`. Private variables hold API keys the site's server code reads: they are hidden after they are written, reach previews, schedules, and production as server-side environment variables, never land in an env file or the browser bundle, and cannot use those prefixes. Secrets are for Fimo itself (webhooks, schedules, agents) and never reach the site.

`fimo vars` writes public variables into a managed block in `.env.local` so local development picks the value up immediately, and `fimo vars pull` refreshes it later. Private variables are never pulled: for each one you have not set yourself, the block gets a comment reminding you to add a local value outside it. See [Variables](/docs/studio/variables.md) and [Secrets](/docs/studio/secrets.md) for the Studio side, and use `--help` before changing stored values.

## Integrations

Integrations run on the current site: run them inside a linked site, or pass `--project <id>` (and `-C, --cwd <dir>`) to any of these commands.

| Command | What it does |
| - | - |
| `fimo integrations list` | List the integrations the site can use, with each integration's id and state. |
| `fimo integrations info <integration>` | Read an integration's guide: when to use it and how. |
| `fimo integrations tools [integration] [--search <words>]` | Find tools by what they do, with each tool's effect and input fields. |
| `fimo integrations run <integration> <tool> --input '<json>'` | Run a tool. `--input` also takes `@file.json` or `-` for stdin. |
| `fimo integrations enable <integration>` / `disable <integration>` | Turn an integration on or off for the current site. |
| `fimo integrations settings <integration> [--set key=value]` | Show or change the site's settings for an integration. |
| `fimo integrations connect <integration> --token-stdin` | Add the organization's API key for an integration such as PostHog or Resend, and turn the integration on here. |
| `fimo integrations add <name> --url <https-url>` | Add a remote MCP server as an integration for the organization and turn it on here. |
| `fimo integrations reconnect <integration>` | Sign in to an MCP integration's server again. |
| `fimo integrations rotate <integration>` | Replace an MCP integration's token or headers. |
| `fimo integrations remove <integration> --yes` | Remove an MCP integration and its credentials from every site of the organization. |

`connect`, `add`, `reconnect`, `rotate` and `remove` need an organization admin.

| Flag | Commands | What it does |
| - | - | - |
| `--approval <code>` | `run` | Run a change someone allowed in Studio, with the code Studio showed and the same input. |
| `--org <organizationId>` | `connect` | Choose the organization. Defaults to the site's organization or the active one. |
| `--token-stdin` / `--token <value>` | `connect`, `add` | Read the API key, token or header value from stdin, or pass it inline. |
| `--auth <auto\|none\|bearer\|header>` | `add` | How Fimo signs in. `auto`, the default, uses browser sign-in or connects a public server. |
| `--header-name <name>` | `add` | The header that carries the value with `--auth header`. |
| `--header <name>` | `add` | One of several headers with `--auth header`. Repeat it for each header. |
| `--headers-stdin` | `add`, `rotate` | Read one JSON object of complete header values from stdin. |
| `--token-stdin` | `rotate` | Read a replacement bearer token from stdin. |
| `--no-open` | `add`, `reconnect` | Print the sign-in URL instead of opening a browser. |
| `-y, --yes` | `remove` | Confirm removing the integration from every site. |

Prefer `--token-stdin` over `--token` in shells that record history. A tool that changes data in the outside service may [need a yes](/docs/studio/integrations.md#changes-need-a-yes): when it needs approval, `fimo integrations run` stops with `APP_APPROVAL_REQUIRED` and a link to Studio. Once someone allowed it there, run the same command with `--approval <code>` and the one-time code Studio showed, within the hour. See [Integrations](/docs/studio/integrations.md) and [Add MCP servers](/docs/cli/mcp.md).

### Built-in services

Firecrawl and Fal are built into Fimo, on Fimo's provider account and billed in Fimo credits. They are no longer
available to new sites. A site that already uses one keeps it: it shows in `fimo integrations list`, and
`info <key>`, `status <key>`, `enable`, `disable` and `run <key> <tool>` work as before. To use your own provider
account instead, add that provider's MCP server with `fimo integrations add`.

### Deprecated commands

`fimo mcp` still works, prints a warning, and runs through the same change checks. Use these instead:

| Deprecated | Use |
| - | - |
| `fimo mcp list` | `fimo integrations list` |
| `fimo mcp info <server>` | `fimo integrations info <integration>` |
| `fimo mcp search <query>` | `fimo integrations tools --search <words>` |
| `fimo mcp run` | `fimo integrations run <integration> <tool>` |
| `fimo mcp add`, `reconnect`, `rotate` | `fimo integrations add`, `reconnect`, `rotate` |

## Domains

| Command | What it does |
| - | - |
| `fimo domains list` | Default URL + custom domains. |
| `fimo domains rename-default <slug>` | Rename the default `fimo.site` slug. |
| `fimo domains suggest-default` | Propose & claim a default URL. |
| `fimo domains add <hostname>` | Attach a custom domain (Starter+). |
| `fimo domains refresh <hostname>` | Re-check DNS / SSL. |
| `fimo domains primary <hostname>` | Make a domain the primary domain. |
| `fimo domains redirect <hostname> <target>` | Redirect a domain to another one (301, 302, 307, 308). |
| `fimo domains serve <hostname>` | Make a redirecting domain serve the site again. |
| `fimo domains remove <hostname>` | Detach a domain and the domains that redirect to it. |
| `fimo domains search <keyword>` | Find domains to buy. |
| `fimo domains pricing <domain>` | Show registration and renewal prices. |
| `fimo domains buy <domain>` | Create a purchase checkout invoice. |
| `fimo domains owned` | List domains bought through Fimo. |

## Analytics

| Command | What it does |
| - | - |
| `fimo analytics pageviews` | KPIs, series, and top breakdowns. Humans only; add `--device bot` for crawlers. |
| `fimo analytics top <dimension>` | Top pages/browsers/devices/countries/sources. |
| `fimo analytics annotations set <date> "<note>"` | Annotate the chart. |
| `fimo analytics annotations list` | List annotations. |
| `fimo analytics annotations delete <date>` | Delete an annotation. |

## Schedules

| Command | What it does |
| - | - |
| `fimo schedules create <name> --cron "<expr>" --do "<cmd>"` | Schedule a recurring command. |
| `fimo schedules list` | List schedules for the current Branch. |
| `fimo schedules show <schedule>` | Show configuration, usage, and policy. |
| `fimo schedules update <schedule> [options]` | Update cron, command, name, or selected secrets. |
| `fimo schedules pause <schedule>` | Pause future cron runs. |
| `fimo schedules resume <schedule>` | Resume future cron runs. |
| `fimo schedules run <schedule> [--no-wait]` | Queue a run now and optionally wait. |
| `fimo schedules runs <schedule> [options]` | List cursor-paginated run history. |
| `fimo schedules runs show <run-id>` | Show run detail and retained output. |
| `fimo schedules delete <schedule>` | Delete a schedule. |

## Collaboration

| Command | What it does |
| - | - |
| `fimo invite --email <e> --role <r>` | Invite to the current site. |
| `fimo invite --target organization --email <e>` | Invite to the organization. |

## Webhooks

| Command | What it does |
| - | - |
| `fimo webhooks events [eventType]` | List events or inspect one event. |
| `fimo webhooks list` | List site webhooks. |
| `fimo webhooks get <webhookId>` | Show a webhook. |
| `fimo webhooks create <name>` | Create a webhook. |
| `fimo webhooks update <webhookId>` | Update a webhook. |
| `fimo webhooks delete <webhookId>` | Delete a webhook. |
| `fimo webhooks test <webhookId>` | Send a test delivery. |
| `fimo webhooks deliveries <webhookId>` | List paginated deliveries. |
| `fimo webhooks delivery <webhookId> <deliveryId>` | Show a delivery and its attempts. |
| `fimo webhooks retry <webhookId> <deliveryId>` | Retry a failed delivery. |
| `fimo webhooks rotate-secret <webhookId>` | Rotate the signing secret. |

## Skills & rules

| Command | What it does |
| - | - |
| `fimo skills install` | Install the global `fimo` skill for your AI tools. |
| `fimo skills list` | List the skills the CLI can serve on demand. |
| `fimo skills get <name>` | Print a skill's content (add `--ref <doc>` for a reference). |
| `fimo skills sync` | Re-ensure the global skill; clean up skills from old versions. |
| `fimo skills uninstall` | Remove the global `fimo` skill. |
| `fimo rules sync` | Regenerate missing per-agent rule files. |

## Utilities

| Command | What it does |
| - | - |
| `fimo describe [path]` | Describe the linked site or a site path. |
| `fimo validate` | Run site validation and code generation. |
| `fimo support report` | Prepare and send a report to Fimo support. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.