CLI Installation
This guide covers installing the Voidkey CLI on various operating systems.
Pre-built Binaries
Section titled “Pre-built Binaries”The easiest way to install the Voidkey CLI is to download pre-built binaries from the GitHub releases page.
Download Latest Release
Section titled “Download Latest Release”# Linux (x86_64)curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-amd64 -o voidkeychmod +x voidkeysudo mv voidkey /usr/local/bin/
# Linux (ARM64)curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-arm64 -o voidkeychmod +x voidkeysudo mv voidkey /usr/local/bin/
# macOS (Intel)curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-darwin-amd64 -o voidkeychmod +x voidkeysudo mv voidkey /usr/local/bin/
# macOS (Apple Silicon)curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-darwin-arm64 -o voidkeychmod +x voidkeysudo mv voidkey /usr/local/bin/
# Windows (PowerShell)Invoke-WebRequest -Uri "https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-windows-amd64.exe" -OutFile "voidkey.exe"Install Script
Section titled “Install Script”Use the installation script for automatic platform detection:
curl -sSL https://raw.githubusercontent.com/voidkey-oss/voidkey/main/install.sh | bashOr with custom installation directory:
curl -sSL https://raw.githubusercontent.com/voidkey-oss/voidkey/main/install.sh | bash -s -- --dir /usr/local/binPackage Managers
Section titled “Package Managers”Homebrew (macOS/Linux)
Section titled “Homebrew (macOS/Linux)”# Add the tapbrew tap voidkey-oss/voidkey
# Install the CLIbrew install voidkeyUpdate to latest version:
brew update && brew upgrade voidkeyAPT (Debian/Ubuntu)
Section titled “APT (Debian/Ubuntu)”# Add repositorycurl -fsSL https://pkg.voidkey.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/voidkey.gpgecho "deb [signed-by=/usr/share/keyrings/voidkey.gpg] https://pkg.voidkey.io/deb stable main" | sudo tee /etc/apt/sources.list.d/voidkey.list
# Update and installsudo apt updatesudo apt install voidkeyYUM/DNF (Red Hat/CentOS/Fedora)
Section titled “YUM/DNF (Red Hat/CentOS/Fedora)”# Add repositorysudo tee /etc/yum.repos.d/voidkey.repo <<EOF[voidkey]name=Voidkey Repositorybaseurl=https://pkg.voidkey.io/rpmenabled=1gpgcheck=1gpgkey=https://pkg.voidkey.io/gpgEOF
# Installsudo yum install voidkey # CentOS/RHEL# orsudo dnf install voidkey # FedoraSnap (Linux)
Section titled “Snap (Linux)”sudo snap install voidkeyChocolatey (Windows)
Section titled “Chocolatey (Windows)”choco install voidkeyScoop (Windows)
Section titled “Scoop (Windows)”scoop bucket add voidkey https://github.com/voidkey-oss/scoop-bucketscoop install voidkeyBuilding from Source
Section titled “Building from Source”Prerequisites
Section titled “Prerequisites”- Go 1.21 or later
- Git
Build Steps
Section titled “Build Steps”# Clone the repositorygit clone https://github.com/voidkey-oss/voidkey.gitcd voidkey/cli
# Download dependenciesgo mod download
# Build the binarygo build -o voidkey main.go
# Install globallysudo mv voidkey /usr/local/bin/Build with Make
Section titled “Build with Make”# Clone and buildgit clone https://github.com/voidkey-oss/voidkey.gitcd voidkey
# Build CLImake build-cli
# Installsudo make install-cliCross-compilation
Section titled “Cross-compilation”# Build for different platformsGOOS=linux GOARCH=amd64 go build -o voidkey-linux-amd64 main.goGOOS=darwin GOARCH=arm64 go build -o voidkey-darwin-arm64 main.goGOOS=windows GOARCH=amd64 go build -o voidkey-windows-amd64.exe main.goDocker
Section titled “Docker”Run the CLI using Docker:
# Pull the imagedocker pull voidkey/cli:latest
# Run commandsdocker run --rm voidkey/cli:latest version
# With environment variablesdocker run --rm \ -e VOIDKEY_BROKER_URL=https://broker.example.com \ -e VOIDKEY_OIDC_TOKEN="$OIDC_TOKEN" \ voidkey/cli:latest mint --keys AWS_DEPLOYCreate an alias for easier usage:
alias voidkey='docker run --rm -e VOIDKEY_BROKER_URL -e VOIDKEY_OIDC_TOKEN voidkey/cli:latest'voidkey versionGo Install
Section titled “Go Install”Install directly using Go:
go install github.com/voidkey-oss/voidkey/cli@latestThis installs to $GOPATH/bin (or $GOBIN if set).
Verification
Section titled “Verification”Verify the installation:
# Check versionvoidkey version
# Check helpvoidkey --help
# Test connectivity (requires broker URL)export VOIDKEY_BROKER_URL=https://broker.example.comvoidkey list-keys --helpPlatform-Specific Instructions
Section titled “Platform-Specific Instructions”System-wide installation:
sudo curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-amd64 -o /usr/local/bin/voidkeysudo chmod +x /usr/local/bin/voidkeyUser-only installation:
mkdir -p ~/.local/bincurl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-amd64 -o ~/.local/bin/voidkeychmod +x ~/.local/bin/voidkey
# Add to PATH if not alreadyecho 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrcsource ~/.bashrcUsing Homebrew (recommended):
brew tap voidkey-oss/voidkeybrew install voidkeyManual installation:
curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-darwin-arm64 -o voidkeychmod +x voidkeysudo mv voidkey /usr/local/bin/
# For Intel Macs, use voidkey-darwin-amd64Bypassing Gatekeeper: If macOS blocks the binary, you may need to allow it:
sudo xattr -rd com.apple.quarantine /usr/local/bin/voidkeyWindows
Section titled “Windows”Using Chocolatey:
choco install voidkeyManual installation:
- Download
voidkey-windows-amd64.exe - Rename to
voidkey.exe - Place in a directory in your PATH (e.g.,
C:\Program Files\voidkey\) - Add the directory to your PATH environment variable
PowerShell:
# Create directoryNew-Item -ItemType Directory -Force -Path "C:\Program Files\voidkey"
# DownloadInvoke-WebRequest -Uri "https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-windows-amd64.exe" -OutFile "C:\Program Files\voidkey\voidkey.exe"
# Add to PATH (requires admin)$env:PATH += ";C:\Program Files\voidkey"[Environment]::SetEnvironmentVariable("Path", $env:PATH, [EnvironmentVariableTarget]::Machine)CI/CD Installation
Section titled “CI/CD Installation”GitHub Actions
Section titled “GitHub Actions”- name: Install Voidkey CLI run: | curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-amd64 -o voidkey chmod +x voidkey sudo mv voidkey /usr/local/bin/
- name: Use Voidkey run: voidkey mint --keys AWS_DEPLOY env: VOIDKEY_BROKER_URL: ${{ vars.VOIDKEY_BROKER_URL }} VOIDKEY_OIDC_TOKEN: ${{ steps.get-token.outputs.token }}GitLab CI
Section titled “GitLab CI”before_script: - curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-amd64 -o voidkey - chmod +x voidkey - mv voidkey /usr/local/bin/
deploy: script: - voidkey mint --keys AWS_DEPLOY variables: VOIDKEY_BROKER_URL: "https://broker.example.com" VOIDKEY_OIDC_TOKEN: "$CI_JOB_JWT_V2"Jenkins
Section titled “Jenkins”pipeline { agent any
stages { stage('Install CLI') { steps { sh ''' curl -L https://github.com/voidkey-oss/voidkey/releases/latest/download/voidkey-linux-amd64 -o voidkey chmod +x voidkey sudo mv voidkey /usr/local/bin/ ''' } }
stage('Deploy') { steps { withCredentials([string(credentialsId: 'oidc-token', variable: 'VOIDKEY_OIDC_TOKEN')]) { sh 'voidkey mint --keys AWS_DEPLOY' } } } }}Shell Completion
Section titled “Shell Completion”Enable shell completion for better CLI experience:
# Generate completion scriptvoidkey completion bash > /etc/bash_completion.d/voidkey
# Or for user onlyvoidkey completion bash > ~/.local/share/bash-completion/completions/voidkey# Generate completion scriptvoidkey completion zsh > "${fpath[1]}/_voidkey"
# Reload completionsautoload -U compinit && compinitvoidkey completion fish > ~/.config/fish/completions/voidkey.fishPowerShell
Section titled “PowerShell”voidkey completion powershell | Out-String | Invoke-ExpressionAdd to your PowerShell profile for persistence:
voidkey completion powershell >> $PROFILETroubleshooting
Section titled “Troubleshooting”Permission Denied
Section titled “Permission Denied”If you get permission denied errors:
# Make sure binary is executablechmod +x /usr/local/bin/voidkey
# Check if directory is in PATHecho $PATH | grep -q /usr/local/bin && echo "Found" || echo "Not found"
# Add to PATH if missingecho 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrcsource ~/.bashrcCommand Not Found
Section titled “Command Not Found”If the command is not found after installation:
# Check if binary existsls -la /usr/local/bin/voidkey
# Check PATHecho $PATH
# Try absolute path/usr/local/bin/voidkey version
# Reload shellsource ~/.bashrc # or ~/.zshrcSSL/TLS Issues
Section titled “SSL/TLS Issues”If you encounter TLS errors:
# Update CA certificatessudo apt update && sudo apt install ca-certificates # Ubuntu/Debiansudo yum update ca-certificates # CentOS/RHEL
# Or specify custom CA bundleexport SSL_CERT_FILE=/path/to/ca-bundle.crtProxy Issues
Section titled “Proxy Issues”If behind a corporate proxy:
export HTTP_PROXY=http://proxy.company.com:8080export HTTPS_PROXY=https://proxy.company.com:8080export NO_PROXY=localhost,127.0.0.1,.company.comUpdating
Section titled “Updating”Automatic Updates
Section titled “Automatic Updates”The CLI can check for updates:
# Check for newer versionvoidkey version --check-update
# Update if available (where supported)voidkey updateManual Updates
Section titled “Manual Updates”Re-run the installation command to get the latest version:
# Using install scriptcurl -sSL https://raw.githubusercontent.com/voidkey-oss/voidkey/main/install.sh | bash
# Using package managerbrew upgrade voidkey # Homebrewsudo apt update && sudo apt upgrade voidkey # APTNext Steps
Section titled “Next Steps”- CLI Commands - Learn the available commands
- CLI Configuration - Configure the CLI
- Quick Start - Try the CLI with our sandbox
- GitHub Actions Example - Use in CI/CD