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). - An optional embedding daemon on port
8072whenREFLEXIO_EMBEDDING_PROVIDER=local_serviceorCLAUDE_SMART_USE_LOCAL_EMBEDDING=1.
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
- Loads
.envfrom the current directory, then from~/.reflexio/.env. On the very first run,~/.reflexio/.envis auto-created from the bundled template. - First-run check (backend launches only): when the selected services include
backendand no LLM provider key is set in the environment (or the only keys set don't support text embeddings), an interactive wizard prompts for a provider and key before launching the backend. The wizard writes the chosen key to~/.reflexio/.env. On a non-interactive stdin (CI,nohup, containers) the wizard is skipped and the command exits with a pointer to the.envfile instead of launching uvicorn. Invocations that omit the backend — e.g.--only docsor--only frontend— skip the check entirely and will not prompt or error on a missing key. - Sets
API_BACKEND_URL=http://localhost:{backend-port}so other tools know where the backend is listening. - When local embedding service mode is selected, launches
reflexio embeddings servebefore the backend and points the backend atREFLEXIO_EMBEDDING_SERVICE_URL. - Launches
uvicorn reflexio.server.api:appfor the backend, with auto-reload unless--no-reloadis passed. - 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 JWT secret or external database setup is required — the default run is a single-process SQLite-backed server. A backend launch requires one LLM provider API key; the first-run wizard collects it, or run reflexio setup init ahead of time to configure it yourself. Docs-only or frontend-only invocations don't need a key.
Enterprise starts from the reflexio-enterprise checkout must set DEPLOYMENT_MODE and use a remote backend. Platform mode currently supports REFLEXIO_STORAGE=supabase only. Enterprise self-host mode supports REFLEXIO_STORAGE=supabase with DATA_SUPABASE_URL, DATA_SUPABASE_KEY, and DATA_DB_URL, or REFLEXIO_STORAGE=postgres with DATA_DB_URL; it also requires SELF_HOST_USERNAME and SELF_HOST_PASSWORD. In self-host mode the backend applies auth and data migrations to the same database on startup.
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
# Local embedding daemon only
reflexio services start --only embedding
# Backend on a custom port
reflexio services start --backend-port 9000Command: 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 docsPrerequisites
- Python ≥ 3.12 with the
reflexio-aipackage installed (or viauv run). - Node.js +
npm— only required when running the docs site from a source checkout.
See the Quick Start for end-to-end setup.