Python SDK
The Python SDK exists because a massive population of Shortcuts-adjacent developers write Python all day and shouldn’t have to learn TypeScript just to ship an App Intent.
Install
pip install axintRequires Python 3.11 or newer. No runtime dependencies — the parser walks the
stdlib ast module and never executes your code, which means axint parse
is deterministic, sandboxable, and safe to run on untrusted input.
Hello, intent
from axint import define_intent, param
create_event = define_intent( name="CreateCalendarEventIntent", title="Create Calendar Event", description="Creates a new event on the user's calendar.", domain="productivity", params={ "event_title": param.string("Title of the event"), "start_date": param.date("When the event starts"), "duration_minutes": param.int("Length of the event in minutes"), "is_all_day": param.boolean( "Whether the event is all-day", optional=True, default=False ), }, entitlements=["com.apple.developer.calendars"], info_plist_keys=["NSCalendarsUsageDescription"],)Compile it
axint parse intents/create_event.py # print the IRaxint parse intents/create_event.py --json # IR as JSONaxint compile intents/create_event.py # IR → Swift (via @axint/compiler)axint compile shells out to @axint/compiler under the hood, so the
Swift output is byte-identical to what you’d get from writing the same
intent in TypeScript. One source of truth for the Swift generator means one
thing to break.
Why stdlib only?
The parser is built on Python’s stdlib ast module. No libcst, no
typed_ast, no third-party runtime deps at all. That’s a deliberate choice:
- Faster install —
pip install axintis a few kilobytes. - Deterministic — the parser never runs your code, so a malicious or broken intent file can’t execute arbitrary Python.
- Sandboxable — you can run
axint parseinside a tiny Docker image with no network access.
Parity with TypeScript
| Feature | TypeScript | Python |
|---|---|---|
define_intent / defineIntent | ✅ | ✅ |
param.string/int/double/... | ✅ | ✅ |
entitlements, info_plist_keys | ✅ | ✅ |
is_discoverable | ✅ | ✅ |
| Multi-intent files | ✅ | ✅ (parse) |
| Swift codegen | ✅ | ⚠️ via TS |
| Return-type inference | ✅ | 🟡 v0.3.0 |
| MCP server | ✅ | 🟡 v0.3.0 |