@quantumapi/cli
v1.0.9
Published
QuantumAPI CLI - Quantum-safe encryption from your terminal
Downloads
939
Maintainers
Readme
qapi - QuantumAPI CLI
The official command-line interface for QuantumAPI, a European quantum-safe encryption and identity platform.
Features
- Encryption Operations: Encrypt and decrypt data using post-quantum cryptography
- Key Management: Create, rotate, and manage cryptographic keys
- Secret Vault: Store and retrieve secrets securely
- User Management: Manage users and permissions
- Self-Update: Keep the CLI up to date automatically
- Shell Completions: Tab completion for bash, zsh, fish, and PowerShell
- CI/CD Ready: Designed for automation and scripting
Installation
Homebrew (macOS/Linux)
brew install quantumapi/tap/qapiDirect Download (Recommended)
curl -sSL https://raw.githubusercontent.com/victorZKov/mislata/main/src/cli/qapi/scripts/install.sh | shNPM
npm install -g @quantumapi/cliChocolatey (Windows)
choco install quantumapi-cliDocker
docker run --rm -it ghcr.io/quantumapi/qapi:latest versionFrom Source
git clone https://github.com/quantumapi/qapi
cd qapi
make buildQuick Start
# Configure your API key
qapi configure
# Check your identity
qapi whoami
# Check API health
qapi health
# List your keys
qapi keys list
# Encrypt data
qapi encrypt "secret message" --key my-key
# Manage secrets
qapi secrets create db_password "super_secret"
qapi secrets get db_password --showConfiguration
Configuration is stored in ~/.quantumapi/config.toml:
api_key = "qapi_xxx"
endpoint = "https://api.quantumapi.eu"
output = "table"
color = trueEnvironment Variables
QAPI_API_KEY- API key (overrides config file)QAPI_ENDPOINT- API endpoint (overrides config file)NO_COLOR- Disable colored output
Profiles
# Create a staging profile
qapi configure --profile staging
# Use a specific profile
qapi --profile staging secrets listOn-Premises / Custom Endpoint
For on-premises installations or custom endpoints:
# Use a custom endpoint
qapi --endpoint https://api.mycompany.local keys list
# Skip TLS verification (for self-signed certificates)
qapi --endpoint https://api.mycompany.local --insecure keys list
# Or configure permanently
qapi configure
# Enter your custom endpoint when promptedOutput Formats
All commands support multiple output formats:
qapi keys list # Table (default)
qapi keys list --output json # JSON
qapi keys list --output yaml # YAML
qapi keys list --output csv # CSVCommands
Core Commands
| Command | Description |
|---------|-------------|
| qapi configure | Configure CLI settings |
| qapi whoami | Show current authentication info |
| qapi health | Check API connectivity |
| qapi version | Show CLI version |
| qapi update | Update to the latest version |
| qapi completion | Generate shell completions |
Encryption
| Command | Description |
|---------|-------------|
| qapi encrypt | Encrypt data |
| qapi decrypt | Decrypt data |
| qapi sign | Sign data |
| qapi verify | Verify signatures |
Key Management
| Command | Description |
|---------|-------------|
| qapi keys list | List all keys |
| qapi keys get | Get key details |
| qapi keys generate | Generate a new key |
| qapi keys rotate | Rotate a key |
| qapi keys delete | Delete a key |
| qapi keys export | Export public key |
| qapi keys update | Update key metadata |
| qapi keys set-default | Set default key |
| qapi keys check | Check key health |
Secret Vault
| Command | Description |
|---------|-------------|
| qapi secrets list | List all secrets |
| qapi secrets get | Get a secret |
| qapi secrets create | Create a secret |
| qapi secrets update | Update a secret |
| qapi secrets delete | Delete a secret |
| qapi secrets restore | Restore deleted secret |
| qapi secrets versions | List secret versions |
| qapi secrets rollback | Rollback to version |
| qapi secrets share | Create share link |
| qapi secrets insights | Get secret insights |
| qapi secrets export | Export secrets |
| qapi secrets import | Import secrets |
Administration
| Command | Description |
|---------|-------------|
| qapi users | User management |
| qapi apps | Application management |
| qapi team | Team management |
| qapi audit | Audit log queries |
| qapi billing | Billing and usage info |
Shell Completions
Generate shell completion scripts:
# Bash
qapi completion bash > /etc/bash_completion.d/qapi
# Zsh
qapi completion zsh > "${fpath[1]}/_qapi"
# Fish
qapi completion fish > ~/.config/fish/completions/qapi.fish
# PowerShell
qapi completion powershell > qapi.ps1Self-Update
Keep the CLI up to date:
# Check for updates
qapi update --check
# Update to latest version
qapi update
# Force update even if on latest
qapi update --forceCI/CD Integration
GitHub Actions
- name: Install qapi
run: curl -sSL https://raw.githubusercontent.com/victorZKov/mislata/main/src/cli/qapi/scripts/install.sh | sh
- name: Encrypt secrets
env:
QAPI_API_KEY: ${{ secrets.QAPI_API_KEY }}
run: |
qapi encrypt "${{ secrets.DB_PASSWORD }}" --key prod-key > encrypted.txtGitLab CI
deploy:
script:
- curl -sSL https://raw.githubusercontent.com/victorZKov/mislata/main/src/cli/qapi/scripts/install.sh | sh
- qapi secrets get DB_PASSWORD --show > .env
variables:
QAPI_API_KEY: $QAPI_API_KEYDevelopment
# Build
make build
# Run tests
make test
# Build for all platforms
make build-all
# Create a snapshot release (for testing)
make release-snapshot
# Create a release
make releaseLicense
MIT License - see LICENSE for details.
Support
- Documentation: https://docs.quantumapi.eu/cli
- Issues: https://github.com/quantumapi/qapi/issues
- Email: [email protected]
