Skip to content

CLI Command Reference

This content is for v1.2.0. Switch to the latest version for up-to-date documentation.

The zkite CLI is your single tool for project creation, live development, standalone execution, diagnostics, key generation, and production builds.

zkite --version and zkite --help work globally without requiring an existing project or connected phone.


Scaffolds a new project with main.py, app.json, assets/, zkite.tailwind.json, and .gitignore. New projects generated in ZKite 1.1.2 feature an interactive orange-and-white Discover/Playground interface with swipeable tabs instead of a basic counter.

Terminal window
# Create a new directory and scaffold files
zkite new myapp
# Or scaffold into the current working directory
zkite new myapp .
  • Existing scaffold paths are never overwritten.
  • Unrelated files in the target directory are preserved.
  • Creating or upgrading the framework does not overwrite existing application source code.

Prepares and installs a project preview, connects to the selected device, and watches supported source changes and dependency declarations for instant hot reload. In ZKite 1.1.2, editing dependencies in requirements.txt or pyproject.toml automatically synchronizes packages live without restarting dev.

Terminal window
zkite dev [OPTIONS]
Option Argument Description
--serial SERIAL Explicitly choose target device by serial number.
--adb PATH Custom path to the adb executable.
--port NUMBER Local host development bridge port (default: 8765).
--backend native Explicitly select native rendering backend.
--devshell-apk PATH Advanced custom-shell APK override (usually unnecessary).

Scans Python source and synchronizes permissions in app.json, builds a standalone APK for the selected device architecture, verifies manifest permissions inside the compiled APK, installs it, and launches it. Uses the project’s .zkite/debug.pem development signing identity.

Terminal window
zkite run [OPTIONS]
Option Argument Description
--serial SERIAL Target device serial number.
--adb PATH Custom path to adb.
--backend native Select native rendering backend.
--keystore PATH Override automatic signing identity with an existing combined PEM file.
--no-prune-stdlib (None) Include the full Python standard library without pruning.
--logs (None) Continue streaming Android logcat output in terminal following launch.

Statically synchronizes inferred permissions in app.json, builds application artifacts, and verifies compiled manifest permissions (AndroidManifest.xml in APKs and base/manifest/AndroidManifest.xml in AABs) using an internal Rust validator before saving output. A connected phone is not required. APK output is per-architecture; an AAB bundles selected architectures together.

Both commands automatically discover and reuse keystore/release.pem. If no default key exists, the build creates the PEM/PKCS#12 pair under keystore/.

Terminal window
# Build per-architecture APK with automatic permission scan and manifest check
zkite build apk --abi arm64-v8a --out dist/
# Build multi-architecture Android App Bundle for Google Play
zkite build aab --abi arm64-v8a --abi x86_64
Option Argument Description
--abi arm64-v8a | x86_64 Include specified architecture. Repeat --abi to select both. Defaults to all supported prebuilt ABIs if omitted.
--keystore PATH Override automatic release-key discovery with an explicit combined PEM file.
--out DIRECTORY Output directory (default: dist/).
--no-prune-stdlib (None) Disable Python standard library pruning.
--backend native Select native rendering backend.

Checks local toolchains, selected Python interpreter, bundled native runtime payloads, and device connections.

Terminal window
zkite doctor [--adb PATH]

Generates release signing keys. In ZKite 1.1.2, it creates keystore/release.pem and keystore/release.p12 by default, automatically generating the keystore/ directory and its Git ignore rule. Existing key files are never overwritten.

Terminal window
# Default key generation under keystore/
zkite keygen --cn "My company"
# Explicit output basename and password
zkite keygen --out keystore/custom_key --cn "My company" --password secret
Option Argument Description
--out BASENAME Output file base name (default: keystore/release).
--cn NAME Certificate common name / organization identifier.
--password PASSWORD Password for the PKCS#12 keystore.