axint
Apple向けAIエージェントのための圧縮レイヤー
AIコーディングエージェントはトークン単位でコストが発生します。AppleのAPIサーフェス(App Intents、SwiftUI、WidgetKit)は冗長です。1つのウィジェットを作成するだけでも、ビジネスロジックを書く前にTimelineEntry、TimelineProvider、EntryView、Widget構造体が必要です。
Axintはこれらすべてを圧縮します。1つのTypeScript定義から、ボイラープレートなしで慣用的かつ本番環境対応のSwiftをコンパイルします。インテントは約4倍、ビューは約4倍、ウィジェットは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 ScaffoldRelated MCP server: xcode-mcp
Axintを選ぶ理由
4つのAppleサーフェスを1つのコンパイラで。 App Intents、SwiftUIビュー、WidgetKitウィジェット、フルアプリのスキャフォールディングをすべて同じパイプラインからコンパイルします。
本物のTypeScript ASTパーサー。 正規表現ではなく、TypeScriptコンパイラAPI(
tscと同じ)を使用。行/列スパンを含む完全な型忠実度と診断機能を備えています。JSONスキーマモード対応のMCPネイティブ。 13個のツールをあらゆるMCPクライアントに公開。
axint.schema.compileツールは最小限のJSON(約20トークン)を受け取り、コンパイル済みのSwiftを返します。AIエージェントはTypeScriptを完全にスキップして、さらにトークンを節約できます。ネイティブな型忠実度。
int → Int、double → Double、date → Date、url → URL、duration → Measurement<UnitDuration>。デフォルト値とオプショナル性はエンドツーエンドで保持されます。150個の診断コード(
AX000–AX999)。修正案と色分けされた出力を提供。インテント、エンティティ、ビュー、ウィジェット、アプリ、Swift並行処理、Live Activitiesの各バリデーターには専用のエラー範囲があります。サブミリ秒のコンパイル。 axint.aiプレイグラウンドでは、サーバーとの往復なしでブラウザ内でコンパイラ全体が動作します。
500個のテスト。 パーサー、バリデーター、ジェネレーター、出力パス、ビュー、ウィジェット、アプリ、ウォッチモード、サンドボックス、MCP、Swift並行処理、Live Activitiesをすべて網羅しています。
言語横断的なIR。 中間表現は言語に依存しないJSONです。TypeScript、Python、生のJSONのすべてが同じジェネレーターに入力されます。新しい言語フロントエンドは、Swiftエミッターに触れることなくプラグイン可能です。
Apache 2.0、CLAなし。 フォークして拡張し、リリースしてください。
クイックスタート
npm install -g @axint/compiler
# Or run without installing
npx @axint/compiler compile my-intent.ts --stdoutインテント
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 }),
},
});ビュー
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")]),
]),
],
});ウィジェット
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"),
]),
],
});アプリ
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"),
},
});これらをコンパイルするには:
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/ウォッチモード
反復的な開発のために、axint watchは保存のたびに再コンパイルを行います:
axint watch ./intents/ --out ios/Intents/ --emit-info-plist --emit-entitlements
axint watch my-intent.ts --out ios/Intents/ --format --swift-build150msのデバウンス、インラインエラー表示、および各コンパイル成功後のオプションのswift build実行が可能です。
MCPサーバー
Axintには、Claude Desktop、Claude Code、Cursor、Windsurf、およびあらゆるMCPクライアント向けのModel Context Protocolサーバーであるaxint-mcpが同梱されています。
{
"mcpServers": {
"axint": {
"command": "axint-mcp",
"args": []
}
}
}13個のツール(ドット表記 — レガシーなアンダースコアエイリアスも引き続き動作します):
ツール | 説明 |
| 説明から完全な機能パッケージを生成 |
| 指定されたドメインに対するAppleネイティブな機能を提案 |
| 説明からスターター用のTypeScriptインテントを生成 |
| フルパイプライン:TypeScript → Swift + plist + entitlements |
| 診断付きのドライラン検証 |
| 最小限のJSON → Swift(AIエージェント向けのトークン節約モード) |
| Axintのビルド時ルールに基づいて既存のSwiftを検証 |
| 機械的なSwiftエラー(並行処理、Live Activities)を自動修正 |
| バンドルされているリファレンステンプレートを一覧表示 |
| 特定のテンプレートのソースを返す |
| Axintのクイックスタートガイドを取得 |
| パラメータから新しいインテントを作成 |
| パラメータから新しいウィジェットを作成 |
スキーマモードはエージェントにとって重要な最適化です。TypeScriptを生成してからコンパイルする代わりに、エージェントは約20トークンのJSONを送信するだけで、コンパイル済みのSwiftを直接受け取ることができます。
診断
8つのバリデーターにわたる150個の診断コード:
範囲 | ドメイン |
| コンパイラ / パーサー |
| インテント |
| Swift出力 |
| ビュー |
| ウィジェット |
| アプリ |
| Swiftビルドルール |
| Swift 6 並行処理 |
| Live Activities |
error[AX100]: Intent name "sendMessage" must be PascalCase
--> src/intents/messaging.ts:5:9
= help: rename to "SendMessage"完全なリファレンスについてはdocs/ERRORS.mdを参照してください。
サポートされている型マッピング
TypeScript | Swift | デフォルト値のサポート |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| ✓ |
|
| — |
|
| ✓ (例: |
|
| — |
|
| ✓ |
ブラウザで試す
インストール不要:axint.ai/#playground では、サーバーとの往復なしでブラウザ内でコンパイラ全体が動作します。
要件
Node.js 22+
OS不問:macOS、Linux、Windows
Xcode 15+(生成されたSwiftをAppleプラットフォームに出荷する場合のみ)
プロジェクト構造
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コントリビューション
PRは48時間以内にレビューします。まずは以下から始めてみてください:
good first issueラベルの付いたIssueを確認する一般的なユースケースのテンプレートを追加する
より良い修正案で診断機能を改善する
CONTRIBUTING.mdを参照してください。Apache 2.0、CLAなし。
ロードマップ
ROADMAP.mdを参照してください。ハイライト:
[x] 4つのコンパイルターゲット:インテント、ビュー、ウィジェット、アプリ
[x] JSONスキーマモードを備えたMCPサーバー(6ツール)
[x] 修正案付きの91個の診断コード
[x]
--swift-buildを備えた--watchモード[x] VS Code / Cursor拡張機能
[x] ネイティブSwiftコード生成を備えたPython SDK
[x] Xcode用SPMビルドプラグイン + Xcodeプロジェクトプラグイン
[x] 依存関係ゼロのSwift出力のための
axint eject[x] 言語横断的なIRブリッジ(TS、Python、JSON)
[x]
defineApp()— フルアプリのスキャフォールディングコンパイル[ ]
defineExtension()— アプリ拡張機能のコンパイル[ ] Axint Cloud(ホスト型コンパイル)
ライセンス
Apache 2.0 — フォークして拡張し、リリースしてください。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