kupe-cli

module
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: Apache-2.0

README

kupe

The official command-line interface for Kupe — managed Kubernetes clusters in seconds.

kupe cluster create prod --type shared --version 1.32 \
  --cpu-limit 2 --memory-limit 8Gi --storage-limit 50Gi
kupe cluster kubeconfig prod --merge
kubectl get pods

Install

macOS

Install script (no prerequisites, no sudo):

curl -fsSL https://get.kupe.cloud | sh

Installs to ~/.local/bin/kupe. macOS doesn't have ~/.local/bin on PATH by default; the script prints shell-specific one-liners to add it.

Or via Homebrew (auto-updates + completions + man page):

brew install kupecloud/tap/kupe
Linux

Install script (no prerequisites, no sudo):

curl -fsSL https://get.kupe.cloud | sh

Installs to ~/.local/bin/kupe. On most modern distros (Ubuntu since 18.04, Fedora, etc.) ~/.local/bin is already on PATH.

Or via Homebrew (Linuxbrew):

brew install kupecloud/tap/kupe
Windows
scoop bucket add kupe https://github.com/kupecloud/scoop-bucket
scoop install kupe
Other ways (any platform)

From source (requires Go 1.26+):

go install github.com/kupecloud/kupe-cli/cmd/kupe@latest

Direct download — pre-built binaries for darwin/linux/windows × amd64/arm64 are attached to each GitHub release. Each release also ships a Cosign-signed checksums.txt and SBOMs (SPDX JSON) per archive.

Install script — flags
# Pin a version (default: latest)
curl -fsSL https://get.kupe.cloud | sh -s -- --version 1.1.3

# System-wide install instead of ~/.local/bin (will sudo)
curl -fsSL https://get.kupe.cloud | sh -s -- --install-dir /usr/local/bin

Code signing status

While the wider Kupe Cloud platform is still phasing through alpha, the kupe binary is not yet Apple-notarized or Authenticode-signed. We strip the relevant OS attributes automatically on the install paths that can do so (install script, Homebrew cask) — full signing will land alongside the platform GA.

  • macOS — binaries are not yet Apple-notarized. The install script and Homebrew cask both strip com.apple.quarantine automatically, so the curl-pipe and brew install paths don't trigger Gatekeeper. If you downloaded a binary directly from a release page and hit the "could not verify" dialog, run once: xattr -dr com.apple.quarantine "$(which kupe)".
  • Windows — binaries are not yet Authenticode-signed, so SmartScreen shows "Windows protected your PC" on first run. Click More info → Run anyway. Azure Trusted Signing will replace this workaround.
  • Linux — no warning. Binaries are checksum-verified by the install script and via Cosign keyless signing on checksums.txt for users who want to verify manually (cosign verify-blob …).

Quickstart

# 1. Log in. The default --method=oidc runs an OAuth2 device-code flow:
#    the CLI prints a short user code and a verification URL, opens your
#    browser (best-effort), and waits for you to approve. Works on a
#    laptop, an SSH session, or a CI runner — no localhost listener.
#    Use --method=token to paste a long-lived API key from
#    https://console.kupe.cloud/settings/api-keys (CI / scripts).
kupe auth login --tenant acme-corp

# 2. Create a cluster
kupe cluster create dev --type shared \
  --cpu-limit 2 --memory-limit 8Gi --storage-limit 50Gi

# 3. Merge its kubeconfig into ~/.kube/config
kupe cluster kubeconfig dev --merge

# 4. Use it
kubectl --context kupe-<tenant>-dev get pods -A

# 5. Tear it down
kupe cluster delete dev

Full getting-started guide: docs.kupe.cloud/cli/getting-started.

CI usage

# Token from env var — no config file needed
export KUPE_API_TOKEN="kupe_abc_..."
export KUPE_TENANT="acme-corp"

# JSON output, no TTY niceties
kupe cluster create "ci-$GITHUB_SHA" --type shared \
  --cpu-limit 2 --memory-limit 8Gi --storage-limit 50Gi \
  --wait -o json

The CLI auto-detects non-TTY environments and switches off colors, spinners, and prompts. See docs/design.md for the full interactive-vs-CI contract.

Command overview

Command Purpose
kupe auth login Authenticate with an API token
kupe auth whoami Show who you're logged in as
kupe cluster list List clusters in the current tenant
kupe cluster create NAME Create a new cluster
kupe cluster kubeconfig NAME Fetch or merge a kubeconfig
kupe cluster delete NAME Delete a cluster
kupe apikey create Mint a new API token
kupe config use-context NAME Switch between environments / tenants

Run kupe --help or see docs/commands.md for the full reference.

Configuration

