# lizard up

Upload the current directory and deploy it.

## Usage

```bash
lizard up [flags]
```

`up` packages your working tree as a tarball, sends it to the build nodes, and deploys it. It forces `sourceType=upload` on the target service, streams build logs over SSE, and prints the live URL when finished.

If the current directory isn't linked to a project yet, `up` runs `init` first. On a TTY that's interactive; in a non-TTY (CI) environment it will **not** silently create a project — it errors and asks you to run `lizard init --name <project>` (or pass `--name`), to guard against a typo spawning an empty project.

## Flags

| Flag | Description |
|------|-------------|
| `-s, --service <name>` | Target an existing service |
| `--build-command <cmd>` | Override the build command |
| `--start-command <cmd>` | Override the start command |
| `--pre-deploy-command <cmd>` | Run once before each deploy |
| `--port <number>` | Container port (`0` = worker mode) |
| `--region <code>` | Region to deploy in |
| `-d, --detach` | Start the deploy and exit without streaming logs |
| `-c, --ci` | CI-friendly output |
| `--no-gitignore` | Upload everything, ignoring `.gitignore` |

## Subcommands

### `lizard up status`

Report the status of an in-progress upload deploy.

## Examples

### Deploy the current directory

```bash
lizard up
```

### Deploy to a specific service with a custom start command and port

Create the named service with `lizard add --service api` first if it does not exist.

```bash
lizard up --service api --start-command "node server.js" --port 8080
```

### Deploy headlessly in CI

```bash
export LIZARD_TOKEN=lzd_xxx
lizard init --name my-project
lizard add --service api
lizard up --ci --service api
```

Skip `lizard add` when the service already exists. With Lizard CLI 0.3.92, a failed build can still exit with code `0`; inspect build status and the deployed URL before marking a CI release successful. A fix is pending release. On macOS, also set `COPYFILE_DISABLE=1` before an upload to avoid extra `._*` metadata files in the archive. See [framework setup](https://lizard.build/docs/framework-guides#prepare-the-project).

## See also

- [Deploy from local code](https://lizard.build/docs/deploy/upload) — full walkthrough of upload-based deploys
- [lizard redeploy](https://lizard.build/docs/cli/redeploy) — rebuild the last upload without re-uploading
- [lizard init](https://lizard.build/docs/cli/init) — create or link a project explicitly before deploying
- [Worker services](https://lizard.build/docs/deploy/workers) — what `--port 0` means
- [Deploy a container without configuring one](https://lizard.build/blog/container-as-a-service#deploy-a-container-without-configuring-one) — where this command sits among container-as-a-service platforms
