Skip to main content

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:
aixyz dev
  • Spawns a Bun worker process
  • Watches app/ and aixyz.config.ts for changes
  • Automatically restarts with a 100ms debounce
  • Serves at http://localhost:3000 by default

aixyz build

Bundles your agent for production:
aixyz build

Build Pipeline

The build command (packages/aixyz-cli/build/index.ts) runs through these steps:
  1. Config loading — Reads aixyz.config.ts via @aixyz/config
  2. Build plugins — Applies two Bun build plugins:
    • AixyzConfigPlugin — Materializes resolved config into the bundle, replacing all aixyz/config imports so the config file is not needed at runtime
    • AixyzServerPlugin — If no app/server.ts exists, auto-generates a server entry that wires up A2A, MCP, and x402 based on app/agent.ts and app/tools/*.ts
  3. Bundling — Runs Bun.build() targeting Node.js

Output Formats

FormatTriggerOutput
StandaloneDefault.aixyz/output/server.js
VercelVERCEL=1 or --output vercel.vercel/output/ (Build Output API v3)

Next Steps