CLI Tools Reference
JetPack provides two complementary binaries, both built together by make release-daemon and included in every release bundle (JetPack.app/Contents/MacOS/ on macOS, JetPack-windows-x64.zip on Windows, and JetPack-linux-x64.tar.gz on Linux):
jetpack(crates/jetpack-cli) — Standalone console developer CLI for scaffolding AI-ready two-environment projects, validating DevEnv/ProdEnv manifests, running the local MCP server (stdio), generating TypeScript opcode contracts, and driving local installs/packaging.jetpack-daemon(crates/jetpack-daemon) — Native system-tray orchestrator and catalog operator binary.
Console Developer CLI (jetpack)
jetpack init <target_dir> [--app-id <id>] [--dev-app-id <id>] [--template <python|fullstack>]
Scaffolds a ready-to-run two-environment JetPack project in <target_dir> with AI instructions (AGENTS.md, regular-file mirror CLAUDE.md, .cursor/rules/jetpack.mdc), Agent Skills (.agents/skills/create-jetpack-worker/SKILL.md, .agents/skills/add-binary-opcode/SKILL.md, .agents/skills/add-translations/SKILL.md, .agents/skills/debug-pairing/SKILL.md), DevEnv/ProdEnv manifests (app.toml, app.dev.toml, .env.development, .env.production), starter i18n (locales/en.json and createI18n in fullstack), and cross-platform npm scripts inside package.json. Refuses to overwrite an existing app.toml.
# Python worker starter (default)
jetpack init ./workers/my-ocr-worker --app-id com.acme.my-ocr-worker --template python
# Fullstack TypeScript (@jetpack-desktop/client) + Python worker starter with custom DevEnv ID
jetpack init ./apps/my-ai-app --app-id com.acme.my-ai-app --dev-app-id com.dev.my-ai-app --template fullstackjetpack env <init|check>
Manages DevEnv (app.dev.toml, .env.development) and ProdEnv (app.toml, .env.production) overlays without touching app.toml:
jetpack env init [path] [--dev-app-id <id>] [--prod-app-id <id>] [--force]— Generatesapp.dev.toml,.env.development, and.env.productionfor an existing project (refusing to overwrite existing files unless--forceis passed).jetpack env check [path]— Resolves and validates both ProdEnv (app.toml) and DevEnv (app.toml+app.dev.toml), checks.env.*alignment, and verifies that DevEnv and ProdEnv resolve to distinctpackage.idvalues to preventAPP_SPOOFING_DETECTED.
jetpack env init ./workers/my-ocr-worker
jetpack env check ./workers/my-ocr-workerjetpack i18n <init|add|check|sync>
Manages flat JSON translation catalogs (locales/*.json) in pure Rust with English (locales/en.json) as the canonical base catalog:
jetpack i18n init [path] [--locales-dir <dir>] [--force]— Creates starterlocales/en.json(defaults--locales-dirtolocales). Refuses to overwrite unless--forceis passed.jetpack i18n add <lang> [path] [--locales-dir <dir>] [--force]— Validates and normalizes<lang>to its lowercase ASCII primary BCP-47 subtag (e.g.uk-UA→uk, rejectingen, path traversal, and invalid tags) and creates or tops uplocales/<lang>.jsonfromlocales/en.json.jetpack i18n check [path] [--locales-dir <dir>] [--strict]— Validates valid flatRecord<string, string>JSON, non-emptyen.jsonvalues, orphan keys, and identical{placeholder}tokens across all secondary catalogs. Missing or empty keys in secondary locales emit warnings by default, or fail non-zero when--strictis passed.jetpack i18n sync [path] [--locales-dir <dir>] [--prune]— Synchronizes secondary<lang>.jsoncatalogs againsten.jsonin sorted key order, preserving existing non-empty translations and optionally removing orphan keys with--prune.
jetpack i18n init .
jetpack i18n add uk .
jetpack i18n check . --strict
jetpack i18n sync . --pruneUnified Developer npm Scripts (package.json)
Every project scaffolded by jetpack init or jetpack-daemon --init-app (both python and fullstack templates) includes a cross-platform package.json runnable identically on macOS, Linux, and Windows (cmd.exe / PowerShell):
| Script | Underlying Command | Purpose |
|---|---|---|
npm run sdk:install | Cross-platform uv sync (or pip install -e .) + npm install (in fullstack) | Install Python and TypeScript SDK dependencies. |
npm run sdk:update | uv sync --upgrade-package jetpack-sdk + npm update @jetpack-desktop/client (in fullstack) | Upgrade JetPack worker and frontend SDKs. |
npm run validate | jetpack validate --env dev | Validate merged DevEnv (app.toml + app.dev.toml). |
npm run validate:prod | jetpack validate --env prod | Validate strict ProdEnv (app.toml only). |
npm run env:check | jetpack env check | Verify DevEnv/ProdEnv parity and non-colliding package.id. |
npm run i18n:check | jetpack i18n check . | Validate locales/en.json and secondary translation catalogs. |
npm run i18n:sync | jetpack i18n sync . | Synchronize missing keys cleanly across locales/*.json. |
npm run codegen | jetpack codegen --worker worker.py --out ... | Generate strict JetPackOpcodeMap TypeScript contracts. |
npm run typecheck | tsc --noEmit (fullstack template) | Type-check frontend TypeScript against JetPackOpcodeMap. |
npm run install:local | jetpack install-local . --env dev | Install DevEnv worker into local user-space CAS without spoofing collisions. |
npm run dev | jetpack validate --env dev && jetpack install-local . --env dev (+ typecheck in fullstack) | Validate and refresh local DevEnv install during iteration. |
npm run build | jetpack validate --env prod (+ typecheck in fullstack) | Verify production manifest and types before packaging. |
npm run package | jetpack validate --env prod && jetpack package . --out dist/oci | Build ProdEnv OCI Image Layout v1.0.0 bundle (stripping app.dev.toml and .env*). |
jetpack mcp
Starts the local Model Context Protocol (MCP) server (rmcp) over stdio transport (stdin/stdout JSON-RPC, all tracing diagnostics directed to stderr). Bridges AI coding agents with embedded/local documentation (JETPACK_DOCS_DIR override supported) and token-authenticated jetpack-daemon introspection (pairing.ipc).
Exposes 5 tools:
search_docs(query, max_results?)— Searches embedded/local JetPack SDK, security, andapp.tomldocs.get_daemon_status()— Checks daemon health, version,127.0.0.1WebSocket reachability, paired origins, and running workers.read_worker_logs(app_id, lines?)— Tails live or offlineworker.log/daemon.loglines and crash tracebacks with sensitive token/key redaction.validate_manifest(path, env?)— Validatesapp.tomlagainstAppManifest(env = "prod", default) or mergesapp.dev.toml(env = "dev"), returningenv, optionaldev_overlay_path,models,services,volumes,runtimes,gpu_access, andmodel_cache.scaffold_app(target_dir, app_id?, dev_app_id?, template?)— Scaffolds a two-environmentpythonorfullstackproject with DevEnv/ProdEnv files,package.jsonscripts, AI rules, and Agent Skills.
jetpack codegen [--worker <path>] [--out <path>] [--strict]
Parses Python worker source files or directories in pure Rust (rustpython-parser, zero Python runtime required) to extract Pydantic BaseModel, TypedDict, @dataclass, @opcode(...) / client.opcode(...) handlers, and if opcode == ... / match branches into a strict TypeScript declaration file (jetpack-env.d.ts exporting JetPackOpcodeMap):
jetpack codegen --worker worker.py --out src/jetpack-env.d.ts --strict--worker <path>: Python file or directory to inspect (defaults toworker.py).--out <path>: Output TypeScript.d.tsfile path (defaults tojetpack-env.d.ts).--strict: Exit non-zero if zero opcodes are discovered.
jetpack validate [path] [--env <prod|dev>]
Validates app.toml (defaults to app.toml in the current directory, or <dir>/app.toml when a directory path is passed) using #[serde(deny_unknown_fields)] and semantic security checks. Pass --env dev to merge and validate app.dev.toml (default is prod):
jetpack validate ./workers/my-ocr-worker --env dev
jetpack validate ./workers/my-ocr-worker/app.toml --env prodjetpack install-local [path] [--env <dev|prod>]
Delegates to jetpack-daemon --install-local-app <path> --env <dev|prod> to package and install a local developer worker (including any built ui/ static directory) directly into <root>/blobs/sha256/ and <root>/apps/<app-id>/<version>/ in unverified developer mode (is_verified = false, restricted to 127.0.0.1 / localhost). Defaults path to . and automatically selects dev when app.dev.toml is present (unless --env prod is explicitly passed).
jetpack package [path] --out <bundle_dir> [--oci-ref <ref>] [--env <prod|dev>]
Delegates to jetpack-daemon --package-app to package a validated project—alongside its built ui/ static frontend (ui/index.html, ui/assets/*) if present—into an OCI Image Layout v1.0.0 bundle (defaults to --env prod; automatically excluding app.dev.toml, .env, .env.*, AGENTS.md, CLAUDE.md, .cursor/, .agents/, jetpack-env.d.ts, node_modules/, target/, .git/, .venv/, __pycache__/, symlinks, and secret files). Defaults path to ..
Daemon Developer & Publisher Flags (jetpack-daemon)
--init-app <target_dir>
Scaffolds a ready-to-run starter Python worker project in <target_dir> using the same shared template builder as jetpack init (including app.toml, app.dev.toml, .env.development, .env.production, package.json developer scripts, AGENTS.md, CLAUDE.md, .cursor/rules/jetpack.mdc, and .agents/skills/, refusing to overwrite an existing app.toml):
jetpack-daemon --init-app ./workers/my-ocr-workerCreates:
app.toml— Validated ProdEnv starter manifest.app.dev.toml— Strict DevEnv partial overlay using a non-officialcom.dev.<slug>ID (com.dev.my-ocr-worker-dev)..env.developmentand.env.production— Frontend environment defaults (VITE_JETPACK_ENV,VITE_JETPACK_APP_ID,VITE_JETPACK_DAEMON_PORT).package.json— Cross-platform unified developernpmscripts (validate,env:check,install:local,dev,package,sdk:install,sdk:update).worker.py— Executable (0755on Unix) Python worker usingjetpack_sdk.JetPackClient.pyproject.toml— Project metadata (requires-python = ">=3.12",jetpack-sdkdependency).README.md— Project-specific validation, DevEnv/ProdEnv, local install, and packaging commands.AGENTS.md,CLAUDE.md,.cursor/rules/jetpack.mdc, and.agents/skills/*— AI agent instructions and workflows (automatically excluded from OCI packaging).
--validate-manifest <path> [--env <prod|dev>]
Parses app.toml (and merges sibling app.dev.toml when --env dev is passed) with #[serde(deny_unknown_fields)] and runs all semantic and security checks:
jetpack-daemon --validate-manifest ./workers/my-ocr-worker/app.toml --env dev--install-local-app <source_dir> [--env <dev|prod>]
Validates, packages, and installs a local developer worker (plus any ui/ bundle) directly into <root>/blobs/sha256/ and <root>/apps/<app-id>/<version>/ in unverified developer mode (is_verified = false):
jetpack-daemon --install-local-app ./workers/my-ocr-worker --env dev- Automatically uses DevEnv (
app.dev.toml, falling back toderive_dev_app_id) whenapp.dev.tomlexists or--env devis passed, preventingAPP_SPOOFING_DETECTEDcollisions against already-publishedSignedAppCatalogapps. - Still strictly blocks official
SignedAppCatalogIDs (APP_SPOOFING_DETECTED) whenever the effective ID matches the signed catalog. - Displays the app with an
UNVERIFIED / LOCAL DEVbadge in Control Center, automatically discovers<root>/apps/<app-id>/<version>/ui/index.htmlfor/apps/<app-id>/, and restricts WebSocket origins to127.0.0.1/localhost.
--package-app <source_dir> --out <bundle_dir> [--oci-ref <ref>] [--env <prod|dev>]
Packages a validated worker directory (including optional ui/ static assets served dynamically at /apps/<app-id>/) into an ORAS-compatible OCI Image Layout v1.0.0 directory (index.json with org.opencontainers.image.ref.name, defaulting to --env prod) and prints manifest_sha256, the oras cp --from-oci-layout push command, oras manifest fetch --descriptor digest check, and a CatalogAppEntry JSON snippet (including computed install_size_bytes, install_size_approximate, and mapped models disclosures from app.toml):
jetpack-daemon \
--package-app ./workers/my-ocr-worker \
--out ./dist/my-ocr-worker-oci \
--oci-ref ghcr.io/your-org/my-ocr-worker:0.1.0 \
--env prodAutomatically strips app.dev.toml, .env, .env.*, *.key, *.pem, *.secret, jetpack-root-signing*, node_modules/, target/, .git/, .venv/, __pycache__/, and symlinks so local development overrides, build caches, secrets, and unsafe links cannot leak into published layers.
Catalog Operator Commands
--generate-catalog-keypair --out-priv <path>
Generates an Ed25519 root keypair using OsRng:
jetpack-daemon --generate-catalog-keypair --out-priv ~/.secrets/jetpack-root-signing.key- Writes the 32-byte seed (64 lowercase hex characters) atomically (
create_new(true)) with mode0600on Unix. - Prints only the public key hex and the Rust
CATALOG_VERIFY_PUBKEYliteral to stdout.
--sign-catalog <catalog_json_path> [--key <priv_key_path>]
Canonicalizes SignedAppCatalog, signs it with Ed25519 (reading --key or JETPACK_SIGNING_KEY), writes ed25519_signature atomically, and immediately re-verifies the file from disk:
jetpack-daemon --sign-catalog crates/jetpack-daemon/assets/catalog.signed.json --key ~/.secrets/jetpack-root-signing.keyRuntime, Inspection & Diagnostic Flags
| Flag | Purpose |
|---|---|
--version, -V | Print the compiled jetpack-daemon semantic version and exit cleanly. |
--headless | Run jetpack-daemon without a desktop system tray icon (CI / server). |
--seed-core-apps | Package and pre-install curated core workers from examples/ (e.g., slim release bundle examples/ffmpeg-media-converter, excluding .venv, __pycache__, tests, and media files) into CAS and <root>/apps/. |
--export-diagnostics [--out <path>] | Collect a sanitized .zip diagnostic bundle (diagnostics.json + redacted daemon.log tail) and write it to <path> or <root>/logs/jetpack-diagnostics-<timestamp>.zip. |
--print-hardware-profile | Probe CPU topology, RAM/unified memory, and GPUs (NVML, Vulkan, DX12, Metal). |
--list-paired-clients | List approved origins and client UUIDs stored in paired_clients.db. |
--list-installed-apps | Scan <root>/apps/ and print discovered manifests and versions. |
--register-uri-scheme | Register jetpack:// and corenode:// custom URL schemes in user space. |
--generate-test-pair-uri | Print a deterministic test jetpack://pair URI and SHA-256 fingerprint. |
--test-ws-client | Connect to a running daemon (127.0.0.1:9470) to verify PNA, handshake, and system.echo (supports --send-json and --origin). |
--ws-smoke-test | Run offline end-to-end WebSocket security and hardware.get_profile smoke test. |
--oci-smoke-test | Run offline OCI CAS, SHA-256 verification, and hardlink/APFS clone smoke test. |
--oci-remote-smoke-test <ref> [--expected-digest <sha256:...>] | Pull a live public OCI reference (such as ghcr.io/...), verify manifest + blob SHA-256 digests, and safely unpack into an isolated temporary CAS root. |
--python-smoke-test | Run offline hermetic uv + python-build-standalone provisioner smoke test. |
--sandbox-smoke-test | Run offline OS native kernel sandbox (AppContainer / Seatbelt / bwrap+Landlock) smoke test. |
--worker-ipc-smoke-test | Run offline sandboxed worker IPC, userspace proxy, and lifecycle cleanup smoke test. |
--full-e2e-smoke-test | Run the full end-to-end orchestrator, sandbox, GPU worker, and WebSocket integration test. |
--background | Hidden internal flag omitted from --help; passed by OS autostart entries (LaunchAgents, HKCU\...\Run, XDG .desktop) to suppress auto-opening the Control Center window at OS login. |
--cleanup-old-binary <path> | Hidden internal post-update flag spawned by the self-updater; validates a .old suffix and removes the previous binary or .app.old bundle asynchronously (10 × 200ms retries). |
