CLI
Authentication, deployment, logs, and metrics from the terminal.
The Autodisc CLI provides authentication, deployment, hosting operations, logs, and resource metrics from a terminal.
Install
The CLI is published on npm and supports Node.js 18 or newer:
npm install -g @autodisc/cli@latest
autodisc --versionBuild from the Autodisc repository only when contributing to the CLI:
npm install
npm run cli:test
npm run cli:build
node packages/cli/dist/index.js --helpAuthenticate
autodisc login opens the browser sign-in flow by default. Verify the saved
session before deploying:
autodisc login
autodisc whoamiSet AUTODISC_TOKEN for non-interactive automation. Avoid passing tokens
directly on the command line because shell history may retain them. The
--device flow is reserved by the CLI but is not available on the production
API yet.
For public API and VPS automation, create a key under Account → Tokens and use the dedicated environment variable:
export AUTODISC_API_KEY='adk_...'
autodisc whoamiThe CLI recognizes the key as X-API-Key authentication and uses
https://api.autodisc.xyz for public API calls. autodisc login --api-key
can save a key interactively, but environment variables are preferred in CI.
Deploy
Run the CLI from the application directory:
autodisc init
autodisc deploy
autodisc status --json
autodisc logs --followautodisc init detects the runtime and writes autodisc.yml for review.
When deploying to an existing project, use an exact ID when a name or slug is
ambiguous:
autodisc deploy --project PROJECT_IDDeployments start asynchronously. If a mutation reports a gateway, origin, or
timeout error, check autodisc status and autodisc logs before retrying; the
backend may already have accepted the request.
Deploy an app that requires secrets at startup
Environment commands require a selected service. Create the service without starting it, add its secrets, then deploy:
autodisc deploy --no-start
autodisc env set DISCORD_TOKEN
autodisc env set DEEPSEEK_API_KEY
autodisc deployTo upload an existing dotenv file:
autodisc env push .envNever commit the dotenv file.
Project VPS servers
The plural servers command group manages project-scoped VPS compute. It is
separate from the existing top-level app-hosting commands.
Inspect the live HostVDS-backed catalog:
autodisc servers regions
autodisc servers shapesProvisioning is quote-first. The CLI displays the exact hourly rate and 730-hour estimate before asking for confirmation:
autodisc servers create preview-api \
--project PROJECT_UUID \
--region us-west \
--shape micro-1 \
--storage 20 \
--ipv4List and operate on the resulting server:
autodisc servers list --project PROJECT_UUID
autodisc servers get SERVER_UUID --project PROJECT_UUID
autodisc servers stop SERVER_UUID --project PROJECT_UUID
autodisc servers start SERVER_UUID --project PROJECT_UUIDUse --yes --json for non-interactive creation. Supply a stable
--idempotency-key when automation may retry a create or lifecycle request.
Common Commands
autodisc status
autodisc logs --follow
autodisc metrics --watch
autodisc doctorHosting Metrics
autodisc metrics shows the current hosting server, live CPU and memory readings, and the most recent deployment status.
autodisc metrics
autodisc metrics --watch
autodisc metrics --watch --interval 5Scriptable Output
Use --json when another command or agent is consuming output:
autodisc status --json
autodisc logs --tail 100 --json
autodisc metrics --jsonWith --watch, autodisc metrics --json prints newline-delimited JSON snapshots. With --follow, autodisc logs --json prints newline-delimited log snapshots.
Core Reference
autodisc login/logout/whoami: authenticate with device flow, browser flow, or token; inspect or clear the session.autodisc init: analyze the current project and writeautodisc.yml.autodisc deploy [--project <id-or-name>] [--no-start]: create or update the current service usingautodisc.yml, select it, and start it unless--no-startis set.autodisc status [--json]: show the current hosting server state.autodisc logs [--tail 200] [--follow] [--json]: fetch or stream recent logs.autodisc metrics [--watch] [--interval 2] [--json]: show CPU, memory, and latest deploy status.autodisc env [set|unset|pull|push]: manage environment variables.autodisc start|stop|restart|delete: operate on the current hosting server.deleterequires confirmation or an explicit--yesin automation.autodisc config/config:get <path>/config:set <path> <value>: view and edit CLI configuration.autodisc doctor [--offline] [--json]: verify the runtime, local configuration, project file, and API connection.autodisc project list|create|use|stop|redeploy|delete: select and operate on explicit projects and services.autodisc servers regions|shapes: inspect available VPS regions and shapes.autodisc servers list|get|quote|create --project <uuid>: inspect and quote-first provision VPS compute.autodisc servers start|stop|restart|delete --project <uuid>: request asynchronous VPS lifecycle changes.
status, metrics, and env redact environment values by default. autodisc env --show-values reveals them intentionally, while autodisc env pull writes the complete environment to a file.
Global Options
--api-url <url>: use another Autodisc API for this invocation.--verbose: print diagnostic details when a command fails.--no-color: disable ANSI color output.
The equivalent environment variables are AUTODISC_API_URL, AUTODISC_PUBLIC_API_URL, AUTODISC_DEBUG=1, and AUTODISC_NO_COLOR=1. For non-interactive SDK/VPS authentication, set AUTODISC_API_KEY; browser session automation can continue using AUTODISC_TOKEN.
Troubleshooting
autodisc: command not found: ensure npm's global binary directory is onPATH, then reinstall withnpm install -g @autodisc/cli@latest.Not authenticated. Please run "autodisc login".: runautodisc login, then verify the session withautodisc whoami.No hosting server found. Run "autodisc deploy" first.: runautodisc deploy --no-startfor a new service, or select an existing one withautodisc project use <project> [--service <id-or-name>].Multiple projects match ...: use the exact project ID fromautodisc project list.