CLI

CLI

Command references by family, grouped by what they are for:

0.10.x

Command references by family, grouped by what they are for:

This page lists every command with a link to its reference.

Examples use catalog ids such as prod-db; substitute your own resource names. Use resources published in your deployment; the examples do not create them.

One binary, gdsgate on Linux and gdsgate.exe on Windows, runs every service role and every client command, selected by subcommand. Platform differences are noted on each command's page. A global --config <PATH> applies to all commands and overrides the loopback dev defaults.

text
gdsgate [--config <PATH>] <command> [args...]

Output convention:

  • stdout carries data the caller may pipe or capture: ls tables, generated config fragments, byte streams, certificate PEMs.
  • stderr carries status and logs. A client command prints status lines there (→ in progress, ✓ done, # a note, ✗ a failure):

    text
    ✓ authenticated as alex@acme.io (group: sre)
    ✓ certificate issued · ttl 5m · db-prod
    # connected · session a1f7… · recording

    On a terminal the lines carry glyphs and colour. Off a terminal (a ProxyCommand, a pipe, CI) they are plain ASCII without colour. NO_COLOR also disables colour. proxy-ssh puts only the SSH byte stream on stdout. -q/--quiet silences status lines; failures still print.

Diagnostic logs (tracing events) are filtered with RUST_LOG. A client command defaults to warn; the services default to warn,gdsgate=info. A set RUST_LOG replaces the default:

Shell
RUST_LOG=gdsgate_proxy=debug,gdsgate=info,warn gdsgate --config proxy.toml proxy
RUST_LOG=debug gdsgate ssh db-prod   # raise a client command's logs for debugging

Global flags

Flag Purpose
--config <PATH> Path to the TOML cluster-configuration file. A file named here must exist; a missing file fails the command. Without the flag a client command reads ~/.gdsgate/config.toml (%USERPROFILE%\.gdsgate\config.toml on Windows), the file gdsgate connect writes, and uses the loopback dev profile when it is absent. A service (authority, proxy, connector, all) does not read that file. GDSGATE_* environment overrides apply either way.
--as <grant-id> Narrow this session to a delegation grant you own: access is your rights ∩ the grant's capabilities ∩ the session's resource, checked on every operation. After the grant is revoked or expires, the next operation is refused. -L / -R need ssh:forward@<host> and -A needs ssh:agent@<host>; ssh:connect includes neither. See gdsgate delegate.
--no-remediate On an access denial that step-up or an access request could resolve, report it without offering either. Implied when stdin or stderr is not a terminal.
--step-up-factor <auto\|passkey\|totp> Factor for an inline step-up. Default auto, which prefers the passkey.
--wait When a denial is curable only by a human approval, file the request and block until it is approved, then retry. No effect on a step-up-only denial.
--wait-timeout <secs> How long --wait blocks before giving up. Default 600.
--quiet, -q Silence the client status narration on stderr; failures still print. Command data on stdout is unaffected, and diagnostics remain available through RUST_LOG.
--help, -h Print help for the current command.
--version, -V Print the binary's version and exit.

On a denied ssh, db login, or proxy command at a terminal, gdsgate offers the matching step-up, or files a JIT access request, and retries. See User guide → MFA & step-up. The --no-remediate / --step-up-factor / --wait flags above tune that.

Service modes

Each entry links to its full reference.

gdsgate authority

See administration reference.

--route <auto|gateway|certificate|emergency|store>

See administration reference.

--operator <NAME>

See administration reference.

gdsgate authority bootstrap-admin --output-dir <DIR> [--ttl <secs>] [--if-missing]

See administration reference.

gdsgate authority bootstrap-provisioner --output-dir <DIR> [--token <TOKEN>] [--if-missing]

See administration reference.

gdsgate authority create-token --role {proxy|connector|admin|workload|provisioner|agent-host} [--ttl <secs>]

See administration reference.

gdsgate authority rotate-ca

See administration reference.

gdsgate authority rotate-onward-ca

See administration reference.

gdsgate authority rotate-host-tls-ca

See administration reference.

gdsgate authority rotate-spiffe-ca

See administration reference.

gdsgate authority rotate-jwt-ca

See administration reference.

gdsgate authority list-nodes

See administration reference.

gdsgate authority list-offered

See administration reference.

gdsgate authority list-scopes

See administration reference.

gdsgate authority set-scope <prefix> --node <ID> --kind <KIND> --env <ENV>

See administration reference.

gdsgate authority remove-scope <prefix>

See administration reference.

gdsgate authority list-agents [--node <id>]

See administration reference.

gdsgate authority set-agent <id> --node <id> --program <path> --can <capability>

See administration reference.

gdsgate authority switch-agent <id> [--stop]

See administration reference.

gdsgate authority remove-agent <id>

See administration reference.

gdsgate authority revoke-node <id>

See administration reference.

gdsgate authority delete-node <id>

See administration reference.

gdsgate authority forget-user <subject>

See administration reference.

gdsgate authority import-node --role <ROLE> --cert <PATH>

See administration reference.

gdsgate authority list-workloads

See administration reference.

gdsgate authority revoke-workload <spiffe-id>

See administration reference.

gdsgate authority list-resources

See administration reference.

gdsgate authority list-serving

See administration reference.

gdsgate authority set-resource <id> --kind <KIND>

See administration reference.

gdsgate authority remove-resource <id>

See administration reference.

gdsgate authority activate --epoch <n>

See administration reference.

gdsgate authority onward-ca-pub

See administration reference.

gdsgate authority onward-ca-pubs

See administration reference.

gdsgate authority init --profile <NAME> [--output <PATH>] [--store-url <URL>] [--control-keyring <REFERENCE>] [--audit-keyring <REFERENCE>] [--kms-key <NAME=KIND:COMMAND>] [--if-missing]

See administration reference.

gdsgate authority set-profile --profile <NAME> --changed-by <NAME>

See administration reference.

gdsgate authority init-anchor [--path <PATH>] [--if-missing] (deprecated)

Deprecated; see Deprecated key commands. See administration reference.

gdsgate authority init-revocation-key [--path <PATH>] [--if-missing] (deprecated)

Deprecated; see Deprecated key commands. See administration reference.

gdsgate authority init-approval-key [--path <PATH>] [--if-missing] (deprecated)

Deprecated; see Deprecated key commands. See administration reference.

gdsgate authority init-inventory-key [--path <PATH>] [--if-missing] (deprecated)

Deprecated; see Deprecated key commands. See administration reference.

gdsgate authority init-delegation-key [--path <PATH>] [--if-missing] (deprecated)

Deprecated; see Deprecated key commands. See administration reference.

gdsgate authority keys migrate-legacy

See administration reference.

gdsgate authority verify-audit [--checkpoint-keys <FILE>] [--keyring <REFERENCE>]

See administration reference.

gdsgate authority audit list [filters]

See administration reference.

gdsgate authority migrate [--check]

See administration reference.

gdsgate authority policy template

See administration reference.

gdsgate authority policy validate [<FILE>] [-o <FILE>] [--rule-ids]

See administration reference.

gdsgate authority policy pull [-o <FILE>] [--version <N>]

See administration reference.

gdsgate authority policy history [--json]

See administration reference.

gdsgate authority policy diff [<A>] [<B>] [--file <PATH>]

See administration reference.

gdsgate authority policy revert <N> [--only <LIST>]

See administration reference.

gdsgate authority policy review <N> | --pending <N> | --file <PATH>

See administration reference.

gdsgate authority policy push <FILE>

See administration reference.

gdsgate authority policy edit

See administration reference.

gdsgate authority policy pending-edits

See administration reference.

gdsgate authority policy approve-edit <version>

See administration reference.

gdsgate authority policy reject-edit <version>

See administration reference.

gdsgate authority recordings list [filters]

See administration reference.

gdsgate authority recordings show <session_uid>

See administration reference.

gdsgate authority recordings live <session_uid>

See administration reference.

gdsgate proxy

See service reference.

gdsgate proxy init --domain <name>

See service reference.

gdsgate setup prepare --domain <name> --security-profile <profile>

See setup reference.

gdsgate setup change [--public-port <port>] [--serve <spec>]

See setup reference.

gdsgate setup restore [--list] [--checkpoint <name>]

See setup reference.

gdsgate setup check [--role client]

See setup reference.

gdsgate setup apply --bundle <dir>

See setup reference.

gdsgate connector

See service reference.

gdsgate connector recordings push [--dry-run]

See service reference.

gdsgate agent-host

See service reference.

gdsgate join <domain>

See join reference.

gdsgate all

See service reference.

gdsgate doctor

See diagnostics reference.

gdsgate config schema

See diagnostics reference.

gdsgate config check

See diagnostics reference.

gdsgate service install|uninstall <role>

See service reference.

gdsgate client-net

See service reference.

Client commands

See client reference.

gdsgate connect <host[:port]>

See client reference.

gdsgate login [--browser]

See client reference.

gdsgate up [--browser] [--foreground]

See client reference.

gdsgate down

See client reference.

gdsgate status [--json] [--explain] [--refresh]

See client reference.

gdsgate completion <bash|zsh|fish|powershell>

See client reference.

gdsgate machine-id [--token <jwt> | --provision-token <t> | --renew]

See client reference.

gdsgate delegate --can <cap>... [--ttl <secs>] [--bind-key <dir> | --exec <prog> [-- <args>...]]

See delegation reference.

What a grant carries into an ssh session

See delegation reference.

Saved delegations

See delegation reference.

Endpoints: what the program is given

See delegation reference.

Agent profiles

See delegation reference.

--sandbox basic and --sandbox strict

See delegation reference.

The difference between them

See delegation reference.

Security limitations

See delegation reference.

What the audit chain says about the sandbox

See delegation reference.

gdsgate delegations

See delegation reference.

gdsgate revoke <id> | --all | --owner <user>

See delegation reference.

gdsgate delegation status [--json]

See delegation reference.

gdsgate delegation renew [--endpoint <url>]

See delegation reference.

gdsgate ls

See access reference.

gdsgate request-access <resource> --reason <text> [--action <action>] [--ttl <secs>]

See access reference.

gdsgate approve <id>

See access reference.

gdsgate requests

See access reference.

gdsgate mfa enroll

See access reference.

gdsgate mfa confirm <code>

See access reference.

gdsgate mfa verify <code>

See access reference.

gdsgate mfa register-passkey

See access reference.

gdsgate mfa step-up

See access reference.

gdsgate step-up <resource> [--action <action>] [--code <totp>]

See access reference.

gdsgate ssh <target> [--exec [-- <ssh args>...]]

See protocol reference.

gdsgate ssh-config [<host_pattern>]

See protocol reference.

gdsgate proxy-ssh <resource>

See protocol reference.

gdsgate db ls

See protocol reference.

gdsgate db login <resource>

See protocol reference.

gdsgate db proxy <resource> [--listen <addr>]

See protocol reference.

gdsgate kube ls

See protocol reference.

gdsgate kube login <cluster> [--server <url>]

See protocol reference.

gdsgate kube credentials <cluster>

See protocol reference.

gdsgate kube proxy <cluster> [--listen <addr>]

See protocol reference.

gdsgate rdp ls

See protocol reference.

gdsgate rdp proxy <resource> [--listen <addr>] [--exec]

See protocol reference.

gdsgate tcp ls

See protocol reference.

gdsgate tcp proxy <resource> [--listen <addr>]

See protocol reference.

gdsgate mcp ls

See protocol reference.

gdsgate mcp proxy <resource> [--listen <addr>]

See protocol reference.

gdsgate mcp bridge <endpoint>

See protocol reference.

gdsgate web proxy <resource> [--listen <addr>]

See protocol reference.

gdsgate web trust [--quiet]

See protocol reference.

gdsgate ca rotate [--all]

See trust reference.

gdsgate ca learn-host-key <target>

See trust reference.

gdsgate ca fingerprint [--file <path>]

See trust reference.

gdsgate session list

See session reference.

gdsgate session kill [<id>] [--principal <p>] [--resource <r>]

See session reference.

gdsgate session watch

See session reference.

Environment variables

Cluster-configuration overlay

Every GDSGATE_* listed in Configuration → Environment overrides overlays the matching field in the TOML file. An unset variable changes nothing.

Client-side

Variable Purpose
GDSGATE_ID_TOKEN Identity token to present to the cluster (sub becomes the principal). Skips gdsgate login.
GDSGATE_USER Local-dev principal name when no [oidc] is configured. Default dev.
RUST_LOG Tracing filter. A client command defaults to warn; the resident client and the daemons default to warn,gdsgate=info: gdsgate* at INFO, everything else at WARN.

Node bootstrap

Variable Purpose
GDSGATE_ENROLL_TOKEN One-time node-registration token. Consumed by Authority on first start of a Proxy or Connector. Preferred over enroll.token in the file.

Exit codes

  • 0: command succeeded.
  • 1: generic failure, with the error logged to stderr.
  • 2: gdsgate doctor found a failing check, config check found warnings and no error, authority verify-audit found the audit chain broken, or join was given arguments that do not describe an installation.

  • 3: nothing to do, where a run with --if-missing found what it was asked to create and changed nothing. Only authority init, authority bootstrap-admin, authority bootstrap-provisioner and the five deprecated authority init-* commands produce it, and only when that flag is passed.

  • 101: Rust panic, an unrecoverable internal error worth reporting.

A non-zero exit from authority policy validate indicates a policy error suitable for CI gating.

A provisioning script tells the outcomes apart by exit code: created (0), already there (3), failed (1). Output wording may change; do not parse it. Under set -e, allow 3 explicitly:

Shell
gdsgate authority init --profile production --output /etc/gdsgate/authority.toml \
    --control-keyring /etc/gdsgate/control.keys --audit-keyring /etc/gdsgate/audit.keys \
    --if-missing || [ $? -eq 3 ]
gdsgate --config authority.toml authority bootstrap-admin \
    --output-dir /var/lib/gdsgate/admin --if-missing || [ $? -eq 3 ]

Search this documentation edition.