A beautiful command-line interface for cloud operations with unified profile management, instance connections, and container registry tools.
- 🌥️ Unified Cloud Profiles - Switch between AWS, GCP, and Azure profiles seamlessly
- 🖥️ Instance Connections - Connect to cloud instances via SSM/SSH with automatic discovery
- 🚇 Bastion Tunneling - Secure tunneling through bastion hosts
- 🐳 Container Registry - Easy ECR/container registry login and management
- 💾 Smart Caching - Intelligent caching for faster operations
- ⚡ Lazy Loading - Fast shell startup with on-demand loading
curl -fsSL https://raw.githubusercontent.com/mlnja/cde/main/install.sh | bash- Clone the repository:
git clone https://github.com/mlnja/cde.git ~/.local/share/cde- Install dependencies:
go install github.com/charmbracelet/gum@latest
go install github.com/charmbracelet/skate@latest
go install github.com/mikefarah/yq/v4@latest- Add to your shell configuration (~/.zshenv):
# Add CDE to your shell
source ~/.local/share/cde/cde.zsh
# Make sure Go bin is in PATH
export PATH=$PATH:$HOME/go/bin- Reload your shell:
source ~/.zshenv- Git - For installation and updates
- Go - For installing gum, skate, and yq dependencies
- jq - For JSON processing
- tmux - For tunnel management and bastion operations
- Zsh or Bash - Shell support
- AWS CLI - For AWS operations
- session-manager-plugin - Required for AWS instance connections and SSM operations
- gcloud - For GCP operations
- Azure CLI - For Azure operations
cde help # Show help
cde doctor # Check dependencies and installation
cde cache # Show cached data
cde cache.clean # Clean all cached data
cde update # Update CDE to latest versioncde.p # Interactive profile selectorcde.ssm # Interactive instance selector
cde.ssm refresh # Refresh instance cache
cde.ssm show # Show cached instancescde.tun # Interactive tunnel management
cde.tun clean # Clean all tunnelscde.cr login # Login to ECR (current region)
cde.cr login us-west-2 # Login to specific region
cde.cr # Get ECR URL for current profilecde.k8x # Interactive kubernetes context selector
cde.k8x help # Show k8x help messageCDE uses standard cloud CLI configurations:
- AWS:
~/.aws/configand~/.aws/credentials - GCP:
gcloud config - Azure:
az account
Create ~/.cde/config.yml to configure CDE features:
# Bitwarden PGP key for encrypted password storage
pgp_key_id: "YOUR_GPG_KEY_ID"
# Bastion tunnel targets for secure port forwarding
bastion_targets:
- profile: "production"
name: "database"
host: "prod-db.internal"
port: "5432:5432"
- profile: "staging"
name: "redis"
host: "stage-redis.internal"
port: "6379:6380"pgp_key_id (optional)
- Your GPG key ID for Bitwarden password encryption
- Used by
cde.bwcommand for secure password storage - Format: GPG key ID (e.g.,
A1B2C3D4)
bastion_targets (optional)
- List of bastion tunnel target definitions
- Each target requires:
profile: AWS profile namename: Display name for the tunnelhost: Target hostname (accessible from bastion)port: Port mapping asremote_port:local_port
CDE intelligently caches cloud data to improve performance:
- Instance lists are cached per profile
- Cache is automatically invalidated when switching profiles
- Manual cache cleanup with
cde cache.clean
Update CDE to the latest version:
cde updateThis will pull the latest changes from the repository and reload the functions.
cde doctor # Check all dependencies and installation status- Ensure CDE is properly sourced in your shell config (~/.zshenv)
- Verify Go bin directory is in your PATH:
echo $PATH | grep go/bin - Reload your shell:
source ~/.zshenv
- Run
cde doctorto see what's missing - Install missing tools:
go install github.com/charmbracelet/gum@latest
- Ensure cloud CLIs are installed and configured
- Check authentication:
aws sts get-caller-identity(for AWS)
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
MIT License - see LICENSE file for details.