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

# The fimo CLI

> The workflow surface for Fimo — install it, sign in, and drive content, media, forms, deploys, and more.

The `fimo` CLI is the developer and agent surface for Fimo. It handles project creation, all content / forms / media / labels / locale workflows, deploys, environments, domains, analytics, collaboration, and AI-agent setup. Everything the CLI does is also editable by non-developers in [Fimo Studio](/docs/studio/overview) — same project, two surfaces.

## Search public websites with Firecrawl

Enable Firecrawl when you need sourced research from public websites. Search returns query-relevant excerpts with their source URLs, so you can answer straightforward questions without fetching every result page.

```bash theme={null}
fimo integrations enable firecrawl
fimo integrations run firecrawl search --query "latest React release" --max-results 3
```

Narrow a search with source type, category, domain, freshness, or geography:

```bash theme={null}
fimo integrations run firecrawl search \
  --query "Barcelona developer events" \
  --sources web,news \
  --freshness month \
  --include-domains example.com \
  --location "Barcelona, Spain" \
  --country ES
```

Use `--json` for agent workflows. Fetch an individual page with `scrape` when you need full context, exact wording, or implementation details. Firecrawl is for public websites, not private or logged-in content.

## Install and run

Run every command as **`npx fimo@latest <command>`**. It always fetches the latest CLI — no install, nothing to keep up to date. **Do not install `fimo` globally.** For brevity the docs write `fimo <command>` — mentally prefix `npx fimo@latest`.

```bash theme={null}
npx fimo@latest --version
npx fimo@latest --help          # the full command surface
```

## Sign in

```bash theme={null}
fimo login       # opens your browser; the CLI captures the token automatically
fimo whoami      # the signed-in user + active organization
fimo logout      # revoke the session and clear local credentials
```

`fimo login` uses a browser loopback flow — there's nothing to copy or paste. Credentials are stored per backend under `~/.config/fimo/credentials/`. Never hardcode tokens in command flags.

## The project link file

A Fimo project is identified by **`.fimo.settings.json`** at its root, written once by `fimo init`. It connects the local directory to the remote project, and most commands read it from the cwd to know which project they operate on.

<Warning>
  `.fimo.settings.json` is read-only — treat it as generated. Never edit it manually to switch projects or environments.
</Warning>

## JSON output for agents

Every command accepts a global `--json` flag (or `FIMO_OUTPUT=json`) and emits one structured envelope on stdout:

```json theme={null}
{ "status": "ok", "command": "<name>", "schema_version": 1, "data": { } }
```

Branch on `error.code` (`UPPER_SNAKE_CASE`), never on `error.message`. The envelope is versioned (`schema_version: 1`). JSON mode disables interactive prompts, so pass every required argument (`--yes`, `--org`, …) on the command line.

<Note>
  Project-scoped commands (`deploy`, `status`, `entries`, …) target the environment of your **current git branch**, and print a one-line banner saying which. Override for one command with the global `--env <name>` flag. See [Environments](/docs/environments/overview).
</Note>

## What's next

<Columns cols={3}>
  <Card title="Projects & onboarding" icon="folder" href="/docs/cli/projects">
    `fimo init`, `clone`, login, and orgs.
  </Card>

  <Card title="Content & CMS" icon="database" href="/docs/cli/content">
    Schemas and entries.
  </Card>

  <Card title="CLI reference" icon="terminal" href="/docs/reference/cli">
    Every command, grouped by area.
  </Card>
</Columns>
