axint
Open-source TypeScript/Python β Swift compiler for Apple platforms. AI agents write 5β15Γ less code to generate App Intents, SwiftUI views, WidgetKit widgets, and full apps. MCP server with 6 tools for scaffolding, compiling, validating, and browsing templates.
Ask AI about axint
Powered by Claude Β· Grounded in docs
I know everything about axint. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
Β
Axint turns TypeScript and Python into validated Swift for Apple-native features.
Open-source compiler for App Intents, SwiftUI views, WidgetKit widgets, and full apps.
Compact definitions in, validated Swift out.
Website Β· Playground Β· Quick Start Β· MCP Server Β· Docs Β· Registry
Why Axint
Apple's API surfaces β App Intents, SwiftUI, WidgetKit β are verbose. A single widget needs a TimelineEntry, a TimelineProvider, an EntryView, and a Widget struct before you've written a line of business logic. AI coding agents pay per token, and all that boilerplate adds up fast.
Axint compresses it. One defineIntent() call replaces 50β200 lines of Swift. One defineWidget() replaces an entire WidgetKit stack. The compiler handles the struct conformances, the @Parameter wrappers, the LocalizedStringResource literals β everything an agent would otherwise have to generate token by token.
Four surfaces, one pipeline:
defineIntent() β App Intent for Siri & Shortcuts
defineView() β SwiftUI view
defineWidget() β WidgetKit widget
defineApp() β Full app scaffold
The result: teams and AI tools can author Apple-native features in a much smaller surface than hand-written Swift, then validate and ship ordinary generated Swift.
Quick start
npm install -g @axint/compiler
# compile a single file
axint compile my-intent.ts --out ios/Intents/
# or pipe to stdout
npx @axint/compiler compile my-intent.ts --stdout
Intent
import { defineIntent, param } from "@axint/compiler";
export default defineIntent({
name: "CreateEvent",
title: "Create Calendar Event",
description: "Creates a new event in the user's calendar.",
domain: "productivity",
params: {
title: param.string("Event title"),
date: param.date("Event date"),
duration: param.duration("Event duration", { default: "1h" }),
location: param.string("Location", { required: false }),
},
});
View
import { defineView, prop, state, view } from "@axint/compiler";
export default defineView({
name: "EventCard",
props: {
title: prop.string(),
date: prop.date(),
},
state: {
isExpanded: state.boolean(false),
},
body: [
view.vstack({ alignment: "leading", spacing: 8 }, [
view.text("entry.title"),
view.conditional("isExpanded", [view.text("entry.date")]),
]),
],
});
Widget
import { defineWidget, entry, view } from "@axint/compiler";
export default defineWidget({
name: "EventCountdown",
displayName: "Event Countdown",
description: "Shows time until the next event.",
families: ["systemSmall", "systemMedium"],
entry: {
eventName: entry.string("Untitled"),
minutesUntil: entry.int(0),
},
body: [
view.vstack({ alignment: "center", spacing: 4 }, [
view.text("entry.eventName"),
view.text("entry.minutesUntil"),
]),
],
});
App
import { defineApp, scene, storage } from "@axint/compiler";
export default defineApp({
name: "WeatherApp",
scenes: [
scene.windowGroup("WeatherDashboard"),
scene.settings("SettingsView", { platform: "macOS" }),
],
appStorage: {
useCelsius: storage.boolean("use_celsius", true),
lastCity: storage.string("last_city", "Cupertino"),
},
});
Compile any surface the same way:
axint compile my-intent.ts --out ios/Intents/
axint compile my-view.ts --out ios/Views/
axint compile my-widget.ts --out ios/Widgets/
axint compile my-app.ts --out ios/App/
Public truth
v0.3.9 Β· 11 MCP tools + 3 prompts Β· 160 diagnostic codes Β· 967 tests Β· 8 live packages Β· 26 bundled templates Public proof is generated from `../public-truth/public-truth.json` via `npm --prefix .. run truth:sync`.If release numbers, diagnostics, package counts, or MCP surfaces change, update the canonical truth layer and re-run the sync instead of editing proof values by hand.
Watch mode
Recompiles on every save with 150ms debounce, inline errors, and optional swift build after each successful compile:
axint watch ./intents/ --out ios/Intents/ --emit-info-plist --emit-entitlements
axint watch my-intent.ts --out ios/Intents/ --format --swift-build
MCP server
Axint ships an MCP server for Claude Desktop, Claude Code, Cursor, Codex, VS Code, Windsurf, Xcode, and any MCP client. ```json{ "mcpServers": { "axint": { "command": "npx", "args": [ "-y", "@axint/compiler", "axint-mcp" ] } } }
MCP tools and built-in prompts:
| Tool | What it does |
| --- | --- |
| `axint.compile` | Full pipeline: TypeScript β Swift + plist + entitlements |
| `axint.schema.compile` | Minimal JSON β Swift (token-saving mode for agents) |
| `axint.validate` | Dry-run validation with diagnostics |
| `axint.feature` | Generate a complete feature package from a description |
| `axint.suggest` | Suggest Apple-native features for a domain |
| `axint.scaffold` | Generate a starter TypeScript intent from a description |
| `axint.swift.validate` | Validate existing Swift against build-time rules |
| `axint.swift.fix` | Auto-fix mechanical Swift errors (concurrency, Live Activities) |
| `axint.fix-packet` | Read the latest AI-ready repair packet from a local compile or watch run |
| `axint.templates.list` | List bundled reference templates |
| `axint.templates.get` | Return the source of a specific template |
Built-in prompts:
| Prompt | What it does |
| --- | --- |
| `axint.quick-start` | Get a quick-start guide |
| `axint.create-intent` | Start a new intent from guided parameters |
| `axint.create-widget` | Start a new widget from guided parameters |
`axint.schema.compile` is the key optimization β agents send ~20 tokens of JSON and get compiled Swift back directly, skipping TypeScript entirely.
<!-- truth:readme-discovery-links:start -->Need a working repo instead of a raw snippet? Browse **[axint-examples](https://github.com/agenticempire/axint-examples)**. Still seeing older package names like `@axintai/compiler`? Use the current package identity: `@axint/compiler`.<!-- truth:readme-discovery-links:end -->
---
## Diagnostics
Diagnostic codes across the validator surface with fix suggestions and color-coded output:
| Range | Domain |
| --- | --- |
| `AX000`β`AX023` | Compiler / Parser |
| `AX100`β`AX113` | Intent |
| `AX200`β`AX202` | Swift output |
| `AX300`β`AX322` | View |
| `AX400`β`AX422` | Widget |
| `AX500`β`AX522` | App |
| `AX700`β`AX749` | Swift build rules |
| `AX720`β`AX735` | Swift 6 concurrency |
| `AX740`β`AX749` | Live Activities |
error[AX100]: Intent name "sendMessage" must be PascalCase --> src/intents/messaging.ts:5:9 = help: rename to "SendMessage"
Full reference: [`docs/ERRORS.md`](docs/ERRORS.md)
---
## Type mappings
| TypeScript | Swift | Default value |
| --- | --- | --- |
| `string` | `String` | β |
| `int` | `Int` | β |
| `double` | `Double` | β |
| `float` | `Float` | β |
| `boolean` | `Bool` | β |
| `date` | `Date` | β |
| `duration` | `Measurement<UnitDuration>` | β (`"1h"`) |
| `url` | `URL` | β |
| `optional<T>` | `T?` | β |
---
## Playground
No install required β [axint.ai/#playground](https://axint.ai/#playground) runs the same compiler in a server-backed playground, returning Swift live without a local install.
---
## Editor extensions
Extensions for [Claude Code](extensions/claude-code), [Claude Desktop](extensions/claude-desktop), [Codex](extensions/codex), [VS Code / Cursor](extensions/vscode), [Windsurf](extensions/windsurf), [JetBrains](extensions/jetbrains), [Neovim](extensions/neovim), and [Xcode](extensions/xcode).
---
## Project structure
axint/ βββ src/ β βββ core/ # Parser, validator, generator, compiler, IR β βββ sdk/ # defineIntent(), defineView(), defineWidget(), defineApp() β βββ mcp/ # MCP server and prompt surface β βββ cli/ # CLI (compile, watch, validate, eject, init, xcode) β βββ templates/ # Bundled reference templates βββ python/ # Python SDK βββ extensions/ # Editor extensions (9 editors) βββ spm-plugin/ # Xcode SPM build plugin βββ tests/ # Compiler, CLI, SDK, MCP, and Python coverage βββ examples/ # Example definitions βββ docs/ # Error reference, assets
---
## What's next
Current priorities β full roadmap in [`ROADMAP.md`](ROADMAP.md):
- `defineExtension()` β app extension compilation
- `IntentDialog` + richer Apple parameter types
- `swift-format` integration for generated output
---
## Contributing
PRs reviewed within 48 hours. Browse [`good first issue`](https://github.com/agenticempire/axint/issues?q=is%3Aissue+label%3A%22good+first+issue%22) to get started, or see [`CONTRIBUTING.md`](CONTRIBUTING.md).
Apache 2.0, no CLA.
---
## Requirements
- Node.js 22+
- Any OS (macOS, Linux, Windows)
- Xcode 15+ to ship the generated Swift
---
## License
[Apache 2.0](LICENSE) β fork it, extend it, ship it.
---
