Skip to content
GigadriveDocs

Command reference

Every gigadrive command, subcommand, argument and flag, with the exact long names and aliases.

Every command the gigadrive binary accepts, with its exact arguments and flags. The alias gn works everywhere gigadrive does.

Every command

Listed in the order gigadrive --help prints them.

CommandWhat it does
gigadrive loginSign in with the OAuth 2.0 device grant
gigadrive logoutDelete the stored credential
gigadrive whoamiPrint the OpenID Connect userinfo response as JSON
gigadrive linkLink the current directory to an application
gigadrive unlinkRemove the current directory's link
gigadrive apps listList applications you can access
gigadrive apps createCreate an application
gigadrive domains listList an application's custom domains
gigadrive domains addAttach a custom domain
gigadrive domains updateChange what a custom domain serves
gigadrive domains claimMove a hostname from another organization
gigadrive domains inspectPrint one custom domain and its DNS records
gigadrive domains checkCheck a custom domain's DNS records now
gigadrive domains rmRemove a custom domain
gigadrive domains ownersList, add, verify and remove the organization's verified domains
gigadrive env listList environment variables in the resolved scope
gigadrive env setCreate an environment variable
gigadrive env rmDelete an environment variable by key or ID
gigadrive env pullWrite non-sensitive variables to a local dotenv file
gigadrive deployments listList deployments
gigadrive deployments inspectPrint one deployment and its hostnames
gigadrive ai usage summaryPrint AI Gateway usage totals as JSON
gigadrive ai usage requestsList AI Gateway request events
gigadrive ai usage exportExport AI Gateway usage as CSV
gigadrive ai budgets getPrint the organization's AI Gateway budgets as JSON
gigadrive ai budgets setReplace the organization's AI Gateway budgets
gigadrive ai policies getPrint the AI Gateway policy as JSON
gigadrive ai policies setReplace the AI Gateway policy
gigadrive ai models listList models the gateway routes to
gigadrive ai models getPrint one model's full record as JSON
gigadrive ai chatSend a single prompt through the AI Gateway
gigadrive microvms createCreate a microVM and wait until it runs
gigadrive microvms lsList microVMs
gigadrive microvms getPrint one microVM and its preview URLs
gigadrive microvms metricsShow a microVM's CPU, memory and disk use
gigadrive microvms execRun a command in a microVM
gigadrive microvms shellOpen an interactive shell in a microVM
gigadrive microvms cpCopy files between your machine and a microVM
gigadrive microvms stopStop microVMs
gigadrive microvms rmDelete microVMs, stopping them first
gigadrive microvms extendSet how long a microVM keeps running, counted from now
gigadrive microvms images lsList built-in and custom images
gigadrive microvms images createBuild a custom image from a registry image or a Dockerfile
gigadrive microvms images rmDelete a custom image
gigadrive microvms volumes lsList the application's volumes
gigadrive microvms volumes createCreate an empty volume
gigadrive microvms volumes saveSave a running microVM's volumes without stopping it
gigadrive microvms volumes rmDelete a volume and its contents
gigadrive microvms webhooks lsList the application's microVM webhooks
gigadrive microvms webhooks addAdd a webhook and print its signing secret
gigadrive microvms webhooks rmDelete a webhook
gigadrive vmAlias of gigadrive microvms, with the same subcommands
gigadrive buildRun a production install and build in the current directory
gigadrive debug configPrint the resolved project configuration
gigadrive deployDeploy the current directory
gigadrive platform deployLegacy alias for gigadrive deploy
gigadrive setupLink, pull variables and provision local API credentials in one step

Conventions

Every command and subcommand also accepts --help / -h, --version, --wizard, --completions <shell> and --log-level <level>, described in the CLI overview.

Boolean flags have no negated form, so --no-yes and --no-sensitive do not exist. Omitting the flag is how you turn it off.

Running a group on its own, such as gigadrive env or gigadrive ai usage, prints nothing and exits 0. An unknown subcommand at any depth exits 1 and names the root command, not the group you typed, so gigadrive apps bogus reports Invalid subcommand for gigadrive - use one of 'login', 'logout', ....

Authentication

