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

# deploy

> Deploy a project to Alpic

Package and deploy an MCP server project to Alpic. The command collects source files, uploads them, and waits for the deployment to complete before printing the server URL.

## Usage

```bash theme={null}
alpic deploy
```

Deploys the current directory. Prompts for any missing configuration (project name, runtime) if not already set.

## Extended Usage

Skip all prompts (useful in CI):

```bash theme={null}
alpic deploy --non-interactive --project-name my-app --runtime node24
```

Create and deploy a new project whose app root is a monorepo subdirectory (path is relative to the directory where you run the command):

```bash theme={null}
alpic deploy --project-name my-app --root-dir ./packages/my-mcp-server
```

`--root-dir` is passed through the same linking flow as `alpic link`: it only applies when this run **creates** a new Alpic project. For an already linked directory, the app root was set at link/create time.

Import environment variables from a `.env` file when creating a new project:

```bash theme={null}
alpic deploy --project-name my-app --runtime node24 --env-file .env
```

## Options

| Flag                | Description                                                                                                               |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| `--non-interactive` | Skip all confirmation prompts                                                                                             |
| `--runtime`         | Runtime to use: `node24`, `node22`, `python3.14`, `python3.13`                                                            |
| `--root-dir`        | Relative path to the app root for builds and deployments; only when **creating** a new project (omit for repository root) |
| `--project-name`    | Name for a new project                                                                                                    |
| `--team-id`         | Team ID                                                                                                                   |
| `--project-id`      | Project ID to deploy to directly                                                                                          |
| `--environment-id`  | Environment ID to deploy to directly                                                                                      |
| `--env-file`        | Path to a `.env` file to source environment variables from (new projects only)                                            |

<Note>Project names can be renamed. For CI/CD pipelines, prefer `--project-id` to avoid breakage.</Note>

<Note>Authentication is required. Run `alpic login` or set `ALPIC_API_KEY` before deploying.</Note>
