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 --installpyxle 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-apppyxle 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-configWhat it does:
- Loads configuration from
pyxle.config.json+ environment variables + CLI flags - Compiles
.pyxlfiles into Python and JSX modules - Starts the Vite dev server for React hot reload
- Starts the Tailwind watcher (if detected)
- Starts the Starlette ASGI server
- 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 --incrementalpyxle 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 4pyxle 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 errorsErrors 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 --