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

# linkapp deploy

> Deploy your LinkApp to Linktree

## Usage

```bash theme={"system"}
npx @linktr.ee/linkapp deploy [options]
```

Ship the contents of your LinkApp's `dist/` folder to Linktree.

## Options

| Flag             | Description                                               | Default |
| ---------------- | --------------------------------------------------------- | ------- |
| `--qa`           | Deploy to the QA environment instead of production        | `false` |
| `--skip-confirm` | Skip the deployment confirmation prompt                   | `false` |
| `--force`        | Force deployment even if the LinkApp is already published | `false` |
| `-h, --help`     | Show help                                                 | -       |

## Quick start

1. Authenticate once per environment:
   ```bash theme={"system"}
   npx @linktr.ee/linkapp login      # production
   npx @linktr.ee/linkapp login --qa # QA
   ```
2. Optional: build locally if you want to inspect the output:
   ```bash theme={"system"}
   npx @linktr.ee/linkapp build
   ```
3. Deploy:
   ```bash theme={"system"}
   npx @linktr.ee/linkapp deploy
   ```

## What happens

1. **Initialize**: loads `linkapp.config.ts`, resolves your LinkApp ID, and checks for a valid auth token.
2. **Preflight**: builds if `dist/` is missing and runs validation checks.
3. **Prepare artifacts**: generates manifest files and packs uploadable assets.
4. **Confirm**: shows the file list and asks for confirmation (skip with `--skip-confirm`).
5. **Upload**: creates or updates the LinkApp on Linktree and prints success or error details.

## Requirements

* `linkapp.config.ts` present in your project (in the root or `.config/`).
* Logged in for the target environment (`linkapp login` or `linkapp login --qa`).
* `dist/` folder exists, or let the command build it automatically.

Use `--force` only when you intend to replace an already published build.
