Compiling to Swift
axint compile is the workhorse command. It runs the full four-stage pipeline
(Parse → Validate → Generate → Sandbox) and writes Swift to disk.
Basic usage
Section titled “Basic usage”axint compile intents/SendMessage.intent.tsWrites SendMessageIntent.swift next to the source file. To control the
output location:
axint compile intents/SendMessage.intent.ts \ --out ios/Intents/SendMessageIntent.swift| Flag | What it does |
|---|---|
--out <path> |
Explicit output path for the Swift file |
--target <ios17|ios18|ios26|macos14|macos15|macos26> |
Apple OS target for codegen |
--sandbox |
Stage-4 validation: drop the Swift into an SPM sandbox and run swift build (macOS only) |
--format |
Pipe the generated Swift through swift-format with the Axint house style |
--strict-format |
Fail the build if swift-format is missing (implies --format) |
--emit-info-plist |
Write a <Name>.plist.fragment.xml next to the Swift file |
--emit-entitlements |
Write a <Name>.entitlements.fragment.xml next to the Swift file |
--json |
Machine-readable output (for CI and MCP) |
Output example
Section titled “Output example”$ axint compile intents/SendMessage.intent.ts --sandbox --format
✓ parsed (2ms)✓ validated (<1ms, 0 warnings)✓ generated (3ms)✓ formatted (48ms)✓ sandbox-compiled (1.2s, warm cache)
Wrote ios/Intents/SendMessageIntent.swiftIf a stage fails, Axint prints a Rust-style diagnostic with the source line and a suggested fix, then exits non-zero.