CLI Reference

Complete reference for every poc command. Install with npm install -g @poc-ai/cli.

Global Options

FlagDescription
--help, -hShow help for any command
--version, -VPrint CLI version
--jsonOutput results as JSON
--verboseEnable verbose logging
--token <token>Use a specific API token instead of the stored session

poc login

AUTH

Authenticate with POC.ai. Opens a browser window for OAuth and stores the session token locally.

poc login
FlagDescription
--token <token>Authenticate with an API token directly (for CI environments)
--no-browserPrint the auth URL instead of opening a browser

Example:

poc login
# Opening browser for authentication...
# ✓ Logged in as you@example.com

# CI mode:
poc login --token $POC_API_TOKEN

poc deploy

DEPLOY

Detect the framework in the given path and deploy a preview. If no path is provided, the current directory is used.

poc deploy [path]
FlagDescriptionDefault
--env <name>Target environment (preview, staging, production)preview
--name <name>Override the auto-detected project nameDirectory name
--framework <fw>Skip detection and use specified frameworkAuto-detect
--build-cmd <cmd>Override the build commandAuto-detect
--start-cmd <cmd>Override the start commandAuto-detect
--region <region>Deployment regionoregon
--yes, -ySkip confirmation prompt

Example:

poc deploy ./my-app --env preview --name my-app

# Detecting framework...  React (Vite)
# Generating blueprint...  done
# Deploying preview...     ━━━━━━━━━━━━━━━━ 100%
#
# ✓ Preview live at https://my-app-abc123.poc.ai
# Deployment ID: dep_7xk2m9

poc status

READ

Check the current status of a deployment. If no ID is provided, shows the most recent deployment.

poc status [id]
FlagDescription
--watch, -wContinuously poll status until terminal state
--jsonOutput as JSON

Example:

poc status dep_7xk2m9

# Deployment   dep_7xk2m9
# Status       live
# URL          https://my-app-abc123.poc.ai
# Created      2 minutes ago
# Framework    React (Vite)

poc promote

DEPLOY

Promote a preview deployment to production. Requires the deployment to be in live status.

poc promote [id]
FlagDescription
--yes, -ySkip confirmation prompt
--domain <domain>Custom production domain

Example:

poc promote dep_7xk2m9

# Promoting dep_7xk2m9 to production...
# ✓ Production live at https://my-app.poc.ai

poc rollback

DEPLOY

Roll back to the previous healthy version of a deployment.

poc rollback [id]
FlagDescription
--to <version>Roll back to a specific version instead of the previous one
--yes, -ySkip confirmation prompt

Example:

poc rollback dep_7xk2m9

# Rolling back dep_7xk2m9...
# ✓ Rolled back to version v2. Service is live.

poc logs

READ

View build and runtime logs for a deployment.

poc logs [id]
FlagDescription
--follow, -fStream logs in real time
--type <type>Filter by log type: build, runtime, or all
--lines, -n <num>Number of lines to show

Example:

poc logs dep_7xk2m9 --type build --lines 20

# [build] Installing dependencies...
# [build] npm install completed in 12s
# [build] Running build command: vite build
# [build] ✓ Build succeeded in 8s

poc env

CONFIG

Manage environment variables for a project.

poc env [set|get|list]
SubcommandDescriptionUsage
setSet an environment variablepoc env set KEY=value
getGet the value of a variablepoc env get KEY
listList all environment variablespoc env list
FlagDescription
--project <name>Target project (defaults to current directory)
--env <environment>Target environment (preview, staging, production)

Examples:

# Set a variable
poc env set DATABASE_URL=postgres://localhost:5432/mydb

# List all variables
poc env list --project my-app
# DATABASE_URL  = postgres://loc...  (preview)
# API_KEY       = ****masked****     (preview)

# Get a specific variable
poc env get DATABASE_URL

poc whoami

AUTH

Display the currently authenticated user and organization.

poc whoami

Example:

poc whoami

# Email    you@example.com
# Org      PsyTech
# Plan     Pro
# Token    poc_****...a1b2