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

# CLI reference

> Every fimo command, grouped by area. Run any command with --help for its flags.

Run every command as **`npx fimo@latest <command>`** — always the latest, no global install. The tables below use `fimo <command>` for brevity. Run `fimo --help` for the full surface, and `fimo <command> --help` for a command's flags. Every command accepts a global `--json` flag for structured output.

## Projects & onboarding

| Command                        | What it does                                          |
| ------------------------------ | ----------------------------------------------------- |
| `fimo init [dir]`              | Create a new project (single onboarding entry point). |
| `fimo init --project-id <id>`  | Link and clone an existing project.                   |
| `fimo clone [projectId] [dir]` | Clone an existing project locally.                    |
| `fimo projects list`           | List projects in an org.                              |
| `fimo rename "<name>"`         | Set the site name (`seo.siteName`) locally.           |
| `fimo unpublish`               | Take the project offline.                             |
| `fimo delete`                  | Delete the current project.                           |
| `fimo validate`                | Run all checks + codegen.                             |

## 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). |

## 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 entries (`--where`, `--sort`, `--fields`, `--populate`, …). |
| `fimo entries get <TypeName> <id>`                    | Get an entry.                                                     |
| `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.                    |
| `fimo entries bulk-delete <TypeName>`                 | Delete entries by IDs or filter.                                  |

## 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 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 list`                           | Browse the library (filters + search).       |
| `fimo assets open <id>`                      | Print metadata / `--download` / `--browser`. |
| `fimo assets move <id> --parent-id <folder>` | Move an asset into a folder.                 |
| `fimo assets delete <id>`                    | Delete an asset.                             |
| `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 & i18n

| 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. |

## Deploy & publish

| Command                      | What it does                                    |
| ---------------------------- | ----------------------------------------------- |
| `fimo deploy [-m "<msg>"]`   | On-demand hosted preview / shareable link.      |
| `fimo deploy --publish`      | Publish to production (from `main`).            |
| `fimo deploy --no-restart`   | Skip the sandbox dev-server restart (HMR-safe). |
| `fimo preview url`           | Print the current preview URL (no push).        |
| `fimo publish --version <v>` | Tag a `release/<v>` + prod swap.                |

## Environments

| Command                     | What it does                                   |
| --------------------------- | ---------------------------------------------- |
| `fimo branch [<name>]`      | List or create environments (`-d` deletes).    |
| `fimo checkout [-b] <name>` | Switch environments (`-b` creates + switches). |
| `fimo switch <name>`        | Switch to an existing environment.             |
| `fimo pull`                 | Sync the current env's data from its parent.   |
| `fimo diff [from] [to]`     | Two-env diff across all surfaces.              |
| `fimo status`               | Multi-surface status vs the parent.            |
| `fimo merge <from>`         | Merge another environment in.                  |

## 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 (Premium).    |
| `fimo domains refresh <hostname>`    | Re-check DNS / SSL.                  |
| `fimo domains remove <hostname>`     | Detach a custom domain.              |
| `fimo domains search <keyword>`      | Find domains to buy (Premium).       |
| `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.             |
| `fimo analytics top <dimension>`                 | Top pages/browsers/devices/countries/sources. |
| `fimo analytics annotations set <date> "<note>"` | Annotate the chart.                           |

## Scheduled agents

| Command                                                     | What it does                              |
| ----------------------------------------------------------- | ----------------------------------------- |
| `fimo agents create <name>`                                 | Scaffold an agent bundle from a template. |
| `fimo agents list`                                          | List agent bundles in the project.        |
| `fimo agents validate [name]`                               | Validate a bundle.                        |
| `fimo agents activate <name>`                               | Wire triggers on an environment.          |
| `fimo agents run <name>`                                    | Trigger a manual run.                     |
| `fimo agents runs <name>`                                   | List past run sessions.                   |
| `fimo agents report <name>`                                 | Print a run's report.                     |
| `fimo schedules create <name> --cron "<expr>" --do "<cmd>"` | Schedule a recurring command.             |
| `fimo schedules list`                                       | List schedules for the environment.       |

## Collaboration

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

## Skills & rules

| Command                 | What it does                                   |
| ----------------------- | ---------------------------------------------- |
| `fimo skills install`   | Install skills + rule files for your AI tools. |
| `fimo skills sync`      | Refresh installed skills.                      |
| `fimo skills uninstall` | Remove the global skills.                      |
| `fimo rules sync`       | Regenerate missing per-agent rule files.       |
