Create a typed, tested, zero-build PraisonAIUI plugin package in one command with aiui plugins init, and keep your editor's @aiui/sdk declarations in sync with aiui plugins types.
aiui plugins init
@aiui/sdk
aiui plugins types
See UI Plugins for the overall architecture and entry-point contract.
aiui plugins init validates the entry-point slug ([a-z0-9][a-z0-9_-]*, rejecting path separators), refuses to overwrite non-empty folders unless --force is passed, and creates a complete, immediately runnable package:
[a-z0-9][a-z0-9_-]*
--force
| Option | Default | Description |
|---|---|---|
| NAME | required | Entry-point slug (e.g. sales-ops or aiui-code) |
NAME
sales-ops
aiui-code
| --dir, -d | current directory | Parent folder where aiui-<name>/ is created |
--dir, -d
aiui-<name>/
| --title, -t | derived from NAME | Human-readable title for the page and README |
--title, -t
| --force, -f | off | Overwrite files if the target directory is non-empty |
--force, -f
@aiui/sdk is provided at runtime by the shell's import map (/_aiui/externals/@aiui-sdk.js), so there is no separate npm package to install. Every aiui wheel bundles the exact matching aiui-sdk.d.ts.
/_aiui/externals/@aiui-sdk.js
aiui
aiui-sdk.d.ts
After upgrading aiui, refresh your plugin's declarations in one command:
| --out, -o | ./aiui-sdk.d.ts | Target file or directory (writes <dir>/aiui-sdk.d.ts when given a directory) |
--out, -o
./aiui-sdk.d.ts
<dir>/aiui-sdk.d.ts
| --stdout | off | Print aiui-sdk.d.ts to stdout instead of writing a file |
--stdout
| --force, -f | off | Overwrite an existing file whose contents differ |
For zero-build ESM plugins, include types/aiui-sdk.d.ts in jsconfig.json:
types/aiui-sdk.d.ts
jsconfig.json
For TypeScript + Vite plugins, include types/aiui-sdk.d.ts in tsconfig.json and mark all 5 shell externals (react, react/jsx-runtime, react-dom, react-dom/client, @aiui/sdk) as Rollup external so your plugin shares the shell's single React instance.
tsconfig.json
react
react/jsx-runtime
react-dom
react-dom/client
external
praisonaiui ships a py.typed marker and lazy TYPE_CHECKING stubs in src/praisonaiui/__init__.py while keeping cold import praisonaiui under 20 ms. Downstream plugins get full type checking in mypy, pyright, and Pylance:
praisonaiui
py.typed
TYPE_CHECKING
src/praisonaiui/__init__.py
import praisonaiui
mypy
pyright