Package Exports
- @invarn/cibuild
- @invarn/cibuild/dist/cli.cjs
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 (@invarn/cibuild) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
cibuild
Lightweight CI/CD pipeline runner for Android and iOS projects. Define pipelines in YAML, run them locally or on a remote runner.
Install
npm install -g @invarn/cibuildThis installs two identical commands: ci and cibuild.
Getting Started
Option 1. Auto-create (recommended)
From your project root, let cibuild scan the project and generate a pipeline with recommended defaults:
ci init --createThis auto-detects the platform (iOS/Android), configures build settings, and collects secrets from disk — fully non-interactive, works with AI agents and scripts.
Option 2. Interactive wizard
Walk through prompts to configure your pipeline step by step:
ci initOption 3. Import existing pipeline
If you already have a pipeline YAML file:
ci init --import path/to/pipeline.ymlAll three methods scaffold the .ci/pipelines/ directory, validate dependencies, and set up .gitignore.
Customize
cibuild works best when you start with ci init --create and build on top of the generated pipeline. The full pipeline format, step catalog, and customization rules are in the spec.
Tell your AI coding agent:
Set up and customize CI/CD pipelines for this project using cibuild according to the following spec: https://github.com/invarnhq/cibuild/blob/main/SPEC.md
Run
ci run # Run the default pipeline
ci run .ci/pipelines/cibuild.yml -w release # Run a specific workflowCommands
| Command | Description |
|---|---|
ci init |
Interactive setup wizard |
ci init --create |
Auto-create pipeline (non-interactive) |
ci init --import <path> |
Import YAML pipeline (non-interactive) |
ci build |
Generate a standard pipeline for the current project |
ci run <path> [-w <name>] |
Run pipeline locally (development mode) |
ci run <path> [-w <name>] --production |
Run on remote runner (production) |
ci run <path> [-w <name>] --validate-only |
Validate only, don't execute |
ci run <path> [-w <name>] --skip-validation |
Skip validation, run with interactive prompts |
ci validate <path> [-w <name>] |
Validate pipeline (alias for --validate-only) |
ci detect-platform <path> [-w <name>] |
Detect platform from YAML pipeline |
ci edit <path> [-w <name>] |
View pipeline and edit step inputs |
ci secrets add <var> <path> [-w <name>] |
Add a secret (prompted interactively) |
ci secrets add <var> <path> --file <file> |
Add a secret from a file |
ci --help |
Show help |
Options
| Flag | Description |
|---|---|
-w, --workflow <name> |
Select a workflow (YAML pipelines only, defaults to first) |
--production |
Execute on remote runner after validation (vs local) |
--validate-only |
Run validation only, don't execute pipeline |
--skip-validation |
Skip pre-execution validation (for development) |
Secrets
Secrets are stored locally in .cibuild-secrets.json and never committed.
ci secrets add KEYSTORE_PASSWORD pipeline.yml
ci secrets add KEYSTORE_BASE64 pipeline.yml --file release.keystore
ci secrets add SLACK_WEBHOOK pipeline.yml -w releaseGitHub Actions
Use cibuild directly in your GitHub Actions workflows:
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: macos-latest
environment: cibuild
steps:
- uses: actions/checkout@v4
- uses: invarnhq/cibuild@v1
with:
workflow: releaseAction Inputs
| Input | Required | Default | Description |
|---|---|---|---|
pipeline |
No | Auto-discover | Path to pipeline YAML file |
workflow |
No | First workflow | Workflow name within the pipeline |
version |
No | latest |
cibuild version to install |
Secrets in GitHub Actions
Upload your local secrets to a GitHub Environment, then reference them in your workflow:
ci secrets upload --env cibuildjobs:
build:
runs-on: macos-latest
environment: cibuild
env:
CIBUILD_S__SLACK_WEBHOOK: ${{ secrets.CIBUILD_S__SLACK_WEBHOOK }}
CIBUILD_SW__RELEASE__KEYSTORE_PASS: ${{ secrets.CIBUILD_SW__RELEASE__KEYSTORE_PASS }}
steps:
- uses: actions/checkout@v4
- uses: invarnhq/cibuild@v1
with:
workflow: releaseThe action automatically maps GitHub context to cibuild environment variables (GIT_BRANCH, GIT_COMMIT, BUILD_NUMBER, BUILD_URL).
Requirements
- macOS or Linux (Node.js 18+ for npm install)
- Android projects: JDK, Android SDK
- iOS projects: macOS with Xcode (CocoaPods optional)
Run ci init from your project root to check all dependencies automatically.