Pulse

CLI

pulse command line

pulse run

Run the Pulse server and web development server together.

pulse run <app_file> [options]

Arguments

ArgumentDescription
app_fileApp target: path/to/app.py[:var] (default :app) or module.path:var

Options

OptionTypeDefaultDescription
--addressstrlocalhostHost uvicorn binds to
--portint8000Port uvicorn binds to
--devflag-Run in development mode (default)
--prodflag-Run in production mode
--plainflag-Plain output without colors or emojis
--server-onlyflag-Run only the Python server
--web-onlyflag-Run only the web dev server
--react-server-addressstr-React server URL (required for single-server + server-only)
--reload/--no-reloadflagautoEnable/disable hot reload (auto-enabled in dev)
--find-port/--no-find-portflagTrueAuto-find available port if specified is busy
--verboseflag-Show all logs without filtering

Examples

# Run with defaults
pulse run app.py

# Production mode on specific port
pulse run app.py --prod --port 3000

# Development with specific address
pulse run app.py --address 0.0.0.0 --port 8080

# Run only backend (for separate frontend deployment)
pulse run app.py --server-only --react-server-address http://localhost:5173

pulse generate

Generate TypeScript routes without starting the server.

pulse generate <app_file> [options]

Arguments

ArgumentDescription
app_fileApp target: path.py[:var] (default :app) or module:var

Options

OptionTypeDefaultDescription
--devflag-Generate in development mode (default)
--ciflag-Generate in CI mode
--prodflag-Generate in production mode
--plainflag-Plain output without colors or emojis

Examples

# Generate routes for development
pulse generate app.py

# Generate for production (requires server_address)
pulse generate app.py --prod

In CI or production mode, server_address must be configured in the App constructor or via PULSE_SERVER_ADDRESS environment variable.


pulse check

Check if web project dependencies are in sync with Pulse app requirements.

pulse check <app_file> [options]

Arguments

ArgumentDescription
app_fileApp target: path.py[:var] (default :app) or module:var

Options

OptionTypeDefaultDescription
--fixflag-Install missing or outdated dependencies
--devflag-Run in development mode (default)
--ciflag-Run in CI mode
--prodflag-Run in production mode
--plainflag-Plain output without colors or emojis

Examples

# Check dependencies
pulse check app.py

# Check and auto-fix
pulse check app.py --fix

Environment Variables

PULSE_ENV

PULSE_ENV=dev|ci|prod

Set the Pulse environment mode. Affects logging, security defaults, and error handling.

ValueDescription
devDevelopment mode with detailed errors and hot reload
ciCI/testing mode with stricter validation
prodProduction mode with security hardening

PULSE_APP_FILE

PULSE_APP_FILE=/path/to/app.py

Path to the Pulse application file. Used for resolving relative paths in CodegenConfig.

PULSE_APP_DIR

PULSE_APP_DIR=/path/to/app

Directory containing the Pulse application. Fallback for path resolution when PULSE_APP_FILE is not set.

PULSE_HOST

PULSE_HOST=0.0.0.0

Host address for the uvicorn server. Set automatically by pulse run.

PULSE_PORT

PULSE_PORT=8000

Port for the uvicorn server. Set automatically by pulse run.

PULSE_SERVER_ADDRESS

PULSE_SERVER_ADDRESS=https://api.example.com

Public server address for WebSocket connections. Required in production mode.

PULSE_REACT_SERVER_ADDRESS

PULSE_REACT_SERVER_ADDRESS=http://localhost:5173

React dev server address. Used in single-server mode with --server-only.

PULSE_SECRET

PULSE_SECRET=your-secret-key

Secret key for session signing. Auto-generated in development if not set.

PULSE_DISABLE_CODEGEN

PULSE_DISABLE_CODEGEN=1

Disable automatic code generation. Useful in production with pre-built routes.


Exit Codes

CodeDescription
0Success
1Error (invalid arguments, missing dependencies, server failure)

On this page