PANELITH DOCS Open the interactive docs ↗

Start · Panelith 0.1.0 · plain HTML edition; the interactive edition has search and live examples

Install and run

On this page 3 sections
  1. Install
  2. The command line
  3. Working on the shell

Panelith needs Python 3.12 or newer. The built shell is part of the package, so Node is only needed to change the shell itself.

Install#

The package installs from a checkout of the repository:

git clone <the panelith repository> panelith
cd panelith
python -m venv .venv && .venv/bin/pip install -e .
.venv/bin/panelith run examples.hello:Hello --open

pip install -e .[dev] adds pytest, httpx and Playwright for the test suite (see Testing).

The command line#

Command Does
panelith run module:App [--port 8000] [--host] [--open] [--forwarded-allow-ips] serve one app with uvicorn; --open opens a browser tab
panelith serve module:App[@/mount] … serve several apps from one process, each under a prefix (see Hosting)
panelith docs [--port 8010] [--open] these docs, locally, with the demo variants
panelith manifest module:App print the manifest JSON: exactly what the shell will be told
panelith types [out.ts] TypeScript types generated from the schema

module:App names a module importable from the current directory and an App subclass or instance in it; with no :App the first app in the module is used.

Working on the shell#

cd frontend && npm install --legacy-peer-deps
npm run build        # → src/panelith/static, which is committed
npm run dev          # Vite on :5173, proxying /api to the Python server on :8000

The plain npm install trips an npm bug with this dependency set; the flag avoids it. After npm run build the Python package serves the new shell without reinstalling.

Note
The shell's asset URLs and API base are relative to wherever it is mounted, so the same build runs at /, behind a reverse-proxy prefix such as /panelith/, and inside panelith serve mounts.