@keel-ai/cli
v0.1.0
Published
Keel — China-friendly React Native platform CLI
Readme
@keel-ai/cli
The Keel command-line interface. Apache 2.0.
npm install -g @keel-ai/cli
keel --helpCommands
| Command | What it does |
|---|---|
| keel doctor | Diagnose env (Node / Java / Xcode / Android SDK) + show resolved config |
| keel start | Run local Metro dev server, paired with Keel Go for live preview |
| keel build <ios\|android> [--output=<dir>] | Trigger Keel Build (Cloud Build server) to compile your project |
| keel publish <bundle> --platform <p> --version <v> | Upload a bundle to OTA + promote to current |
| keel rollback <hash> --platform <p> | Rotate current pointer to a previously-uploaded hash |
| keel manifest --platform <p> [--current-hash <h>] | Query OTA manifest (debug) |
| keel install <pkg> | RN-aware npm install with module-allowlist / version checks |
| keel submit <ios\|android> --to=<driver>[,<driver>...] | Auto-submit to App Store / Play / 国内 5 大 Android markets |
| keel dev-client <ios\|android> [--output=<dir>] | Build a project-specific tester app with custom native modules |
| keel login [--ci] | Persist API key to ~/.keel/credentials.yml (--ci reads KEEL_API_KEY env) |
| keel logout | Remove the stored API key |
Use keel <command> --help for full flag list.
Scaffolding (separate packages)
@keel-ai/cli is for daily project work (start / build / publish /
submit / etc.). Scaffolding lives in two standalone packages that
follow the npm create-<x> convention (same shape as Expo's
create-expo-app + create-expo-module):
npm create keel-app my-app # see packages/create-keel-app/
npm create keel-module keel-module-foo # see packages/create-keel-module/Note: there's a
keel deploystub reserved for V2 web hosting — Keel currently does not do web deployment; seedocs/architecture.md.
Configuration
Three layers, last-wins:
keel.jsonin project (or any parent dir) — see schema below- Env vars:
KEEL_PROJECT,KEEL_UPDATE_ENDPOINT,KEEL_API_KEY,KEEL_RUNTIME_VERSION,KEEL_CHANNEL - Command-line flags (
--project,--endpoint,--api-key, etc.)
{
"project": "my-app",
"endpoint": {
"ota": "https://api.keel.appunvs.com",
"cloud_build": "https://api.keel.appunvs.com"
},
"api_key": "keel_live_...",
"runtime_version": "1.0",
"channel": "production",
"platforms": ["ios", "android"]
}End-to-end smoke test against the Update server
Terminal 1:
cd keel
go run ./cmd/update-server -listen :8081 -blob-root /tmp/keel-bundlesTerminal 2:
cd keel/cli
npm install
npm run build
# Make a fake bundle file
echo "fake bundle bytes" > /tmp/bundle.zip
# Publish
./bin/keel.js publish /tmp/bundle.zip \
--project myproj \
--platform ios \
--version v1.0.0 \
--endpoint http://localhost:8081
# Verify manifest
./bin/keel.js manifest \
--project myproj \
--platform ios \
--endpoint http://localhost:8081Build + test
npm install # one-time
npm run build # tsc → dist/
npm test # node:test against src/Apache 2.0
See /keel/LICENSE.
