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

# deploy

> floo deploy: push a local git repository to a floo-hosted project and wait until its dev URL is live. No GitHub repository needed.

Deploy the committed code in a local git repository with one command. The first run creates a floo-hosted project, later runs push to it, and every run waits until the commit is live at `https://<app>-dev.getfloo.app`.

```bash theme={null}
floo deploy [PATH]
```

Requires floo CLI v2026.11.01 or later (`floo update`).

## Arguments

| Argument | Description | Default |
| - | - | - |
| `PATH` | Repository root. `floo.app.toml` must sit here. | `.` (current directory) |

## Flags

| Flag | Description |
| - | - |
| `--preflight` | Check the folder and print the plan without signing in, creating, or pushing |
| `--json` | Output as JSON |

## What it does

1. Reads `[app] name` from `floo.app.toml`.
2. Checks the folder: it must be the root of a git repository with at least one commit and no uncommitted changes. floo deploys commits, so uncommitted edits would be left out.
3. Finds the project:
   * The folder has a `floo` git remote: pushes to it after checking it belongs to the app named in `floo.app.toml`.
   * A floo-hosted project with that name exists: adds the `floo` remote and pushes.
   * Neither: creates a floo-hosted project with that name (the same as [`floo projects create`](https://getfloo.com/docs/cli/projects#create)), adds the `floo` remote, and replaces the project's starter commit with yours.
4. Pushes `HEAD` to the project's default branch with a short-lived credential. Nothing is stored in your git config or keychain except the `floo` remote.
5. Waits for that commit's dev deploy, like [`floo deploys watch --commit`](https://getfloo.com/docs/cli/deploys).

It deploys to dev only. To publish to production, run [`floo releases promote`](https://getfloo.com/docs/cli/releases#promote).

## When the folder isn't ready

`floo deploy` stops and prints the command that fixes it:

| Code | Cause | Next command |
| - | - | - |
| `NO_CONFIG_FOUND` | No `floo.app.toml` | `floo init <app-name> --path <path>` |
| `NOT_A_GIT_REPOSITORY` | Not a git repository | `git init`, `git add -A`, `git commit`, then `floo deploy` |
| `NO_COMMITS` | No commits yet | `git add -A && git commit`, then `floo deploy` |
| `UNCOMMITTED_CHANGES` | Uncommitted changes | Commit them, then `floo deploy` |
| `INVALID_PATH` | `floo.app.toml` is not at the repository root | Move it to the root |
| `INVALID_REMOTE` | The `floo` remote points somewhere that is not a floo-hosted project | `git remote remove floo`, then `floo deploy` |
| `APP_NAME_MISMATCH` | The `floo` remote belongs to a different app than `[app] name` | `git remote remove floo`, then `floo deploy` |
| `GIT_PUSH_FAILED` | The push was rejected, usually because the project has commits you don't have | `git pull --no-rebase floo <branch>`, then `floo deploy` |

If the first push fails after the project was created, run `floo deploy` again. It remembers that the starter commit still has to be replaced.

## Examples

```bash theme={null}
# Deploy the current directory
floo deploy

# Deploy another folder
floo deploy ./apps/inventory

# Check the folder without signing in or pushing
floo deploy --preflight

# Agent workflow: progress events as JSON lines on stdout
floo deploy --json
```

With `--json`, the wait prints one JSON object per line on stdout as the deploy moves, and errors use the standard `success: false` shape with `error.code` and `error.suggestion`.

## Related

* [Deploy without a GitHub repository](https://getfloo.com/docs/deploy/without-github.md): the full walkthrough.
* [`floo projects`](https://getfloo.com/docs/cli/projects): create, list, and clone floo-hosted projects.
* To deploy from your own GitHub repository instead, use [`floo apps github connect`](https://getfloo.com/docs/cli/github).


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