Docs

CLI Reference

alien init

Create a new Alien project from a template:

alien init my-app

Prompts for language (TypeScript or Rust) and template. Creates a project directory with alien.ts, source code, and dependencies.

Example:

alien init my-app
cd my-app

alien dev

Start the local development environment:

alien dev

Provisions all resources locally (sled for KV/Queue, filesystem for Storage) and starts your workers as native processes. Hot-reloads on code changes.

Example:

alien dev
# ✓ worker (worker) → http://localhost:3001
# ✓ data (storage) → local filesystem
# ✓ Server → http://localhost:9090

alien serve

Start the standalone manager for production deployments:

alien serve

Starts an HTTP server backed by SQLite. Manages deployments, dispatches commands, collects telemetry, and hosts an embedded artifact registry.

Options:

FlagDescription
--initGenerate a starter alien-manager.toml config file
--config <path>, -cPath to config file (default: alien-manager.toml)
--port <port>Override the HTTP server port
--host <host>Override the HTTP server bind address

Example:

# Generate config
alien serve --init

# Start with defaults
alien serve

# Start with custom config
alien serve --config /etc/alien/manager.toml

On first run, generates an admin API key. See Self-Hosting for full setup instructions.

alien build

Build your stack into deployable output:

alien build --platform <platform>
alien build --platforms <platform1>,<platform2>

Compiles your code using the configured toolchain (Bun for TypeScript, cargo-zigbuild for Rust, Docker for containers), packages container images where needed, and validates the stack.

Builds are content-hashed — if your code hasn't changed, the build completes instantly by reusing the previous output.

Options:

FlagDescription
--platform <platform>, --platformsTarget platform(s): aws, gcp, azure (comma-separated for multiple) (required)
--config <path>, -cPath to alien.ts/alien.js/alien.json file or directory
--output-dir <dir>, -oOutput directory for build files
--targets <targets>Target OS/architecture combinations (comma-separated)
--cache-url <url>Cache URL for build caching (e.g., s3://bucket/path)
--jsonEmit structured JSON output

Examples:

alien build --platform aws
alien build --platforms aws,gcp
alien build --platform aws --targets linux-arm64

alien release

Create a new release:

alien release

Builds your code, pushes images to the registry, and creates a release. Active deployments pick up new releases automatically.

Alien always rebuilds during release to ensure the release reflects your latest code. If nothing changed, the build is instant thanks to content-hash dedup. Pushed images are cached — if the same images were already pushed in a prior release, the push step is skipped.

Options:

FlagDescription
--platforms <platforms>Comma-separated list of platforms to release (auto-discovers from manager config if not specified)
--project <name>Project name or ID (skips project linking)
--prebuiltSkip build and push — uses pre-pushed image URIs from stack.json
--no-gitSkip git metadata collection
--jsonEmit structured JSON output

Examples:

alien release
alien release --platforms aws,gcp
alien release --prebuilt

alien onboard

Onboard a new customer and generate a deployment token:

alien onboard <name>

Creates a deployment group and returns a token the customer uses to set up their environment.

Options:

FlagDescription
--platform <platform>, --platforms <platforms>Limit the deployment link to selected platforms; defaults to all platforms in the active release
--input <id=value>Provide a non-secret developer stack input
--secret-input <id=value>Provide a secret developer stack input; redacted in output
--max-deployments <n>Maximum deployments allowed for this deployment group
--jsonEmit structured JSON output

Example:

alien onboard acme-corp \
  --platforms aws \
  --secret-input controlPlaneApiKey=sk_live_...
# Deployment token: ax_dg_abc123...
# Send this to the customer's admin.

If required developer-provided stack inputs are missing, alien onboard validates them and prompts in interactive terminals. Platform-scoped inputs are required only when the selected platforms need them; use --platforms aws to avoid collecting local-only values for an AWS-only link. Deployer-provided inputs are collected later by the deployment portal or project-branded deploy CLI.

alien deploy

Deploy a release to a cloud platform:

alien deploy --name <name> --platform <platform>

Options:

FlagDescription
--name <name>Deployment name for identification (required)
--platform <platform>Target platform: aws, gcp, azure (required)
--token <token>Deployment API key for authentication
--no-heartbeatDisable heartbeat capability
--monitoring <mode>Telemetry mode: auto (default) or off
--network <mode>Network mode: auto (default), use-default, create, or byo
--network-cidr <cidr>CIDR block for --network create
--availability-zones <n>Number of zones for --network create
--vpc-id <id>Existing AWS VPC ID for --network byo
--public-subnet-ids <ids>Comma-separated AWS public subnet IDs for --network byo
--private-subnet-ids <ids>Comma-separated AWS private subnet IDs for --network byo
--security-group-ids <ids>Comma-separated AWS security group IDs for --network byo
--network-name <name>Existing GCP VPC network name for --network byo
--subnet-name <name>Existing GCP subnet name for --network byo
--network-region <region>GCP subnet region for --network byo
--vnet-resource-id <id>Existing Azure VNet resource ID for --network byo
--public-subnet-name <name>Azure public subnet name for --network byo
--private-subnet-name <name>Azure private subnet name for --network byo

Example:

alien deploy --name acme-production --platform aws
alien deploy --name acme-production --platform aws --network create --availability-zones 3

Network flags are converted to deployment stack settings. See Networking and Network.

alien deployments ls

List all active deployments:

alien deployments ls

Shows deployment status, platform, current release, and a separate desired release when a rollout has not converged. Use --json for the generated manager API records without interactive prompts.

alien deployments get

Show one deployment, its current and desired releases, stack resources, and timestamped provider observations for container and daemon images:

alien deployments get <name-or-id>
alien deployments get <name-or-id> --json

An observed image is what the provider last reported, not the desired stack configuration. A mismatch is shown as rollout pending; a stale observation is labeled separately.

alien deployments retry, redeploy, and pin

alien deployments retry <name-or-id> [--json]
alien deployments redeploy <name-or-id> [--json]
alien deployments pin <deployment-id> [release-id] [--json]
  • retry resumes the failed operation toward the existing desired release.
  • redeploy starts a fresh rollout of the current release and is intended for a running deployment.
  • pin selects a release explicitly; omit release-id to return to the active release.

All three commands preserve structured API error codes, remediation hints, retryability, and request IDs. --json emits only the API response and does not prompt.

alien releases ls

List releases with immutable commit SHA, source ref, and all included platforms, including Machines:

alien releases ls
alien releases ls --json

alien releases get

Show an immutable release and correlate it with deployments that are targeting or already running it:

alien releases get <release-id>
alien releases get <release-id> --json

alien vault

Manage vault secrets for a deployment:

alien vault <action>

See Environment Variables for details on managing secrets across deployments.

On this page