Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@zondax/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Zondax CLI
The Zondax CLI is a command-line interface tool designed to streamline and automate workflows for Zondax developers.
Installation
Using npx (recommended)
npx -y @zondax/cli@latestRunning locally
./src/main.tsAvailable Commands
The CLI provides several command groups to help manage your development workflow:
Infrastructure Commands (infra)
Commands for managing development infrastructure and environment setup.
infra devpod
Set up and configure DevPod for development.
npx -y @zondax/cli@latest infra devpodinfra kubeconfig
Update your Kubernetes configuration to connect to Zondax clusters.
npx -y @zondax/cli@latest infra kubeconfiginfra images
Check and validate Docker image versions used in your projects.
npx -y @zondax/cli@latest infra imagesinfra onboard
Onboard your development environment by installing all required tools (macOS only).
npx -y @zondax/cli@latest infra onboardThis command will check and install:
- Homebrew
- Cloudflare WARP
- 1Password CLI
- kubectl, kubectx, kubelogin
- Flux, Helm, k9s
- Go, Earthly
- And configure necessary environment variables
Environment Commands (env)
Manage environment files using Google Cloud Platform Secret Manager.
env init
Initialize environment files from GCP Secret Manager.
# Initialize all apps
npx -y @zondax/cli@latest env init
# Initialize specific app
npx -y @zondax/cli@latest env init webPrerequisites:
env-config.jsonfile in your project root with GCP configurationgcloudCLI installed and authenticated- Appropriate GCP permissions to access secrets
Example env-config.json:
{
"gcp": {
"projectId": "your-gcp-project-id",
"secrets": {
"web": "web-app-env-secret",
"api": "api-app-env-secret"
}
}
}CI/CD Commands (ci)
Commands for continuous integration and deployment workflows.
ci checkout
Update git submodules using GitHub App authentication. Useful for CI environments where you need to authenticate private submodules.
# Basic usage
npx -y @zondax/cli@latest ci checkout
# With dependency installation
npx -y @zondax/cli@latest ci checkout --install-deps
# Specify package manager
npx -y @zondax/cli@latest ci checkout --install-deps --package-manager npmRequired Environment Variables:
PULUMI_GOLEM_APP_PEM: GitHub App private key (PEM format)PULUMI_GOLEM_APP_ID: GitHub App IDPULUMI_GOLEM_INSTALLATION_ID: GitHub App installation ID
Common Workflows
Initial Development Setup
# 1. Onboard your development environment
npx -y @zondax/cli@latest infra onboard
# 2. Configure Kubernetes access
npx -y @zondax/cli@latest infra kubeconfig
# 3. Initialize environment files
npx -y @zondax/cli@latest env initCI/CD Pipeline Setup
# In your CI pipeline, use this to checkout private submodules
export PULUMI_GOLEM_APP_PEM="your-pem-key"
export PULUMI_GOLEM_APP_ID="your-app-id"
export PULUMI_GOLEM_INSTALLATION_ID="your-installation-id"
npx -y @zondax/cli@latest ci checkout --install-depsDevelopment
Prerequisites
- Node.js 20.11.1 or higher
- Bun 1.1.37 or higher
Running Tests
bun testCode Quality
# Linting
bun run lint
# Formatting
bun run format
# Type checking
bun run typecheckLicense
UNLICENSED - This is proprietary software owned by Zondax AG.