axint.schema.compile
Compile minimal JSON schema directly to Swift source code with token usage stats. Supports intents, views, components, widgets, and apps using ~20 input tokens. No files written or network requests.
Instructions
Compile a minimal JSON schema directly to Swift, bypassing the TypeScript DSL entirely. Supports intents, views, components, widgets, and full apps via the 'type' parameter. Uses ~20 input tokens vs hundreds for TypeScript — ideal for LLM agents optimizing token budgets. Returns Swift source with token usage stats; no files written, no network requests. On invalid input, returns an error message describing the issue. Use: use for token-light JSON-to-Swift generation; use compile for full TypeScript DSL control and scaffold for TS starters. Effects: read-only Swift generation; writes no files and uses no network.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | View/widget only. | |
| name | Yes | PascalCase name, e.g., 'CreateEvent' for intents, 'EventListView' for views, 'StepsWidget' for widgets. Used as the Swift struct name. | |
| type | Yes | What to compile. | |
| entry | No | Widget only. Timeline entry fields as { fieldName: typeString }. | |
| props | No | View only. Prop definitions as { fieldName: typeString }. | |
| state | No | View only. | |
| title | No | Human-readable title shown in Shortcuts/Spotlight. Intent only. | |
| domain | No | Apple App Intent domain. Intent only. | |
| format | No | When true (default), pipes generated Swift through swift-format with Axint's. | |
| params | No | Intent only. Parameter definitions as { fieldName: typeString }. | |
| scenes | No | App only. Scene definitions for the @main App struct. | |
| families | No | Widget only. | |
| platform | No | Optional target Apple platform hint for view/widget generation. | |
| description | No | Description of what this intent/view/widget does. | |
| displayName | No | Widget only. Human-readable name shown in the widget gallery. | |
| componentKind | No | Component only. Optional known component shape. | |
| tokenNamespace | No | Optional Swift token enum generated by axint.tokens.ingest, e.g., 'SwarmTokens'. | |
| refreshInterval | No | Widget only. Timeline refresh interval in minutes. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | ||
| isError | No |