Config lives at ~/.config/kupe/config.yaml. Tokens are stored in the OS keyring (Keychain / Secret Service / Credential Manager), not in the config file.

All settings can be overridden by flags or KUPE_* environment variables. See docs/auth.md.

Documentation

Contributing

Development

make build       # Build the binary into ./bin/kupe
make test        # Unit tests
make lint        # golangci-lint
make snapshot    # Build a release locally (no publish)
make manpages    # Generate man(1) pages into man/man1/

Hit a live development environment:

export KUPE_API_TOKEN=kupe_…
export KUPE_API_URL=https://api.dev.int.kupe.cloud
export KUPE_TENANT=kupe-test
go run ./cmd/kupe cluster list

License

Apache 2.0.

Directories

Path Synopsis
cmd
kupe command
Binary kupe is the official command-line interface for Kupe Cloud.
Binary kupe is the official command-line interface for Kupe Cloud.
internal
auth
Package auth owns token storage for the kupe CLI.
Package auth owns token storage for the kupe CLI.
build
Package build holds build-time metadata injected via -ldflags at link time.
Package build holds build-time metadata injected via -ldflags at link time.
cli
Package cli owns the runtime plumbing shared by every command: the Factory that resolves config + client on demand, the IOStreams abstraction that gates color/spinners/prompts, the global flag struct bound on root, and the error-to-exit-code mapping.
Package cli owns the runtime plumbing shared by every command: the Factory that resolves config + client on demand, the IOStreams abstraction that gates color/spinners/prompts, the global flag struct bound on root, and the error-to-exit-code mapping.
client
Package client is the HTTP client for kupe-api.
Package client is the HTTP client for kupe-api.
client/clienttest
Package clienttest provides an in-memory Fake implementing client.Interface for use in unit tests.
Package clienttest provides an in-memory Fake implementing client.Interface for use in unit tests.
cmd
Package cmd wires the Cobra command tree for the kupe CLI.
Package cmd wires the Cobra command tree for the kupe CLI.
cmd/apikey
Package apikey wires the "kupe apikey" subcommand tree: list, create, delete.
Package apikey wires the "kupe apikey" subcommand tree: list, create, delete.
cmd/auth
Package auth wires the "kupe auth" subcommand tree: login, logout, whoami, get-token.
Package auth wires the "kupe auth" subcommand tree: login, logout, whoami, get-token.
cmd/cluster
Package cluster wires the "kupe cluster" subcommand tree: list, get, create, delete, update, kubeconfig (Phase 4), wait.
Package cluster wires the "kupe cluster" subcommand tree: list, get, create, delete, update, kubeconfig (Phase 4), wait.
cmd/config
Package config wires the "kupe config" subcommand tree.
Package config wires the "kupe config" subcommand tree.
cmd/invoice
Package invoice wires the "kupe invoice" subcommand tree — list + get.
Package invoice wires the "kupe invoice" subcommand tree — list + get.
cmd/member
Package member wires the "kupe member" subcommand tree: list, add, update (role), remove.
Package member wires the "kupe member" subcommand tree: list, add, update (role), remove.
cmd/plan
Package plan wires the "kupe plan" subcommand tree — list + get against the public /api/v1/plans endpoints.
Package plan wires the "kupe plan" subcommand tree — list + get against the public /api/v1/plans endpoints.
cmd/secret
Package secret wires the "kupe secret" subcommand tree for managed tenant secrets.
Package secret wires the "kupe secret" subcommand tree for managed tenant secrets.
cmd/tenant
Package tenant wires the "kupe tenant" subcommand tree.
Package tenant wires the "kupe tenant" subcommand tree.
config
Package config loads, saves, and resolves the kupe CLI's YAML config file.
Package config loads, saves, and resolves the kupe CLI's YAML config file.
kubeconfig
Package kubeconfig assembles kubectl-compatible kubeconfig files from the {endpoint, certificateAuthority} envelope the kupe-api exposes, and merges them into the user's existing $KUBECONFIG / ~/.kube/config.
Package kubeconfig assembles kubectl-compatible kubeconfig files from the {endpoint, certificateAuthority} envelope the kupe-api exposes, and merges them into the user's existing $KUBECONFIG / ~/.kube/config.
printer
Package printer handles rendering resources to stdout in the formats the -o flag supports (table, wide, json, yaml, name, go-template).
Package printer handles rendering resources to stdout in the formats the -o flag supports (table, wide, json, yaml, name, go-template).
ux
Package ux owns the CLI's rich-output primitives: palette, spinner, progress driver for long-running polls.
Package ux owns the CLI's rich-output primitives: palette, spinner, progress driver for long-running polls.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL