Solomon

Solomon CLI

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.

Quick Install (editable)

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)

Run Help

python -m solomon --help
python -m solomon <command> --help

Or if installed with an entry-point, use solomon instead of python -m solomon.

Prerequisites

Configuration Files

.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"

Global CLI Usage

solomon <command> [options]

Commands

deploy — Deploy with Constellink

Reads .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 Constellink

Reads [solomon].models and runs constellink migrate <models-path>.

solomon migrate

create — Scaffold a new app

Creates a basic app layout, seeds config files, generates Postgres user/db, copies defaults, and installs UILoom base assets.

solomon create <app-name> [--env PATH]

What it creates

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]

ui css

Generate UILoom CSS bundle.

solomon ui css [--in PATH] [--out PATH]

repair — Restore defaults

Copies packaged defaults from solomon.defaults into the specified directory.

solomon repair --env PATH

Return Codes & Output

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.

Examples

# 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

Troubleshooting