PyxlePyxle/Docs

CLI Reference

The pyxle CLI manages Pyxle projects from scaffolding to production.

Global options

Flag Description
--version Print Pyxle version and exit
--log-format [console|json] Output format (default: console)
--verbose / -v Show debug-level output
--quiet / -q Suppress informational output; show only warnings and errors

pyxle init

Create a new Pyxle project.

pyxle init <name> [options]
Argument / Flag Description
name Project directory name (required)
--force / -f Overwrite existing directory
--template / -t Template name (default: "default")
--install / --no-install Run pip install and npm install after scaffolding (default: no)

Examples:

pyxle init my-app
pyxle init my-app --force --install

pyxle install

Install Python and Node.js dependencies.

pyxle install [directory] [options]
Argument / Flag Default Description
directory . Project directory
--python / --no-python true Install Python deps via pip
--node / --no-node true Install Node deps via npm

Examples:

pyxle install
pyxle install --no-python    # Node only
pyxle install ./my-app

pyxle dev

Start the development server with hot reload.

pyxle dev [directory] [options]
Argument / Flag Default Description
directory . Project directory
--host 127.0.0.1 Starlette server bind address
--port 8000 Starlette server port
--vite-host 127.0.0.1 Vite dev server bind address
--vite-port 5173 Vite dev server port
--debug / --no-debug true Enable debug mode
--ssr-workers 1 Number of persistent SSR worker processes (0 = subprocess mode)
--config -- Path to pyxle.config.json
--print-config / --no-print-config false Print merged configuration before starting
--tailwind / --no-tailwind true Auto-start Tailwind CSS watcher

Examples:

pyxle dev
pyxle dev --host 0.0.0.0 --port 3000
pyxle dev --no-tailwind --ssr-workers 4
pyxle dev ./my-app --print-config

What it does:

  1. Loads configuration from pyxle.config.json + environment variables + CLI flags
  2. Compiles .pyxl files into Python and JSX modules
  3. Starts the Vite dev server for React hot reload
  4. Starts the Tailwind watcher (if detected)
  5. Starts the Starlette ASGI server
  6. Watches for file changes and recompiles automatically

pyxle build

Build production-ready assets.

pyxle build [directory] [options]
Argument / Flag Default Description
directory . Project directory
--config -- Path to pyxle.config.json
--out-dir dist/ Output directory for build artifacts
--incremental / --no-incremental false Reuse cached artifacts

Examples:

pyxle build
pyxle build --out-dir ./output --incremental

pyxle serve

Serve a production build (without Vite).

pyxle serve [directory] [options]
Argument / Flag Default Description
directory . Project directory
--host 127.0.0.1 Bind address
--port 8000 Port number
--dist-dir dist/ Directory with production artifacts
--skip-build / --no-skip-build false Skip running build first
--config -- Path to pyxle.config.json
--serve-static / --no-serve-static true Serve static assets directly from Pyxle
--ssr-workers 1 Number of persistent SSR worker processes

Examples:

pyxle serve
pyxle serve --host 0.0.0.0 --port 8000 --skip-build
pyxle serve --ssr-workers 4

pyxle check

Validate .pyxl syntax, configuration, and dependencies.

pyxle check [directory] [options]
Argument / Flag Default Description
directory . Project directory
--config -- Path to pyxle.config.json

Example output:

  Compiling pages/index.pyxl
  Compiling pages/about.pyxl
  2 pages compiled, 0 errors

Errors are reported with file location and hints:

  error: @server function must be async
    --> pages/index.pyxl:15:1
    hint: Change 'def load_page' to 'async def load_page'

pyxle typecheck

Run TypeScript type-checking on compiled JSX output.

pyxle typecheck [directory] [options]

Requires typescript in your devDependencies. Runs tsc --noEmit against the compiled JSX in .pyxle-build/client/.

Argument / Flag Default Description
directory . Project directory
--config -- Path to pyxle.config.json

pyxle routes

Display the route table for your project.

pyxle routes [directory] [options]
Argument / Flag Default Description
directory . Project directory
--config -- Path to pyxle.config.json
--json false Output as JSON

Example output:

Route              File                      Loader
/                  pages/index.pyxl           load_home
/about             pages/about.pyxl           --
/blog/{slug}       pages/blog/[slug].pyxl     load_post
/api/pulse         pages/api/pulse.py        --