JSPM

  • Created
  • Published
  • Downloads 2276
  • Score
    100M100P100Q147757F
  • License UNLICENSED

Zondax CLI

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

    npx -y @zondax/cli@latest

    Running locally

    ./src/main.ts

    Available 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 devpod

    infra kubeconfig

    Update your Kubernetes configuration to connect to Zondax clusters.

    npx -y @zondax/cli@latest infra kubeconfig

    infra images

    Check and validate Docker image versions used in your projects.

    npx -y @zondax/cli@latest infra images

    infra onboard

    Onboard your development environment by installing all required tools (macOS only).

    npx -y @zondax/cli@latest infra onboard

    This 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 web

    Prerequisites:

    • env-config.json file in your project root with GCP configuration
    • gcloud CLI 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 npm

    Required Environment Variables:

    • PULUMI_GOLEM_APP_PEM: GitHub App private key (PEM format)
    • PULUMI_GOLEM_APP_ID: GitHub App ID
    • PULUMI_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 init

    CI/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-deps

    Development

    Prerequisites

    • Node.js 20.11.1 or higher
    • Bun 1.1.37 or higher

    Running Tests

    bun test

    Code Quality

    # Linting
    bun run lint
    
    # Formatting
    bun run format
    
    # Type checking
    bun run typecheck

    License

    UNLICENSED - This is proprietary software owned by Zondax AG.