@kaiba-cloud/cli
v0.1.0
Published
Kaiba CLI — build and deploy your apps from CI or a terminal.
Readme
@kaiba-cloud/cli
Build and deploy your apps to Kaiba from CI or a terminal.
Auth
The CLI authenticates with a scoped deploy token — a kaiba_deploy_ token an
org admin mints in the Kaiba console (Environments → Deploy tokens). A deploy
token grants only build and/or deploy. It is NOT an org admin key. Store it
as a CI secret and pass it as KAIBA_API_TOKEN.
The hub URL defaults to https://cloud.kaiba.ai; override it with KAIBA_HUB_URL
or --hub-url.
CLI
kaiba build --repo <url> --branch <ref> --image <name> [--tag <sha>] [--deploy-service <svc>]
kaiba deploy --service <name> --image <ref>
kaiba statusbuildstarts a git-mode build on your cluster and streams status until it succeeds or fails. It builds a pushed git ref. Add--deploy-serviceto roll the resulting image to that service in one step.deployretargets one compose service to an image and waits for it to run.statusprints each service and its live state.
GitHub Action
jobs:
ship:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ai-kaiba/kaiba-action@v1
with:
command: build
repo: ${{ github.server_url }}/${{ github.repository }}
branch: ${{ github.sha }}
image: web
tag: ${{ github.sha }}
service: web # chains a deploy after the build
api-token: ${{ secrets.KAIBA_API_TOKEN }}Publishing (maintainers)
Published manually — no CI token to rotate. From the repo root:
# 1. bump "version" in packages/kaiba-cli/package.json
# 2. build + publish (publish runs the build via prepublishOnly)
cd packages/kaiba-cli
npm login # once per machine; prompts for 2FA
npm publish # access:public is set in package.json; prompts for an OTPNotes:
npm publishuses your interactive npm login, so no long-lived token is stored.- npm refuses to republish an existing version — always bump first.
- The published tarball contains only
dist/,action.yml, and this README.
The composite Action runs the compiled CLI, so dist/ must be built. npm publish
builds it automatically via prepublishOnly; to build without publishing:
pnpm --filter @kaiba-cloud/cli build