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

# Work on your site locally

> Bring a site that already lives in Fimo onto your machine, run it with your coding agent, and push changes back.

Every Fimo site has its own repository, whether it started in Studio or from the CLI. One command brings it onto your machine with dependencies installed and your coding agent ready. Studio shows that command behind the **Clone** button in the site header, filled in for the open site and Branch, so you can copy it or open it straight in Claude Code, Codex, Cursor, or Copilot.

**1. Sign in**

You do not need a global install:

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

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

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

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

**2. Set up the site on your machine**

Pass the site ID. Studio shows it in the ready-made command; `fimo projects list` prints it too.

> [tab] npm
>
> ```bash theme={null}
> npx fimo@latest init --project-id <projectId> my-site
> ```

> [tab] Bun
>
> ```bash theme={null}
> bunx fimo@latest init --project-id <projectId> my-site
> ```

> [tab] pnpm
>
> ```bash theme={null}
> pnpm dlx fimo@latest init --project-id <projectId> my-site
> ```

> [tab] Yarn
>
> ```bash theme={null}
> yarn dlx fimo@latest init --project-id <projectId> my-site
> ```

The command works whatever state the site is in. If the site already has code, it clones the repository into `my-site`. If the site was created in Studio and never deployed, it scaffolds a fresh site into that folder and pushes the first commit. Either way it installs dependencies and offers to connect your coding agent.

To start from a Branch other than `main`, add `--branch <name>`.

> [!NOTE]
>
> Only members with manage access to the site can set it up locally. Ask a site admin for access if the command
> is refused.

**3. Run it**

Move into the folder and start the framework's own dev server with the package manager that matches the lockfile:

> [tab] npm
>
> ```bash theme={null}
> cd my-site
> npm run dev
> ```

> [tab] Bun
>
> ```bash theme={null}
> cd my-site
> bun run dev
> ```

> [tab] pnpm
>
> ```bash theme={null}
> cd my-site
> pnpm dev
> ```

> [tab] Yarn
>
> ```bash theme={null}
> cd my-site
> yarn dev
> ```

There is no `fimo dev`: the site runs exactly as it would without Fimo, and connects to the site through `.fimo/project.json` and the active git branch.

**4. Work with your coding agent**

The site ships with `AGENTS.md` and `CLAUDE.md`, which point the agent at the Fimo instructions it needs. If you skipped the skills step during setup, or a teammate uses a different tool, follow [Set up your coding agent](/docs/get-started/coding-agent.md#give-your-agent-fimo-skills).

**5. Push your work back**

When a change is ready for review, deploy it to Preview:

> [tab] npm
>
> ```bash theme={null}
> npm exec -- fimo deploy -m "feat: update the homepage"
> ```

> [tab] Bun
>
> ```bash theme={null}
> bunx --no-install fimo deploy -m "feat: update the homepage"
> ```

> [tab] pnpm
>
> ```bash theme={null}
> pnpm exec fimo deploy -m "feat: update the homepage"
> ```

> [tab] Yarn
>
> ```bash theme={null}
> yarn fimo deploy -m "feat: update the homepage"
> ```

Fimo commits pending changes, pushes them, and returns Preview and Studio links. Publishing to production is a separate, deliberate step. See [Deploy and publish](/docs/deploy/overview.md).

## Code only, without installing

To fetch the repository and link the folder without installing dependencies, use `fimo clone`:

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

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

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

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

It stops if the site's repository has no commits yet. In that case use `fimo init --project-id` as shown above, which scaffolds and pushes the first commit.

## Already have the folder?

If the application is already on your machine and you want to connect it to a site without replacing its code, use `fimo link` from the folder. See [Sites and onboarding](/docs/cli/projects.md).

## What's next

> [card] [Set up your coding agent](/docs/get-started/coding-agent.md#give-your-agent-fimo-skills)
>
> Give the agent Fimo skills and the rules for this site.

> [card] [Work in Branches](/docs/environments/overview.md)
>
> Propose changes in isolation and merge them when they are ready.

> [card] [Deploy and publish](/docs/deploy/overview.md)
>
> Move from a hosted Preview to production on your terms.


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