Complete reference for all Perry CLI flags.
Available on all commands:
| Flag | Description |
--format text|json | Output format (default: text) |
-v, --verbose | Increase verbosity (repeatable: -v, -vv, -vvv) |
-q, --quiet | Suppress non-error output |
--no-color | Disable ANSI color codes |
Use --target to cross-compile:
| Target | Platform | Notes |
| (none) | Current platform | Default behavior |
ios-simulator | iOS Simulator | ARM64 simulator binary |
ios | iOS Device | ARM64 device binary |
android | Android | ARM64/ARMv7 |
ios-widget | iOS Widget | WidgetKit extension (requires --app-bundle-id) |
ios-widget-simulator | iOS Widget (Sim) | Widget for simulator |
web | Web | Outputs HTML file with JS |
windows | Windows | Win32 executable |
linux | Linux | GTK4 executable |
Use --output-type to change what’s produced:
| Type | Description |
executable | Standalone binary (default) |
dylib | Shared library (.dylib/.so) for plugins |
| Flag | Description |
--print-hir | Print HIR (intermediate representation) to stdout |
--no-link | Produce .o object file only, skip linking |
--keep-intermediates | Keep .o and .asm intermediate files |
| Flag | Description |
--enable-js-runtime | Enable V8 JavaScript runtime for unsupported npm packages |
--type-check | Enable type checking via tsgo IPC |
| Variable | Description |
PERRY_LICENSE_KEY | Perry Hub license key for perry publish |
PERRY_APPLE_CERTIFICATE_PASSWORD | Password for .p12 certificate |
PERRY_NO_UPDATE_CHECK=1 | Disable automatic update checks |
PERRY_UPDATE_SERVER | Custom update server URL |
CI=true | Auto-skip update checks (set by most CI systems) |
RUST_LOG | Debug logging level (debug, info, trace) |
[project]
name = "my-app"
entry = "src/main.ts"
version = "1.0.0"
[build]
out_dir = "build"
[app]
name = "My App"
description = "A Perry application"
[macos]
bundle_id = "com.example.myapp"
category = "public.app-category.developer-tools"
minimum_os = "13.0"
distribute = "notarize" # "appstore", "notarize", or "both"
[ios]
bundle_id = "com.example.myapp"
deployment_target = "16.0"
device_family = ["iphone", "ipad"]
[android]
package_name = "com.example.myapp"
min_sdk = 26
target_sdk = 34
[linux]
format = "appimage" # "appimage", "deb", "rpm"
category = "Development"
[apple]
team_id = "XXXXXXXXXX"
signing_identity = "Developer ID Application: Your Name"
[android]
keystore_path = "/path/to/keystore.jks"
key_alias = "my-key"
# Simple CLI program
perry main.ts -o app
# iOS app for simulator
perry app.ts -o app --target ios-simulator
# Web app
perry app.ts -o app --target web
# Plugin shared library
perry plugin.ts --output-type dylib -o plugin.dylib
# iOS widget with bundle ID
perry widget.ts --target ios-widget --app-bundle-id com.example.app
# Debug compilation
perry app.ts --print-hir 2>&1 | less
# Verbose compilation
perry compile app.ts -o app -vvv
# Type-checked compilation
perry app.ts -o app --type-check