Skip to main content

Configuration

Setting the Gateway URL

The CLI needs to know where the Shift gateway is running. Use shift-cli config set to configure it:

# Local Kubernetes (via lvh.me)
shift-cli config set gateway-url http://shift.lvh.me

# Production
shift-cli config set gateway-url https://app.the-shift.dev

Read back the current value:

shift-cli config get gateway-url

Config File

Configuration is stored in ~/.shift/config.json with file mode 0o600 (owner read/write only).

Example contents:

{
"gateway-url": "https://app.the-shift.dev"
}

Environment Variable Override

The gateway URL can be overridden at runtime with the GATEWAY_URL environment variable:

GATEWAY_URL=http://localhost:3000 shift-cli status

This takes precedence over the value in ~/.shift/config.json.

URL Scheme Requirements

The CLI enforces HTTPS for most gateway URLs. Plain http:// is only accepted for:

  • localhost / 127.0.0.1
  • *.lvh.me

All other URLs require https://.