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

# redeploy

> CLI reference: floo redeploy — force a redeploy after env var changes or config updates

<Note>
  **git push is the primary deploy flow.** Use `floo redeploy` only when you need to trigger a build without a code change — for example, after updating env vars or changing access mode.
</Note>

Force a redeploy from the current GitHub HEAD.

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

## Arguments

| Argument | Description       | Default                 |
| -------- | ----------------- | ----------------------- |
| `PATH`   | Project directory | `.` (current directory) |

## Flags

| Flag              | Description                                                                            |
| ----------------- | -------------------------------------------------------------------------------------- |
| `--app APP`       | Existing app name or UUID to deploy to                                                 |
| `--services NAME` | Deploy only specific services (repeatable)                                             |
| `--rebuild`       | Force a full rebuild from the latest commit (re-downloads source and runs Cloud Build) |
| `--sync-env`      | Re-sync env vars from configured `env_file` before deploying                           |

## Examples

```bash theme={null}
# Redeploy current directory
floo redeploy

# Redeploy a specific app
floo redeploy --app my-app

# Force a full rebuild from latest commit
floo redeploy --rebuild --app my-app

# Re-sync env vars from env_file before redeploying
floo redeploy --sync-env --app my-app

# Redeploy only specific services
floo redeploy --services api --services web

# Agent workflow: redeploy and extract URL
floo redeploy --json 2>/dev/null | jq -r '.data.deploy.url'
```

## What happens

1. **Preflight** — validates config, checks ports, service names, env files, and Dockerfiles
2. **API** — sends deploy request to the floo API
3. **Managed Services** — provisions any missing Postgres, Redis, or Storage resources
4. **Build** — API pulls source from connected GitHub repo and builds from your Dockerfile
5. **Deploy** — image is pushed to Artifact Registry and deployed to Cloud Run
6. **URL** — live URL is returned

<Note>
  Source is always pulled from GitHub. Code is never uploaded from your machine.
</Note>

## JSON output

```json theme={null}
{
  "success": true,
  "data": {
    "app": {
      "id": "a1b2c3d4-...",
      "name": "my-app",
      "status": "live",
      "url": "https://my-app.on.getfloo.com"
    },
    "deploy": {
      "id": "e5f6g7h8-...",
      "status": "live",
      "url": "https://my-app.on.getfloo.com",
      "build_logs": "..."
    },
    "detection": {
      "runtime": "nodejs",
      "framework": "Next.js",
      "version": "^14.0.0",
      "confidence": "high"
    },
    "services": ["web"]
  }
}
```

## Errors

| Code                | Meaning                                          |
| ------------------- | ------------------------------------------------ |
| `NOT_AUTHENTICATED` | Run `floo auth login` first                      |
| `INVALID_PATH`      | Path is not a valid directory                    |
| `NO_CONFIG_FOUND`   | No `floo.app.toml` found. Run `floo init` first  |
| `CONFIG_INVALID`    | Preflight validation failed                      |
| `APP_NOT_FOUND`     | The `--app` value doesn't match any existing app |
| `DEPLOY_FAILED`     | Build or deploy failed. Check build logs         |
| `DEPLOY_TIMEOUT`    | Deploy timed out after 10 minutes                |
