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.
| Command | What it does |
|---|---|
gigadrive login | Sign in with the OAuth 2.0 device grant |
gigadrive logout | Delete the stored credential |
gigadrive whoami | Print the OpenID Connect userinfo response as JSON |
gigadrive link | Link the current directory to an application |
gigadrive unlink | Remove the current directory's link |
gigadrive apps list | List applications you can access |
gigadrive apps create | Create an application |
gigadrive env list | List environment variables in the resolved scope |
gigadrive env set | Create an environment variable |
gigadrive env rm | Delete an environment variable by key or ID |
gigadrive env pull | Write non-sensitive variables to a local dotenv file |
gigadrive deployments list | List deployments |
gigadrive deployments inspect | Print one deployment and its hostnames |
gigadrive ai usage summary | Print AI Gateway usage totals as JSON |
gigadrive ai usage requests | List AI Gateway request events |
gigadrive ai usage export | Export AI Gateway usage as CSV |
gigadrive ai budgets get | Print the organization's AI Gateway budgets as JSON |
gigadrive ai budgets set | Replace the organization's AI Gateway budgets |
gigadrive ai policies get | Print the AI Gateway policy as JSON |
gigadrive ai policies set | Replace the AI Gateway policy |
gigadrive ai models list | List models the gateway routes to |
gigadrive ai models get | Print one model's full record as JSON |
gigadrive ai chat | Send a single prompt through the AI Gateway |
gigadrive build | Run a production install and build in the current directory |
gigadrive debug config | Print the resolved project configuration |
gigadrive deploy | Deploy the current directory |
gigadrive platform deploy | Legacy alias for gigadrive deploy |
gigadrive setup | Link, 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.
Project link
gigadrive link
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Application ID to link (skips the interactive picker) |
--org | -o | no | Only list applications belonging to this organization ID |
gigadrive unlink
No arguments, no options. Details in Project linking.
Applications
gigadrive apps list
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | no | Only 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
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | yes | Organization ID that will own the application |
--name | -n | yes | Application display name |
--slug | no | Optional lowercase application slug | |
--root-directory | no | Optional 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/apiEnvironment variables
--org switches these commands to organization scope. Without it they use --app, and without that
the linked application.
gigadrive env list
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Operate on this application (overrides the linked application) |
--org | -o | no | Operate on this organization instead of an application |
Prints KEY=value per line. Sensitive variables print as KEY=***.
gigadrive env set
| Argument | Required | Description |
|---|---|---|
key=value | yes | Variable assignment, e.g. DATABASE_URL=postgres://user:pass@host/db |
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Operate on this application (overrides the linked application) |
--org | -o | no | Operate on this organization instead of an application |
--sensitive | no | Store the value as sensitive (hidden in API responses) | |
--env | -e | no | Environment 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
| Argument | Required | Description |
|---|---|---|
key-or-id | yes | Variable key or ID to remove |
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Operate on this application (overrides the linked application) |
--org | -o | no | Operate 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.
| Argument | Required | Description |
|---|---|---|
file | no | Output file to write (default: .env.local) |
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Operate on this application (overrides the linked application) |
--environment | -e | no | Environment slug to resolve overrides for (e.g. preview). Omit for the local baseline |
--yes | -y | no | Overwrite an existing file without confirmation |
--with-credentials | no | Also provision API-key credentials so the local app can call the API as this application | |
--rotate | no | Force 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.
The -e alias means two different things
On env set, -e is --env and takes an environment ID. On env pull and setup, -e is --environment and
takes an environment slug such as preview. Spell the long form out in scripts.
Deployments
gigadrive deploy
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Application ID to deploy to (overrides the linked application) |
--org | -o | no | Organization ID to use when automatically creating an application |
--name | -n | no | Application 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
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Filter by application ID (defaults to the linked application) |
--org | -o | no | Filter by organization ID |
--status | -s | no | Filter by deployment status |
--status accepts exactly one of:
| Value | Meaning |
|---|---|
PENDING | Created, waiting for artifact upload |
QUEUED | Queued for processing |
STARTING | Processing is starting |
BUILDING | Build pipeline is running |
PROVISIONING | Infrastructure is being provisioned |
ACTIVE | Successfully deployed and serving traffic |
FAILED | Build or provisioning failed |
With no --app in an unlinked directory, no application filter is applied at all.
gigadrive deployments inspect
| Argument | Required | Description |
|---|---|---|
deployment-id | yes | The 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.
| Argument | Required | Description |
|---|---|---|
file | no | Output file to write (default: .env.local) |
| Flag | Alias | Required | Description |
|---|---|---|---|
--app | -a | no | Application ID to set up (skips the interactive picker) |
--org | -o | no | Only list applications belonging to this organization ID when picking |
--environment | -e | no | Environment slug to resolve overrides for (e.g. preview) |
--yes | -y | no | Overwrite an existing file without confirmation |
--rotate | no | Force 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
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | no | Organization ID (defaults to the linked organization) |
--app | -a | no | Restrict to this application ID |
--from | no | Include usage at or after this ISO 8601 timestamp | |
--to | no | Include 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:
| Flag | Alias | Required | Description |
|---|---|---|---|
--out | no | Write 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.csvgigadrive ai budgets get
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | no | Organization ID (defaults to the linked organization) |
gigadrive ai budgets set
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | no | Organization ID (defaults to the linked organization) |
--file | -f | no | Path 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
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | no | Organization ID (defaults to the linked organization) |
--app | -a | no | Restrict to this application ID |
Prints the policy as JSON, or the line No policy set.
gigadrive ai policies set
| Flag | Alias | Required | Description |
|---|---|---|---|
--org | -o | no | Organization ID (defaults to the linked organization) |
--file | -f | no | Path 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
| Argument | Required | Description |
|---|---|---|
model-id | yes | The model ID, e.g. openai/gpt-4o |
No options.
gigadrive ai chat
| Argument | Required | Description |
|---|---|---|
prompt | yes | The prompt text, or "-" to read from stdin |
| Flag | Alias | Required | Description |
|---|---|---|---|
--model | -m | yes | The model ID to use, e.g. openai/gpt-4o |
--stream | no | Stream 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.mdDiagnostics
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
| Variable | Default | Effect |
|---|---|---|
GIGADRIVE_API_BASE_URL | https://api.gigadrive.network | API host the client calls, and the value written into generated dotenv files |
GIGADRIVE_BEARER_TOKEN | unset | Access token for non-interactive use |
GIGADRIVE_CLIENT_ID | unset | API key ID for non-interactive use |
GIGADRIVE_CLIENT_SECRET | unset | API key secret for non-interactive use |
GIGADRIVE_REFRESH_TOKEN | unset | Refresh token for non-interactive use |
GIGADRIVE_NETWORK_OAUTH_ISSUER_URL | https://idp.gigadrive.de | Issuer used for OpenID Connect discovery at login |
GIGADRIVE_NETWORK_OAUTH_CLIENT_ID | the first-party CLI client | OAuth client ID used for the device grant |
Setting any one of the four non-interactive variables makes the CLI ignore the stored login entirely.
