Commands
The CLI lives in the SDK repo root as ./xg-glass.
Bare-file quick mode (recommended first try)
Run a single Kotlin file by letting the CLI generate a temporary project:
./xg-glass run /path/to/MyEntry.kt
Constraints:
- the
.ktfile must contain apackage ...line - the file must contain a top-level
class/object(used to infer the entry class)
Optional:
--entry-class <fqcn>: override inference--sdk <path/to/sdk-repo>: override SDK path--save ./myapp: persist the generated project--keep-tmp: keep the temporary directory for debugging--sim: generate project for simulation and run on local Android emulator
Project workflow (stable)
xg-glass init <dir>
Create a minimal developer project from the template (./templates/kotlin-app).
Common options:
--sdk <path>: SDK repo root (default: current repo)--template <path>: template directory--entry-class <fqcn>: entry class to write into config/manifest--sim: create project for simulation
Example:
./xg-glass init ./myapp
xg-glass build
Build the phone-side APK.
Common options:
--project <dir>: project root (default: current directory)--config <path>: config path (default:xg-glass.yaml)--variant <name>: build variant (default:debug)--module <name>: app module name (default:app)--entry-class <fqcn>: overrideentryClass--sdk <path>: overridesdkPath--rayneo-aar-dir <path>: override RayNeo vendor AAR directory
Example:
../xg-glass build
xg-glass install
Install the phone-side APK via ADB.
Common options:
--serial <id>: adb device serial (optional)--apk <path>: explicit APK path (optional)
Example:
../xg-glass install
xg-glass run
Launch the phone-side app via ADB (monkey).
Common options:
--serial <id>: adb device serial (optional)--package <applicationId>: override applicationId (optional)
Example:
../xg-glass run