Solomon is an MVC-style framework CLI wired to Constellink (deploy/migrate) and UILoom (UI build). This page documents the available commands, flags, expected config files, and typical workflows.
python3 -m pip install -U pip
python3 -m pip install -e . # from the repo root with pyproject.toml
✓ Requires Python 3.12+ (adjust as needed)
python -m solomon --help
python -m solomon <command> --help
Or if installed with an entry-point, use solomon
instead of python -m solomon
.
deploy
/ migrate
)ui
subcommands)create
(auto user/db creation).solomon
(INI)Used by deploy
and migrate
.
[solomon]
name = my-app
models = ./app/models
views = ./app/ui/templates
[database]
type = postgres
[kv]
type = redis
config/settings
(shell exports)export PROJECT="my-app"
export HOST_URL="127.0.0.1"
export PORT="4801"
export MAIN_FUNC="app.main"
export ENV="dev"
solomon <command> [options]
deploy
— Deploy with ConstellinkReads .solomon
, takes [solomon].name
, and runs constellink deploy <name>
.
solomon deploy
If .solomon
is missing or malformed, the command will fail. Ensure Constellink is installed.
migrate
— Migrate models with ConstellinkReads [solomon].models
and runs constellink migrate <models-path>
.
solomon migrate
create
— Scaffold a new appCreates a basic app layout, seeds config files, generates Postgres user/db, copies defaults, and installs UILoom base assets.
solomon create <app-name> [--env PATH]
<app-name>
— required, becomes project name and DB prefix--env
— optional target directory (default: .
)<env>/<app>/
with config/settings
, solomon.ini
, secrets/dev.json
, app/ui/...
, tests/
<app>_dev
<app>_user
password
(change it!)The Postgres admin role is currently hardcoded to josephbender
in create_user_and_db()
— adjust for your environment.
ui
— UI subcommands (UILoom)ui compile
Compile UILoom LML templates to a distribution directory.
solomon ui compile [--in PATH] [--out PATH]
--in
(default ./app/ui/templates
)--out
(default ./app/ui/dist/
)ui css
Generate UILoom CSS bundle.
solomon ui css [--in PATH] [--out PATH]
--in
(default ./app/ui/assets/uiloom/css/
)--out
(default ./app/ui/dist/assets/css
)repair
— Restore defaultsCopies packaged defaults from solomon.defaults
into the specified directory.
solomon repair --env PATH
Most operations run via subprocess.run
with check=True
and a default timeout of 30s. On success the CLI prints:
✅ <NAME> ran successfully!
On failure you’ll see a red ❌ message with the command and the exit code, and the error is re-raised.
# Create a new app scaffold in the current directory
solomon create myshop --env .
# Build UI assets (defaults)
solomon ui compile
solomon ui css
# Migrate database models
solomon migrate
# Deploy the app specified in .solomon
solomon deploy
constellink
and loom
are on your PATH.create_user_and_db()
or run with appropriate privileges.timeout
default in solomon_pipe()
if needed.deploy()
/migrate()
, avoid f"{config["solomon"]["name"]}"
; use name = config["solomon"]["name"]
then format.