gigadrive login, gigadrive logout and gigadrive whoami take no arguments and no options. See Authentication.

FlagAliasRequiredDescription
--app-anoApplication ID to link (skips the interactive picker)
--org-onoOnly list applications belonging to this organization ID

No arguments, no options. Details in Project linking.

Applications

gigadrive apps list

FlagAliasRequiredDescription
--org-onoOnly list applications belonging to this organization ID

Prints <id> <name> (<organization>) per line, then a count. An empty result prints No applications found.

gigadrive apps create

FlagAliasRequiredDescription
--org-oyesOrganization ID that will own the application
--name-nyesApplication display name
--slugnoOptional lowercase application slug
--root-directorynoOptional project directory relative to the repository root
gigadrive apps create --org 0195c0aa-0000-7000-8000-0000000000ff --name "Marketing site"
gigadrive apps create -o 0195c0aa-0000-7000-8000-0000000000ff -n "API" --slug api --root-directory apps/api

Custom domains

gigadrive domains has its own page with every flag and example: Custom domains.

Environment variables

--org switches these commands to organization scope. Without it they use --app, and without that the linked application.

gigadrive env list

FlagAliasRequiredDescription
--app-anoOperate on this application (overrides the linked application)
--org-onoOperate on this organization instead of an application

Prints KEY=value per line. Sensitive variables print as KEY=***.

gigadrive env set

ArgumentRequiredDescription
key=valueyesVariable assignment, e.g. DATABASE_URL=postgres://user:pass@host/db
FlagAliasRequiredDescription
--app-anoOperate on this application (overrides the linked application)
--org-onoOperate on this organization instead of an application
--sensitivenoStore the value as sensitive (hidden in API responses)
--env-enoEnvironment ID for an environment-scoped variable (application scope only)

The argument splits at the first =, so values may contain further = characters. A missing or leading = reports Invalid format. Use KEY=VALUE, e.g. "gigadrive env set DATABASE_URL=postgres://...".

gigadrive env rm

ArgumentRequiredDescription
key-or-idyesVariable key or ID to remove
FlagAliasRequiredDescription
--app-anoOperate on this application (overrides the linked application)
--org-onoOperate on this organization instead of an application

Matches on ID or key. There is no confirmation prompt.

gigadrive env pull

Application scope only. This command has no --org.

ArgumentRequiredDescription
filenoOutput file to write (default: .env.local)
FlagAliasRequiredDescription
--app-anoOperate on this application (overrides the linked application)
--environment-enoEnvironment slug to resolve overrides for (e.g. preview). Omit for the local baseline
--yes-ynoOverwrite an existing file without confirmation
--with-credentialsnoAlso provision API-key credentials so the local app can call the API as this application
--rotatenoForce a fresh API key when provisioning credentials, revoking the previous one

Only non-sensitive values come back. Withheld secrets are reported as Skipped <n> sensitive variable(s); secrets live only in production/preview environments.

Deployments

gigadrive deploy

FlagAliasRequiredDescription
--app-anoApplication ID to deploy to (overrides the linked application)
--org-onoOrganization ID to use when automatically creating an application
--name-nnoApplication name to use when automatically creating an application

gigadrive platform deploy is the same command under a legacy name, with the same three flags. Full behaviour is on Deploy.

gigadrive deployments list

FlagAliasRequiredDescription
--app-anoFilter by application ID (defaults to the linked application)
--org-onoFilter by organization ID
--status-snoFilter by deployment status

--status accepts exactly one of:

ValueMeaning
PENDINGCreated, waiting for artifact upload
QUEUEDQueued for processing
STARTINGProcessing is starting
BUILDINGBuild pipeline is running
PROVISIONINGInfrastructure is being provisioned
ACTIVESuccessfully deployed and serving traffic
FAILEDBuild or provisioning failed

With no --app in an unlinked directory, no application filter is applied at all.

gigadrive deployments inspect

ArgumentRequiredDescription
deployment-idyesThe deployment ID to inspect

No options. Prints the ID, application, status, timestamps and, when there are any, the deployment's hostnames.

Local development

gigadrive setup

Links the directory if needed, pulls the application's non-sensitive variables, provisions API credentials and writes everything to one file. Credentials are always provisioned, so there is no --with-credentials flag here.

