Skip to content

ctx_

Multi-environment context manager

Switch between AWS profiles, Kubernetes clusters, VPN connections, and SSH tunnels with a single command.

$ ctx list
NAME ENVIRONMENT CLOUD ORCHESTRATION
acme-dev development aws kubernetes
acme-staging staging aws kubernetes
acme-prod production aws kubernetes
$ ctx use acme-prod
AWS profile: acme-prod (us-east-1)
Kubernetes: prod-cluster/default
VPN connected: wireguard (wg0)
Tunnels: postgres, redis
[ctx: acme-prod] $

Features

Category Features
Cloud Providers AWS, GCP, Azure profile switching with auto-login support
Orchestration Kubernetes, Nomad, Consul context management
Networking SSH tunnels with auto-reconnect, per-tunnel management
VPN OpenVPN, WireGuard, Tailscale, custom commands
Secrets Bitwarden, 1Password, Vault, AWS Secrets Manager, AWS SSM, GCP Secret Manager
Identity Per-context Git user configuration
Registries Docker and NPM registry configuration
Browser Chrome/Firefox profile per context for SSO workflows
Shell Per-shell contexts, colored prompts, environment isolation
Inheritance Base/abstract contexts with multi-level inheritance

Platform Support

Platform Status Notes
Linux Full support Native support
macOS Full support Native support
Windows WSL required Full WSL support including browser profiles

Windows Users

ctx uses Unix shell scripts and process signals. Please use WSL (Windows Subsystem for Linux). Browser profile detection works automatically with your Windows Chrome/Firefox installations.

Quick Install

curl -fsSL https://github.com/vlebo/ctx/releases/latest/download/install.sh | sh

Then add the shell hook to your ~/.zshrc or ~/.bashrc:

eval "$(ctx shell-hook zsh)"
eval "$(ctx shell-hook bash)"

Next Steps