Skip to main content
Glama

Die Komprimierungsschicht für KI-Agenten auf Apple

KI-Coding-Agenten zahlen pro Token. Apples API-Oberflächen — App Intents, SwiftUI, WidgetKit — sind wortreich. Ein einzelnes Widget erfordert einen TimelineEntry, einen TimelineProvider, eine EntryView und eine Widget-Struktur, bevor man auch nur eine Zeile Geschäftslogik geschrieben hat.

Axint komprimiert all das. Eine TypeScript-Definition wird zu idiomatischem, produktionsreifem Swift ohne Boilerplate kompiliert. Ein Intent wird um ca. 4× komprimiert. Eine View um ca. 4×. Ein Widget wird um 13× komprimiert.

┌───────────────────────────────────────────┐
│  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

Warum Axint

  • Vier Apple-Oberflächen, ein Compiler. App Intents, SwiftUI-Views, WidgetKit-Widgets und vollständige App-Gerüste werden alle über dieselbe Pipeline kompiliert.

  • Echter TypeScript-AST-Parser. Verwendet die TypeScript-Compiler-API (wie tsc), nicht Regex. Volle Typentreue und Diagnosen mit Zeilen-/Spaltenangaben.

  • MCP-nativ mit JSON-Schema-Modus. Dreizehn Tools für jeden MCP-Client verfügbar. Das Tool axint.schema.compile akzeptiert minimales JSON (~20 Token) und gibt kompiliertes Swift zurück — KI-Agenten überspringen TypeScript komplett und sparen noch mehr Token.

  • Native Typentreue. int → Int, double → Double, date → Date, url → URL, duration → Measurement. Standardwerte und Optionalität bleiben durchgehend erhalten.

  • 150 Diagnose-Codes (AX000AX999) mit Korrekturvorschlägen und farbcodierter Ausgabe. Intent-, Entity-, View-, Widget-, App-, Swift-Concurrency- und Live-Activities-Validatoren haben jeweils dedizierte Fehlerbereiche.

  • Sub-Millisekunden-Kompilierung. Der axint.ai Playground führt den vollständigen Compiler im Browser ohne Server-Roundtrip aus.

  • 500 Tests. Parser, Validator, Generator, Emit-Pfade, Views, Widgets, Apps, Watch-Modus, Sandbox, MCP, Swift-Concurrency und Live Activities — alles abgedeckt.

  • Sprachübergreifende IR. Die Zwischenrepräsentation ist sprachunabhängiges JSON. TypeScript, Python und rohes JSON fließen alle in denselben Generator ein. Neue Sprach-Frontends lassen sich integrieren, ohne den Swift-Emitter zu berühren.

  • Apache 2.0, kein CLA. Forken, erweitern, veröffentlichen.


Schnellstart

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"),
  },
});

Kompilieren Sie eines davon:

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-Modus

Für iterative Entwicklung kompiliert axint watch bei jedem Speichern neu:

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-Fehler und optionales swift build nach jeder erfolgreichen Kompilierung.


MCP-Server

Axint wird mit axint-mcp ausgeliefert, einem Model Context Protocol-Server für Claude Desktop, Claude Code, Cursor, Windsurf und jeden MCP-Client.

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

Dreizehn Tools (Punkt-Notation — Legacy-Unterstrich-Aliase funktionieren weiterhin):

Tool

Funktion

axint.feature

Generiert ein vollständiges Feature-Paket aus einer Beschreibung

axint.suggest

Schlägt Apple-native Features für eine gegebene Domäne vor

axint.scaffold

Generiert einen Starter-TypeScript-Intent aus einer Beschreibung

axint.compile

Vollständige Pipeline: TypeScript → Swift + plist + Entitlements

axint.validate

Trockenlauf-Validierung mit Diagnosen

axint.schema.compile

Minimales JSON → Swift (Token-Sparmodus für KI-Agenten)

axint.swift.validate

Validiert bestehendes Swift gegen Axints Build-Time-Regeln

axint.swift.fix

Automatische Korrektur mechanischer Swift-Fehler (Concurrency, Live Activities)

axint.templates.list

Listet gebündelte Referenzvorlagen auf

axint.templates.get

Gibt den Quellcode einer spezifischen Vorlage zurück

axint.quick-start

Ruft einen Schnellstart-Guide für Axint ab

axint.create-intent

Erstellt einen neuen Intent aus Parametern

axint.create-widget

Erstellt ein neues Widget aus Parametern

Der Schema-Modus ist die wichtigste Optimierung für Agenten — anstatt TypeScript zu generieren und dann zu kompilieren, senden Agenten ca. 20 Token JSON und erhalten direkt kompiliertes Swift zurück.


Diagnosen

150 Diagnose-Codes über acht Validatoren hinweg:

Bereich

Domäne

AX000

AX023

Compiler / Parser

AX100

AX113

Intent

AX200

AX202

Swift-Ausgabe

AX300

AX322

View

AX400

AX422

Widget

AX500

AX522

App

AX700

AX749

Swift-Build-Regeln

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"

Siehe docs/ERRORS.md für die vollständige Referenz.


Unterstützte Typ-Mappings

TypeScript

Swift

Standardwert-Unterstützung

string

String

int

Int

double

Double

float

Float

boolean

Bool

date

Date

duration

Measurement

✓ (z. B.

"1h"

)

url

URL

optional

T?


Im Browser ausprobieren

Keine Installation erforderlich: axint.ai/#playground führt den gesamten Compiler im Browser ohne Server-Roundtrip aus.


Anforderungen

  • Node.js 22+

  • Beliebiges OS: macOS, Linux, Windows

  • Xcode 15+ (nur um das generierte Swift auf einer Apple-Plattform auszuliefern)


Projektstruktur

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

Mitwirken

Wir prüfen PRs innerhalb von 48 Stunden. Gute Einstiegspunkte:

  • Durchsuchen Sie good first issue Issues

  • Fügen Sie eine Vorlage für einen häufigen Anwendungsfall hinzu

  • Verbessern Sie Diagnosen mit besseren Korrekturvorschlägen

Siehe CONTRIBUTING.md. Apache 2.0, kein CLA.


Roadmap

Siehe ROADMAP.md. Highlights:

  • [x] Vier Kompilierungsziele: Intents, Views, Widgets, Apps

  • [x] MCP-Server mit JSON-Schema-Modus (6 Tools)

  • [x] 91 Diagnose-Codes mit Korrekturvorschlägen

  • [x] --watch-Modus mit --swift-build

  • [x] VS Code / Cursor-Erweiterung

  • [x] Python SDK mit nativem Swift-Codegen

  • [x] SPM-Build-Plugin für Xcode + Xcode-Projekt-Plugin

  • [x] axint eject für Swift-Ausgabe ohne Abhängigkeiten

  • [x] Sprachübergreifende IR-Brücke (TS, Python, JSON)

  • [x] defineApp() — vollständige App-Gerüst-Kompilierung

  • [ ] defineExtension() — App-Extension-Kompilierung

  • [ ] Axint Cloud (gehostete Kompilierung)


Lizenz

Apache 2.0 — forken, erweitern, veröffentlichen. Kein 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