Reflexio Docs
CLI Reference

services

Start and stop a local open-source Reflexio backend and docs site.

reflexio services

Self-hosted open-source only. services start / services stop launch the open-source Reflexio backend (FastAPI) and docs site on the machine where the CLI runs. They are not used with managed Reflexio Enterprise (https://www.reflexio.ai), which is a hosted service maintained for you — there is nothing to start or stop.

Managed users: skip this page and head to interactions, user-profiles, and the top-level publish / search shortcuts.

The default open-source setup runs:

  • A FastAPI backend on port 8081, using local SQLite for storage and no authentication.
  • A Next.js docs site on port 8082 (when running from a source checkout; silently skipped for PyPI installs).

Run services commands from the project root so log paths resolve correctly.


Command: reflexio services start

Starts the backend and docs servers as subprocesses and blocks until you interrupt with Ctrl-C.

reflexio services start [OPTIONS]

Options

Prop

Type

Behavior

  1. Loads .env from the current directory, then from ~/.reflexio/.env.
  2. Sets API_BACKEND_URL=http://localhost:{backend-port} so other tools know where the backend is listening.
  3. Launches uvicorn reflexio.server.api:app for the backend, with auto-reload unless --no-reload is passed.
  4. Launches the Next.js docs dev server from the repo's docs/ directory, if it exists. PyPI installs silently skip the docs service since the Next.js source is not shipped in the wheel.

No API key, no JWT secret, no external database setup — the default run is a single-process SQLite-backed server.

Examples

# Start backend + docs with defaults (8081 and 8082)
reflexio services start

# Only the backend, no auto-reload
reflexio services start --only backend --no-reload

# Backend on a custom port
reflexio services start --backend-port 9000

Command: reflexio services stop

Stops running services by killing processes listening on the configured ports. Sends SIGTERM first, then escalates to SIGKILL after a grace period unless --force is set.

reflexio services stop [OPTIONS]

Options

Prop

Type

Examples

# Graceful shutdown of backend + docs
reflexio services stop

# Force-kill everything immediately
reflexio services stop --force

# Stop only the docs service
reflexio services stop --only docs

Prerequisites

  • Python ≥ 3.12 with the reflexio-ai package installed (or via uv run).
  • Node.js + npm — only required when running the docs site from a source checkout.

See the Quick Start for end-to-end setup.