Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Compiler Flags

Complete reference for all Perry CLI flags.

Global Flags

Available on all commands:

FlagDescription
--format text|jsonOutput format (default: text)
-v, --verboseIncrease verbosity (repeatable: -v, -vv, -vvv)
-q, --quietSuppress non-error output
--no-colorDisable ANSI color codes

Compilation Targets

Use --target to cross-compile:

TargetPlatformNotes
(none)Current platformDefault behavior
ios-simulatoriOS SimulatorARM64 simulator binary
iosiOS DeviceARM64 device binary
androidAndroidARM64/ARMv7
ios-widgetiOS WidgetWidgetKit extension (requires --app-bundle-id)
ios-widget-simulatoriOS Widget (Sim)Widget for simulator
webWebOutputs HTML file with JS
windowsWindowsWin32 executable
linuxLinuxGTK4 executable

Output Types

Use --output-type to change what’s produced:

TypeDescription
executableStandalone binary (default)
dylibShared library (.dylib/.so) for plugins

Debug Flags

FlagDescription
--print-hirPrint HIR (intermediate representation) to stdout
--no-linkProduce .o object file only, skip linking
--keep-intermediatesKeep .o and .asm intermediate files

Runtime Flags

FlagDescription
--enable-js-runtimeEnable V8 JavaScript runtime for unsupported npm packages
--type-checkEnable type checking via tsgo IPC

Environment Variables

VariableDescription
PERRY_LICENSE_KEYPerry Hub license key for perry publish
PERRY_APPLE_CERTIFICATE_PASSWORDPassword for .p12 certificate
PERRY_NO_UPDATE_CHECK=1Disable automatic update checks
PERRY_UPDATE_SERVERCustom update server URL
CI=trueAuto-skip update checks (set by most CI systems)
RUST_LOGDebug logging level (debug, info, trace)

Configuration Files

perry.toml (project)

[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"

~/.perry/config.toml (global)

[apple]
team_id = "XXXXXXXXXX"
signing_identity = "Developer ID Application: Your Name"

[android]
keystore_path = "/path/to/keystore.jks"
key_alias = "my-key"

Examples

# 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

Next Steps