Skip to main content
Glama

The compression layer for AI agents on Apple

AI coding agents pay per token. Apple's API surfaces — App Intents, SwiftUI, WidgetKit — are verbose. A single widget requires a TimelineEntry, a TimelineProvider, an EntryView, and a Widget struct before you've written a line of business logic.

Axint compresses all of that. One TypeScript definition compiles to idiomatic, production-ready Swift with zero boilerplate. An intent compresses ~4×. A view compresses ~4×. A widget compresses 13×.

┌───────────────────────────────────────────┐
│  defineIntent()  defineView()             │  TypeScript / Python / JSON
│  defineWidget()  defineApp()              │
└───────────────────┬───────────────────────┘
                    │  axint compile
          ┌─────────┼─────────┐─────────┐
          ▼         ▼         ▼         ▼
     ┌────────┐ ┌───────┐ ┌────────┐ ┌──────┐
     │ .swift │ │ .swift│ │ .swift │ │.swift│
     │ .plist │ │       │ │        │ │      │
     │ .entl. │ │       │ │        │ │      │
     └────────┘ └───────┘ └────────┘ └──────┘
     App Intent  SwiftUI   WidgetKit   App
     for Siri    View      Widget      Scaffold

Related MCP server: xcode-mcp

Why Axint

  • Four Apple surfaces, one compiler. App Intents, SwiftUI views, WidgetKit widgets, and full app scaffolds all compile from the same pipeline.

  • Real TypeScript AST parser. Uses the TypeScript compiler API (same as tsc), not regex. Full type fidelity and diagnostics with line/column spans.

  • MCP-native with JSON schema mode. Thirteen tools exposed to any MCP client. The axint.schema.compile tool accepts minimal JSON (~20 tokens) and returns compiled Swift — AI agents skip TypeScript entirely and save even more tokens.

  • Native type fidelity. int → Int, double → Double, date → Date, url → URL, duration → Measurement<UnitDuration>. Default values and optionality preserved end-to-end.

  • 150 diagnostic codes (AX000AX999) with fix suggestions and color-coded output. Intent, entity, view, widget, app, Swift concurrency, and Live Activities validators each have dedicated error ranges.

  • Sub-millisecond compile. The axint.ai playground runs the full compiler in-browser with zero server round-trip.

  • 500 tests. Parser, validator, generator, emit paths, views, widgets, apps, watch mode, sandbox, MCP, Swift concurrency, and Live Activities — all covered.

  • Cross-language IR. The intermediate representation is language-agnostic JSON. TypeScript, Python, and raw JSON all feed into the same generator. New language frontends plug in without touching the Swift emitter.

  • Apache 2.0, no CLA. Fork it, extend it, ship it.


Quick start

npm install -g @axint/compiler

# Or run without installing
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 of them:

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/

Watch mode

For iterative development, axint watch recompiles on every save:

axint watch ./intents/ --out ios/Intents/ --emit-info-plist --emit-entitlements
axint watch my-intent.ts --out ios/Intents/ --format --swift-build

150ms debounce, inline errors, and optional swift build after each successful compile.


MCP server

Axint ships with axint-mcp, a Model Context Protocol server for Claude Desktop, Claude Code, Cursor, Windsurf, and any MCP client.

{
  "mcpServers": {
    "axint": {
      "command": "axint-mcp",
      "args": []
    }
  }
}

Thirteen tools (dotted names — legacy underscore aliases still work):

Tool

What it does

axint.feature

Generate a complete feature package from a description

axint.suggest

Suggest Apple-native features for a given domain

axint.scaffold

Generate a starter TypeScript intent from a description

axint.compile

Full pipeline: TypeScript → Swift + plist + entitlements

axint.validate

Dry-run validation with diagnostics

axint.schema.compile

Minimal JSON → Swift (token-saving mode for AI agents)

axint.swift.validate

Validate existing Swift against Axint's build-time rules

axint.swift.fix

Auto-fix mechanical Swift errors (concurrency, Live Activities)

axint.templates.list

List bundled reference templates

axint.templates.get

Return the source of a specific template

axint.quick-start

Get a quick-start guide for Axint

axint.create-intent

Create a new intent from parameters

axint.create-widget

Create a new widget from parameters

The schema mode is the key optimization for agents — instead of generating TypeScript and then compiling, agents send ~20 tokens of JSON and get compiled Swift back directly.


Diagnostics

150 diagnostic codes across eight validators:

Range

Domain

AX000AX023

Compiler / Parser

AX100AX113

Intent

AX200AX202

Swift output

AX300AX322

View

AX400AX422

Widget

AX500AX522

App

AX700AX749

Swift build rules

AX720AX735

Swift 6 concurrency

AX740AX749

Live Activities

error[AX100]: Intent name "sendMessage" must be PascalCase
  --> src/intents/messaging.ts:5:9
   = help: rename to "SendMessage"

See docs/ERRORS.md for the full reference.


Supported type mappings

TypeScript

Swift

Default value support

string

String

int

Int

double

Double

float

Float

boolean

Bool

date

Date

duration

Measurement<UnitDuration>

✓ (e.g. "1h")

url

URL

optional<T>

T?


Try it in your browser

No install required: axint.ai/#playground runs the entire compiler in-browser with zero server round-trip.


Requirements

  • Node.js 22+

  • Any OS: macOS, Linux, Windows

  • Xcode 15+ (only to ship the generated Swift to an Apple platform)


Project structure

axint/
├── src/
│   ├── core/        # Parser, validator, generator, compiler, types, IR
│   ├── sdk/         # defineIntent(), defineView(), defineWidget(), param/prop/state/entry helpers
│   ├── mcp/         # MCP server (13 tools including JSON schema mode)
│   ├── cli/         # axint CLI (compile, watch, validate, eject, init, xcode)
│   └── templates/   # Intent template registry (25 templates)
├── python/          # Python SDK with native Swift codegen
├── extensions/      # Claude Code, Codex, Cursor, Windsurf, Zed, JetBrains, Xcode
├── spm-plugin/      # Xcode SPM build plugin
├── tools/           # swift-syntax helper binary (POC)
├── tests/           # 500 vitest tests
├── examples/        # Example definitions
└── docs/            # Error reference, research, assets

Contributing

We review PRs within 48 hours. Good places to start:

  • Browse good first issue issues

  • Add a template for a common use case

  • Improve diagnostics with better fix suggestions

See CONTRIBUTING.md. Apache 2.0, no CLA.


Roadmap

See ROADMAP.md. Highlights:

  • Four compilation targets: intents, views, widgets, apps

  • MCP server with JSON schema mode (6 tools)

  • 91 diagnostic codes with fix suggestions

  • --watch mode with --swift-build

  • VS Code / Cursor extension

  • Python SDK with native Swift codegen

  • SPM build plugin for Xcode + Xcode project plugin

  • axint eject for zero-dependency Swift output

  • Cross-language IR bridge (TS, Python, JSON)

  • defineApp() — full app scaffold compilation

  • defineExtension() — app extension compilation

  • Axint Cloud (hosted compilation)


License

Apache 2.0 — fork it, extend it, ship it. No CLA.


Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/agenticempire/axint'

If you have feedback or need assistance with the MCP directory API, please join our Discord server