Sparkling CLI
Sparkling CLI (sparkling-app-cli) is the built-in command-line tool that powers the development workflow. It handles building Lynx bundles, autolinking native method modules, running apps on Android/iOS, and diagnosing your environment.
Installation
The CLI is included automatically when you scaffold a project with create-sparkling-app. You can also install it manually:
Once installed, run commands via npx sparkling or through the npm scripts defined in your project's package.json.
Commands
sparkling build
Build Lynx bundles using your project's app.config.ts.
By default, asset copying is skipped for faster iteration during development. Use --copy when you need the bundles inside the native projects (e.g. for a release build).
sparkling copy-assets
Copy compiled bundles into Android and iOS resource directories.
sparkling autolink
Discover and link Sparkling method modules for Android and iOS. The CLI scans for module.config.json files in the workspace and node_modules, then updates Gradle/Podfile config and generates registry files.
What it does:
- Android — Updates
settings.gradle(.kts)andapp/build.gradle(.kts)with module includes/dependencies, and generatesSparklingAutolink.kt. - iOS — Updates the
Podfilewith pod entries and generatesSparklingAutolink.swift.
sparkling run:android
Build, autolink, and launch the Android debug build in one step.
This command will:
- Autolink method modules for Android
- Build the Lynx bundle
- Run
gradlew assembleDebug - Install the APK on a connected device/emulator
- Launch the main activity
sparkling run:ios
Build, autolink, and launch the iOS simulator build in one step.
This command will:
- Pick a simulator (prefers a booted device; falls back to common names like iPhone 17 Pro)
- Autolink method modules for iOS
- Run
pod install(unless--skip-pod-install) - Build the Lynx bundle
- Build, install, and launch the app on the simulator
You can also set the SPARKLING_IOS_SIMULATOR environment variable to specify a default simulator.
sparkling doctor
Verify that your development environment is properly set up.
The doctor command checks:
If any check fails, the output includes a hint on how to fix it.
Global Options
All commands support the following flag:
You can also set the SPARKLING_VERBOSE environment variable for the same effect.