ArgumentRequiredDescription
filenoOutput file to write (default: .env.local)
FlagAliasRequiredDescription
--app-anoApplication ID to set up (skips the interactive picker)
--org-onoOnly list applications belonging to this organization ID when picking
--environment-enoEnvironment slug to resolve overrides for (e.g. preview)
--yes-ynoOverwrite an existing file without confirmation
--rotatenoForce a fresh API key, revoking the previous one

An already linked directory ignores --app and --org, and says so: Note: this directory is already linked to <id>; ignoring --app/--org. Run "gigadrive unlink" first to target a different application.

gigadrive build

No arguments, no options. Runs a production install and build in the current directory, using the package manager implied by the lock file, with NODE_ENV=production set. It needs a package.json with a build script, or it stops with No package.json found or No build script found in package.json.

AI Gateway

--org defaults to the organizationId in the project link. Without either, these commands report No organization is linked. Pass --org <id> or re-run "gigadrive link".

gigadrive ai usage summary and gigadrive ai usage requests

FlagAliasRequiredDescription
--org-onoOrganization ID (defaults to the linked organization)
--app-anoRestrict to this application ID
--fromnoInclude usage at or after this ISO 8601 timestamp
--tonoInclude usage before or at this ISO 8601 timestamp

summary prints JSON. requests prints one line per event and a count.

gigadrive ai usage export

The four shared usage options also apply, plus:

FlagAliasRequiredDescription
--outnoWrite the CSV to this file instead of stdout
gigadrive ai usage export --from 2026-07-01T00:00:00Z --to 2026-08-01T00:00:00Z --out july.csv

gigadrive ai budgets get

FlagAliasRequiredDescription
--org-onoOrganization ID (defaults to the linked organization)

gigadrive ai budgets set

FlagAliasRequiredDescription
--org-onoOrganization ID (defaults to the linked organization)
--file-fnoPath to a JSON file, or "-" for stdin (default: stdin)

Accepts a bare JSON array or an object shaped { "budgets": [...] }, and replaces the whole budget set. An empty array clears every budget.

gigadrive ai policies get

FlagAliasRequiredDescription
--org-onoOrganization ID (defaults to the linked organization)
--app-anoRestrict to this application ID

Prints the policy as JSON, or the line No policy set.

gigadrive ai policies set

FlagAliasRequiredDescription
--org-onoOrganization ID (defaults to the linked organization)
--file-fnoPath to a JSON file, or "-" for stdin (default: stdin)

There is no --app here. Target an application by putting "applicationId" inside the JSON body.

gigadrive ai models list

No arguments, no options. Prints <id> <name> (ctx <contextWindow>) per line.

gigadrive ai models get

ArgumentRequiredDescription
model-idyesThe model ID, e.g. openai/gpt-4o

No options.

gigadrive ai chat

ArgumentRequiredDescription
promptyesThe prompt text, or "-" to read from stdin
FlagAliasRequiredDescription
--model-myesThe model ID to use, e.g. openai/gpt-4o
--streamnoStream the response token by token

Sends exactly one user message. There is no system prompt, temperature or max-tokens flag.

gigadrive ai chat "Summarise this changelog" --model openai/gpt-4o
gigadrive ai chat - --model openai/gpt-4o --stream < CHANGELOG.md

microVMs

gigadrive vm is an alias of gigadrive microvms and takes the same subcommands. See microVMs for worked examples.

Durations such as --timeout and the extend argument need a unit, for example 90s, 10m or 2h. A bare number is refused.

gigadrive microvms create

No arguments.

FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)
--image-inoImage name or ID, built-in or custom (default: node22)
--vcpusnoNumber of vCPUs: 1, 2 or 4 (default: 1)
--memorynoMemory in MiB (default: 2048)
--disknoDisk in MiB (default: 10240)
--timeout-tnoLifetime before it stops automatically, at most 24h (default: 5m)
--port-pnoPort to expose on a preview URL (repeatable, up to 8)
--private-previewsnoAnswer preview URLs only to requests that carry the preview token printed at create
--env-enoEnvironment variable as KEY=VALUE (repeatable)
--metadata-mnoMetadata as KEY=VALUE (repeatable)
--deny-egressnoBlock all outbound network traffic
--allow-egressnoOnly reach this domain name or public IPv4 network, such as api.openai.com, *.github.com or 140.82.112.0/20 (repeatable, up to 32). See Outbound traffic
--injectnoAdd a header to HTTPS requests to a domain, as DOMAIN:HEADER=VALUE (repeatable, up to 8 domains). See Credential injection
--inject-filenoRead --inject rules from a file, one DOMAIN:HEADER=VALUE per line (/dev/stdin for a pipe), so the values stay out of the command line
--pause-on-timeoutnoPause the microVM when its timeout ends instead of stopping it
--auto-resumenoResume the paused microVM when a command, file call or public preview request reaches it
--volume-vnoAttach a volume as NAME:PATH, by name or ID (repeatable, up to 4)
--regionnoRegion to place the microVM in
--jsonnoPrint the result as JSON

--deny-egress cannot be combined with --allow-egress, --inject or --inject-file. In an --inject-file, blank lines and lines starting with # are skipped.

gigadrive microvms create --image python3.13 --vcpus 2 --memory 4096 --port 8000 --timeout 30m

gigadrive microvms ls

No arguments. Leaves out stopped and failed microVMs unless you pass --all or --status.

FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)
--status-snoOnly microVMs in this status
--allnoInclude stopped and failed microVMs
--limitnoShow at most this many (default: 50)
--jsonnoPrint the result as JSON

gigadrive microvms get

ArgumentRequiredDescription
microvm-idyesThe microVM ID
FlagAliasRequiredDescription
--jsonnoPrint the result as JSON

gigadrive microvms metrics

ArgumentRequiredDescription
microvm-idyesThe microVM ID
FlagAliasRequiredDescription
--windownoMinutes of CPU history, 1 to 1440 (default 15)
--jsonnoPrint the result as JSON

gigadrive microvms exec

ArgumentRequiredDescription
microvm-idyesThe microVM ID
commandyesThe command and its arguments, after --. One quoted argument runs through /bin/sh -c
FlagAliasRequiredDescription
--cwd-wnoWorking directory inside the microVM
--env-enoEnvironment variable as KEY=VALUE (repeatable)
--user-unoRun as this user (default: the image user)
--sudonoRun as root
--timeout-tnoKill the command after this long
--interactive-inoForward local stdin to the command

Exits with the command's exit code, or 128 plus the signal number when a signal ended it.

gigadrive microvms exec 0199a7c4-5b1e-7c3d-9f20-333333333333 --timeout 10m -- npm test

gigadrive microvms shell

ArgumentRequiredDescription
microvm-idyesThe microVM ID
FlagAliasRequiredDescription
--shellnoProgram to run instead of the login shell, such as python3
--cwd-wnoWorking directory inside the microVM
--user-unoRun as this user (default: the image user)

Needs an interactive terminal and fails without one. Use exec in scripts.

gigadrive microvms cp

ArgumentRequiredDescription
sourceyesLocal path or vm:<id>:<path>
targetyesLocal path or vm:<id>:<path>

No options. Exactly one side must be a microVM path. Directories are copied recursively.

gigadrive microvms stop, gigadrive microvms rm

ArgumentRequiredDescription
microvm-idyesOne or more microVM IDs

No options. stop discards each microVM's disk and memory. rm stops each one first if it is still running, then deletes it.

gigadrive microvms extend

ArgumentRequiredDescription
microvm-idyesThe microVM ID
durationyesNew remaining lifetime from now, such as 30m

No options. Prints the new time the microVM stops at.

gigadrive microvms network

Changes what a running or paused microVM may reach. Connections the new rules no longer allow are closed.

ArgumentRequiredDescription
microvm-idyesThe microVM ID
FlagRequiredDescription
--deny-egressone of threeBlock all outbound network traffic
--allow-egressone of threeOnly reach this domain name or public IPv4 network (repeatable, up to 32)
--allow-all-egressone of threeReach the whole internet again; private networks stay blocked
--injectnoAdd a header to HTTPS requests to a domain, as DOMAIN:HEADER=VALUE (repeatable, up to 8 domains). Replaces the current rules
--inject-filenoRead --inject rules from a file, one per line (/dev/stdin for a pipe)
--clear-injectnoRemove every header rule

