Skip to main content

Command-line interface for Lexigram Framework - Project scaffolding, code generation, and development tools

Project description

lexigram-cli

Command-line interface for the Lexigram Framework.


Overview

The lexigram CLI provides project scaffolding, code generation, development tooling, and administrative commands for every stage of the application lifecycle. It uses a contributor-based plugin system so other packages can extend the CLI with new commands and generators.


Full documentation: docs.lexigram.dev

Install

uv add lexigram-cli
# or, as a standalone tool:
uv tool install lexigram-cli

Quick Start

from lexigram import Application
from lexigram.di.module import Module, module

from lexigram.cli import CLIModule
from lexigram.cli.config import CLIConfig

@module(imports=[CLIModule.configure(CLIConfig())])
class AppModule(Module):
    pass

app = Application(modules=[AppModule])
if __name__ == "__main__":
    app.run()

Or use the CLI directly:

# Create a new web API project
lexigram new project my-api --template web-api

# Scaffold a new extension package
lexigram new package my-feature

# Generate a controller
lexigram gen controller UserController --resource User

# Add the database package to an existing project
lexigram add database --driver postgres

# Start the dev server with hot-reload
lexigram dev start

Configuration

Zero-config usage: Call CLIModule.configure() with no arguments to use all defaults.

Option 1 — YAML file

# application.yaml
cli:
  default_template: "web-api"
  default_database: "postgres"
  color: true
  verbose: false

Option 2 — Profiles + Environment Variables (recommended)

export LEX_CLI__DEFAULT_TEMPLATE=web-api
export LEX_CLI__COLOR=true
export LEX_CLI__VERBOSE=false

Option 3 — Python

from lexigram.cli.config import CLIConfig
from lexigram.cli import CLIModule

config = CLIConfig.from_env_profile()
CLIModule.configure(config)

Config reference

Field Default Env var Description
default_template "web-api" LEX_CLI__DEFAULT_TEMPLATE Template used by lexigram new
default_database "postgres" LEX_CLI__DEFAULT_DATABASE Database driver used by scaffolding
color true LEX_CLI__COLOR Enable coloured terminal output
verbose false LEX_CLI__VERBOSE Print verbose/debug output

Key Features

  • Project scaffoldingweb-api, api, and full templates
  • Package generation — scaffold new lexigram-* extension packages
  • Code generators — 32+ generators (controller, service, model, provider, event, etc.)
  • Contributor system — extensible plugin architecture for new commands
  • Shell completion — bash, zsh, and fish completion scripts

Key Source Files

File What it contains
src/lexigram/cli/config.py CLIConfig configuration dataclass
src/lexigram/cli/module.py CLI module assembly
src/lexigram/cli/commands/ All CLI command implementations
src/lexigram/cli/generators/ Code generation logic
src/lexigram/cli/registry/ Registry subsystems
src/lexigram/cli/contributors/ Plugin contributor system

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lexigram_cli-0.1.2.tar.gz (212.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lexigram_cli-0.1.2-py3-none-any.whl (136.8 kB view details)

Uploaded Python 3

File details

Details for the file lexigram_cli-0.1.2.tar.gz.

File metadata

  • Download URL: lexigram_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 212.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.14

File hashes

Hashes for lexigram_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 5fe91bf2099f979497856ca577d13a24b25da73d3e8f205f809573cd3b7e468d
MD5 e7816963975853ae2b98b277ebccab43
BLAKE2b-256 32b2302e8f793e920b809c43234dad8a60e5ce8e1534cb73ab80d6e918665e97

See more details on using hashes here.

File details

Details for the file lexigram_cli-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for lexigram_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec4033322eec11e0855c08fa6d71efb593606e347a0b01d46bfa5dcedbf7f738
MD5 2b86e400cd5d72f716d36420b29cbd24
BLAKE2b-256 612daa31936d4b604298bae86a6262bed5a1ddcd9c34d4edaf43c99fad5e5f2c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page