Commands
Alpha (0.1.x) — MIT licensed. Commands and flags may change before 1.0.
Overview
Section titled “Overview”The lexigram CLI is the primary developer tool for scaffolding, running, and managing Lexigram projects. Commands are organised into categories.
Built-in commands
Section titled “Built-in commands”lexigram new
Section titled “lexigram new”Scaffold a new project or package.
lexigram new project <name> [--template web-api] [--output-dir .]lexigram new package <name> [--output-dir packages/]| Flag | Default | Description |
|---|---|---|
--template, -t | web-api | Project template (web-api, cli, library) |
--output-dir | . | Output directory |
Example: lexigram new project my-api --template web-api
lexigram run
Section titled “lexigram run”Smart runner — auto-detects create_app() factory and starts the ASGI server.
lexigram run [target] [--host 0.0.0.0] [--port 8000] [--server uvicorn]| Flag | Default | Description |
|---|---|---|
target | Auto-detected | module:attr factory path |
--host, -h | 0.0.0.0 | Bind address |
--port, -p | 8000 | Port |
--server | Auto-detected | Server backend (uvicorn, hypercorn, granian) |
Example: lexigram run my_app.app:create_app --port 8080
lexigram dev
Section titled “lexigram dev”Development server with hot reload.
lexigram dev [--entry src/main.py] [--host 127.0.0.1] [--port 8000] [--reload] [--env development]| Flag | Default | Description |
|---|---|---|
--entry | Auto-detected | Entry point file |
--reload/--no-reload | True | Hot reload on file changes |
--env | development | Environment profile |
Example: lexigram dev --entry app.py --port 9000 --no-reload
lexigram db
Section titled “lexigram db”Database management commands.
lexigram db init [--reset] [--seed]lexigram db migrate [--name <migration>] [--auto]lexigram db seed [--file seeds.py]lexigram db shelllexigram gen
Section titled “lexigram gen”Code generation commands.
lexigram gen provider <name> [--output src/providers/]lexigram gen module <name> [--output src/modules/]lexigram gen migration [--auto-detect]lexigram inspect
Section titled “lexigram inspect”Inspect runtime state of a running application or configuration.
lexigram inspect providers [--json]lexigram inspect config [--section <section>]lexigram inspect routeslexigram inspect health| Flag | Description |
|---|---|
--json | Output as JSON |
--section | Filter config to a specific section |
lexigram shell
Section titled “lexigram shell”Open an interactive Python REPL with the Lexigram application loaded.
lexigram shell [target]lexigram init
Section titled “lexigram init”Initialize Lexigram in an existing project.
lexigram init [--force]Creates application.yaml, project scaffold, and optional pyproject.toml updates.
lexigram add
Section titled “lexigram add”Add a provider or extension to the project.
lexigram add <package> [--version <version>]lexigram add provider <name>lexigram config
Section titled “lexigram config”Configuration management.
lexigram config view [--section <section>]lexigram config validate [--file application.yaml]lexigram contrib
Section titled “lexigram contrib”Discover and inspect installed contributors (plugins).
lexigram contrib list [--json]lexigram contrib info <name>| Flag | Description |
|---|---|
--json | Machine-readable output |
lexigram project
Section titled “lexigram project”Project management utilities.
lexigram project test [path] [--coverage] [--verbose] [--runner pytest]lexigram project lint [path] [--fix] [--check]lexigram project routeslexigram system
Section titled “lexigram system”System information and diagnostics.
lexigram system infolexigram system diagnosticslexigram system checklexigram version
Section titled “lexigram version”Show framework and package versions.
lexigram version [--all]| Flag | Description |
|---|---|
--all | List versions of all installed Lexigram packages |
lexigram list
Section titled “lexigram list”List all available commands.
lexigram list [--group <group>] [--json]| Flag | Description |
|---|---|
--group, -g | Filter by category |
--json | Machine-readable output |
lexigram completion
Section titled “lexigram completion”Generate shell completion script.
lexigram completion --shell <bash|zsh|fish|powershell>Install with: eval "$(lexigram completion --shell bash)"
lexigram test
Section titled “lexigram test”Run project tests (delegates to lexigram project test).
lexigram test [path] [--coverage] [--verbose]lexigram lint
Section titled “lexigram lint”Run project linting (delegates to lexigram project lint).
lexigram lint [path] [--fix]lexigram events
Section titled “lexigram events”Event schema management.
lexigram events schema validatelexigram events schema migratePlugin/contributor commands
Section titled “Plugin/contributor commands”Packages can register commands via the lexigram.cli.commands entry point. Contributor commands appear under their own category in lexigram list. Register in pyproject.toml:
[project.entry-points."lexigram.cli.commands"]my_contrib = "my_package.cli:app"See also
Section titled “See also”CLIModule— DI integration for CLI commandsCommandRegistry— programmatic command registrationContributorRuntime— plugin discovery at runtimePUBLIC_PACKAGE_CLI_MATRIX.md— per-package command ownership