Overview
The@aixyz/cli package provides the aixyz CLI used for local development and production builds. It is typically invoked via bun run dev and bun run build scripts in your project’s package.json.
Commands
aixyz dev
Starts a development server with hot reload:
- Spawns a Bun worker process
- Watches
app/andaixyz.config.tsfor changes - Automatically restarts with a 100ms debounce
- Serves at
http://localhost:3000by default
aixyz build
Bundles your agent for production:
Build Pipeline
The build command (packages/aixyz-cli/build/index.ts) runs through these steps:
- Config loading — Reads
aixyz.config.tsvia@aixyz/config - Build plugins — Applies two Bun build plugins:
AixyzConfigPlugin— Materializes resolved config into the bundle, replacing allaixyz/configimports so the config file is not needed at runtimeAixyzServerPlugin— If noapp/server.tsexists, auto-generates a server entry that wires up A2A, MCP, and x402 based onapp/agent.tsandapp/tools/*.ts
- Bundling — Runs
Bun.build()targeting Node.js
Output Formats
| Format | Trigger | Output |
|---|---|---|
| Standalone | Default | .aixyz/output/server.js |
| Vercel | VERCEL=1 or --output vercel | .vercel/output/ (Build Output API v3) |