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 @axint/compiler 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/sdk";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 @axint/compiler compile intents/SendMessage.intent.ts \--out ios/Intents/SendMessageIntent.swift \--sandbox \--formatTerminal window npx @axint/compiler 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 — 12 diagnostic rules checked the IR 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) staged 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
- Install → — deeper install options and pinning
- MCP setup → — plug Axint into Claude Code, Cursor, or Windsurf
- Templates → — ten battle-tested starter intents
- Python SDK → — author intents in Python instead