Pass exactly one of --deny-egress, --allow-egress or --allow-all-egress. Without --inject or --clear-inject the header rules stay as they are, and --deny-egress removes them. --inject or --inject-file and --clear-inject cannot be combined with each other or with --deny-egress.

gigadrive microvms network 0199a7c4-5b1e-7c3d-9f20-333333333333 --allow-egress registry.npmjs.org --allow-egress '*.github.com'

gigadrive microvms images ls

No arguments.

FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)
--jsonnoPrint the result as JSON

gigadrive microvms images create

ArgumentRequiredDescription
nameyesImage name: lowercase letters, digits, ., _ and -
FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)
--fromnoPublic linux/amd64 registry image, such as python:3.13
--dockerfile-fnoPath to a Dockerfile to build instead
--waitnoWait until the build finished
--jsonnoPrint the result as JSON

Pass exactly one of --from and --dockerfile.

gigadrive microvms images create py-ml --from python:3.13 --wait

gigadrive microvms images rm

ArgumentRequiredDescription
imageyesImage ID or name
FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)

gigadrive microvms volumes ls

No arguments.

FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)
--jsonnoPrint the result as JSON

gigadrive microvms volumes create

ArgumentRequiredDescription
nameyesLowercase letters, digits and -, unique within the application
FlagAliasRequiredDescription
--sizenoSize in MB, 1024 to 51200 (default: 10240)
--app-anoApplication ID (defaults to the linked application)
--jsonnoPrint the result as JSON

Attach the volume with gigadrive microvms create --volume <name>:<path>. See Volumes.

gigadrive microvms volumes create npm-cache --size 20480

gigadrive microvms volumes rename, save, rm

rename <volume-id> <name> renames a volume, save <microvm-id> saves a running microVM's volumes without stopping it, and rm <volume-id> deletes a volume that no microVM holds.

gigadrive microvms webhooks ls

No arguments.

FlagAliasRequiredDescription
--app-anoApplication ID (defaults to the linked application)
--jsonnoPrint the result as JSON

gigadrive microvms webhooks add

ArgumentRequiredDescription
urlyesHTTPS URL on a public host
FlagAliasRequiredDescription
--eventnoEvent to send, repeatable. Without it, every event is sent
--descriptionnoA note for yourself
--app-anoApplication ID (defaults to the linked application)
--jsonnoPrint the result as JSON

Prints the signing secret once. See Webhooks for the events and how to verify a request.

gigadrive microvms webhooks add https://example.com/hooks/microvms --event microvm.stopped --event microvm.failed

gigadrive microvms webhooks enable, disable, rotate-secret, deliveries, rm

ArgumentRequiredDescription
webhook-idyesThe webhook ID

enable and disable turn event delivery on and off, rotate-secret prints a new signing secret and retires the old one, deliveries lists the 50 most recent deliveries (with --json to print them as JSON), and rm deletes the webhook.

Diagnostics

gigadrive debug config

No arguments, no options. Prints the path of the config file it found, or null when the configuration came entirely from framework detection, followed by the normalized configuration as JSON.

Environment variables the CLI reads

VariableDefaultEffect
GIGADRIVE_API_BASE_URLhttps://api.gigadrive.networkAPI host the client calls, and the value written into generated dotenv files
GIGADRIVE_BEARER_TOKENunsetAccess token for non-interactive use
GIGADRIVE_CLIENT_IDunsetAPI key ID for non-interactive use
GIGADRIVE_CLIENT_SECRETunsetAPI key secret for non-interactive use
GIGADRIVE_REFRESH_TOKENunsetRefresh token for non-interactive use
GIGADRIVE_NETWORK_OAUTH_ISSUER_URLhttps://idp.gigadrive.deIssuer used for OpenID Connect discovery at login
GIGADRIVE_NETWORK_OAUTH_CLIENT_IDthe first-party CLI clientOAuth client ID used for the device grant

Setting any one of the four non-interactive variables makes the CLI ignore the stored login entirely.