Zum Inhalt springen
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 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 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

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

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.