Skip to main content

Deployxa CLI Reference (@deployxa/cli)

The official Deployxa CLI (@deployxa/cli) allows you to build, deploy, monitor, and manage your cloud PaaS applications directly from your terminal.


Installation

Install @deployxa/cli globally using npm:

npm install -g @deployxa/cli

Verification

Confirm that the CLI is installed and check your version:

deployxa --version
# Output: Deployxa CLI v1.0.1

You can also use:

deployxa version
deployxa -v

Authentication

Login

Authenticate your local terminal environment with your Deployxa account:

deployxa login

This starts a local OAuth authentication flow on http://localhost:5678/login. Credentials are securely machine-encrypted and stored locally.

Logout

Remove local stored machine credentials:

deployxa logout

Whoami

Display your current active user account, organization, and billing plan:

deployxa whoami

Deployment & Project Management

Scaffold or link your local workspace to a Deployxa project:

# Provision a new project interactively
deployxa init

# Link current directory to an existing Deployxa project
deployxa link

Deploy (deployxa deploy)

Deploy your project workspace to the cloud PaaS control plane:

# Deploy linked project in current directory
deployxa deploy

# Deploy a specific project ID and path
deployxa deploy <projectId> [path]

View Live & Build Logs (deployxa logs)

Fetch real-time compilation and runtime logs for any deployment:

deployxa logs <deploymentId>

Instant Rollback (deployxa rollback)

Instantly roll back your deployment workload to a previous release:

# Roll back to a specific deployment ID
deployxa rollback <deploymentId>

# Roll back to previous release alias
deployxa rollback previous

Workload Re-trigger & Restart

# Re-trigger build and deploy with previous source archive
deployxa redeploy

# Zero-downtime container restart
deployxa restart

Environment Variables & Configuration

Environment Variables (deployxa env)

Manage encrypted environment variables for your project:

# Set environment variable
deployxa env <projectId> <KEY> <VALUE>

# Example:
deployxa env proj_abc123 DATABASE_URL "postgresql://user:pass@host:5432/db"

CLI Local Configuration (deployxa config)

Inspect or update CLI configuration parameters:

# View configuration
deployxa config list

# Set custom API control plane endpoint
deployxa config set apiUrl https://api.deployxa.com

Monitoring & System Diagnostics

Diagnostics Check (deployxa doctor)

Run automated pre-flight diagnostics to inspect local Node runtime, Docker status, Git setup, network reachability, and authentication:

deployxa doctor

Scale & Metrics

# Inspect container replicas or set scaling constraints
deployxa scale

# Display CPU, RAM, Latency, Bandwidth, and Replicas telemetry
deployxa metrics

Build Cache Pruning

# Purge remote build cache
deployxa cache

Shell Auto-Completion

Generate autocomplete scripts for your shell:

# Bash
deployxa completion bash >> ~/.bashrc

# Zsh
deployxa completion zsh >> ~/.zshrc

# Fish
deployxa completion fish > ~/.config/fish/completions/deployxa.fish

# PowerShell
deployxa completion powershell >> $PROFILE

Telemetry & Privacy

Deployxa CLI includes optional, anonymous usage telemetry. You can easily manage telemetry settings:

# Check telemetry status
deployxa telemetry status

# Enable anonymous usage telemetry
deployxa telemetry enable

# Disable anonymous usage telemetry
deployxa telemetry disable

Scaffolding Starter Apps

Scaffold starter templates with pre-configured Deployxa settings:

# Next.js
deployxa create nextjs

# Express.js
deployxa create express

# FastAPI
deployxa create fastapi