Quickstart
This quickstart takes you from zero to a working, compile-verified App Intent in about five minutes.
Prerequisites
- Node.js 22 or newer
- (Optional) Xcode 16 with the Swift toolchain — required for sandbox validation and
--format. Everything else works cross-platform.
-
Scaffold a new project.
Terminal window npx -y -p @axint/compiler axint init my-intentscd my-intentsYou now have a ready-to-go project with a starter intent, a pre-wired
.vscode/mcp.json, and anios/Intents/output directory. -
Open the starter intent.
intents/SendMessage.intent.ts import { defineIntent, param } from "@axint/compiler";export default defineIntent({name: "SendMessageIntent",title: "Send Message",description: "Sends a message to a contact.",domain: "messaging",params: {recipient: param.string("Who to send the message to"),body: param.string("What to say"),},}); -
Compile to Swift.
Terminal window npx -y -p @axint/compiler axint compile intents/SendMessage.intent.ts \--out ios/Intents/SendMessageIntent.swift \--sandbox \--formatTerminal window npx -y -p @axint/compiler axint compile intents/SendMessage.intent.ts \--out ios/Intents/SendMessageIntent.swiftSandbox + format require the Swift toolchain, which isn’t available off macOS — skip those flags.
-
Check the output.
ios/Intents/SendMessageIntent.swift import AppIntentsimport Foundationstruct SendMessageIntent: AppIntent {static var title: LocalizedStringResource = "Send Message"static var description = IntentDescription("Sends a message to a contact.")@Parameter(title: "Who to send the message to")var recipient: String@Parameter(title: "What to say")var body: Stringfunc perform() async throws -> some IntentResult {// TODO: wire to your messaging layerreturn .result()}} -
Drop it into Xcode. Add
ios/Intents/SendMessageIntent.swiftto your iOS target. Siri, Shortcuts, and Spotlight will pick it up automatically.
What just happened
Under the hood, Axint ran a four-stage pipeline:
- Parse — the TypeScript AST walker extracted your
defineIntent()call into an Intermediate Representation (IR). - Validate — Axint runs a broad diagnostic pass against Apple’s App Intents constraints and your entitlement requirements.
- Generate — the codegen layer emitted idiomatic Swift, complete with
@Parameterattributes and aperform()stub. - Sandbox-compile — (
--sandbox) dropped the Swift into a throwaway SPM project and ranswift buildto prove it actually compiles under the real toolchain. Cold run: ~4s. Warm run: ~1.2s.
Next steps
move from docs to workflow
Next steps after your first compile
Once the Swift file exists, the next decision is not more theory. Decide whether you need the local compiler loop, a Cloud check result, public examples, or package-level compatibility details.
- Install → — deeper install options and pinning
- Xcode happy path → — the simplest build → check → fix → rerun loop
- Fix Packets → — how the AI repair contract works
- MCP setup → — plug Axint into Claude Code, Cursor, or Windsurf
- Templates → — starter templates and reusable examples
- Python SDK → — author intents in Python instead
- Benchmarks → — public token-compression benchmarks and methodology
- Registry compatibility status → — public package compatibility coverage