Skip to main content

CLI Reference

Auto-generated from m --help - Do not edit manually.

Framework M provides a CLI for common development tasks.


Commands

CommandDescription
m codegenCode generation tools for Framework M
m config:setSet a configuration value.
m config:showDisplay current configuration.
m consoleStart an interactive console.
m contribContributor tooling (CLA checks, etc.)
m create-adminBackward-compatible alias for creating an Admin user.
m create-userCreate a local user for Framework M.
m depsManage dependencies and upgrades
m devStart development servers with hot reload.
m docsDocumentation generation tools
m entrypointsList all discovered Framework M entry points.
m formatFormat using ruff.
m infoShow system and framework information.
m jobsJob management commands
m lintLint using ruff.
m migrateDatabase migration commands
m newScaffold new components (apps, doctypes, frontends)
m prodStart Framework M in production mode.
m release
m routesList API routes from the application.
m securityRun security checks using bandit.
m studioStart Framework M Studio visual editor
m testRun tests using pytest.
m typecheckType check using mypy.
m workerStart the Taskiq worker for processing background jobs.

Detailed Usage

m codegen

Usage: m codegen COMMAND

Code generation tools for Framework M

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ client Generate API client from OpenAPI schema. │
│ doctype Generate DocType Python code from schema. │
╰──────────────────────────────────────────────────────────────────────────────╯

m console

Usage: m console [ARGS]

Start an interactive console.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ WITH-CONTAINER Auto-initialize DI container [default: False] │
│ --with-container │
│ --no-with-container │
╰──────────────────────────────────────────────────────────────────────────────╯

m contrib

Usage: m contrib COMMAND

Contributor tooling (CLA checks, etc.)

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ cla-check Check if a user has signed the Contributor License Agreement. │
╰──────────────────────────────────────────────────────────────────────────────╯

m create-admin

Usage: m create-admin [ARGS]

Backward-compatible alias for creating an Admin user.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ EMAIL --email Admin user email address │
│ PASSWORD --password Admin user password (min 8 characters) │
│ NAME --name Admin user display name [default: Administrator] │
╰──────────────────────────────────────────────────────────────────────────────╯

m create-user

Usage: m create-user [ARGS]

Create a local user for Framework M.

If --email, --password, or --role are not provided, values are collected
interactively.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ EMAIL --email User email address │
│ PASSWORD --password User password (min 8 characters) │
│ NAME --name User display name [default: User] │
│ ROLE --role User role (e.g., User, Admin) │
╰──────────────────────────────────────────────────────────────────────────────╯

m deps

Usage: m deps COMMAND

Manage dependencies and upgrades

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ check Check for outdated dependencies. │
│ upgrade Upgrade a dependency and create a merge request. │
╰──────────────────────────────────────────────────────────────────────────────╯

m dev

Usage: m dev [ARGS]

Start development servers with hot reload.

Runs backend (uvicorn --reload) and frontend (pnpm dev) concurrently using
honcho for process management.

Configuration is loaded from multiple sources with the following precedence:

1 CLI flags (highest priority)
2 Procfile (if specified with --procfile)
3 m.toml [dev] section
4 Default processes

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ APP --app Backend app path (module:attribute format) │
│ HOST --host Host to bind to [default: 0.0.0.0] │
│ PORT --port Backend port [default: 8888] │
│ FRONTEND-DIR --frontend-dir Frontend directory path [default: frontend] │
│ FRONTEND-PORT Frontend dev server port [default: 5173] │
│ --frontend-port │
│ STUDIO --studio --no-studio Also start Studio on port 9999 [default: False] │
│ STUDIO-PORT --studio-port Studio port [default: 9999] │
│ FRONTEND --frontend Enable/disable frontend process [default: True] │
│ --no-frontend │
│ ENABLE-WORKER Enable worker process (m worker) [default: │
│ --enable-worker False] │
│ --no-enable-worker │
│ ENABLE-SCHEDULER Enable scheduler process (m worker │
│ --enable-scheduler --scheduler-only) [default: False] │
│ --no-enable-scheduler │
│ PROCFILE --procfile Path to Procfile for custom process definitions │
╰──────────────────────────────────────────────────────────────────────────────╯

m docs

Usage: m docs COMMAND

Documentation generation tools

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ adr Manage Architecture Decision Records. │
│ audit Audit documentation gaps. │
│ export Export documentation in machine-readable formats │
│ generate Unified documentation generator. │
│ openapi Export OpenAPI documentation. │
│ rfc Manage Request for Comments documents. │
│ screenshots Capture automated screenshots based on a manifest file. │
╰──────────────────────────────────────────────────────────────────────────────╯

m entrypoints

Usage: m entrypoints

List all discovered Framework M entry points.

m format

Usage: m format [OPTIONS] [ARGS...]

Format using ruff.

All arguments and flags are passed directly to ruff format. If no arguments are
provided, it defaults to the current directory.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ ARGS │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ --cwd Working directory │
╰──────────────────────────────────────────────────────────────────────────────╯

m info

Usage: m info [ARGS]

Show system and framework information.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ VERBOSE --verbose Show detailed info [default: False] │
│ --no-verbose │
╰──────────────────────────────────────────────────────────────────────────────╯

m jobs

Usage: m jobs COMMAND

Job management commands

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ list List all registered job handlers. │
│ run Run a job immediately. │
│ status Check the status of a job. │
╰──────────────────────────────────────────────────────────────────────────────╯

m lint

Usage: m lint [OPTIONS] [ARGS...]

Lint using ruff.

All arguments and flags are passed directly to ruff check. If no arguments are
provided, it defaults to the current directory.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ ARGS │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ --cwd Working directory │
╰──────────────────────────────────────────────────────────────────────────────╯

m migrate

Usage: m migrate COMMAND [ARGS]

Database migration commands

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ all Run all migrations (Patches + Sync). │
│ create Create a new migration file. │
│ history Show migration history. │
│ init Initialize Alembic for this project. │
│ rollback Rollback database migrations. │
│ run Run pending database migrations. │
│ status Show current migration status. │
│ sync Sync database schema directly from DocTypes (Frappe-style). │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ PATH --path Path to the application directory [default: .] │
│ DATABASE-URL --database-url Database connection URL [env var: DATABASE_URL] │
│ REVISION --revision Target revision (default: head) [default: head] │
│ APPS --apps Comma-separated list of apps to migrate │
╰──────────────────────────────────────────────────────────────────────────────╯

m new

Usage: m new COMMAND

Scaffold new components (apps, doctypes, frontends)

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ app Create a new Framework M app. │
│ doctype Create a new DocType with scaffolded files. │
│ frontend Initialize a new frontend from template. │
╰──────────────────────────────────────────────────────────────────────────────╯

m prod

Usage: m prod [ARGS]

Start Framework M in production mode.

Indie mode serves bundled or local dist static assets via Python. Enterprise
mode serves API only; static assets should be served by nginx.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ PORT --port Backend port (default: 8000) [default: 8000] │
│ RELOAD --reload --no-reload Enable backend auto-reload [default: False] │
│ HOST --host Host to bind to (default: 0.0.0.0) [default: │
│ 0.0.0.0] │
│ WITH-FRONTEND Prefer prebuilt frontend/dist static UI via │
│ --with-frontend backend (no build) [default: False] │
│ --no-with-frontend │
│ APP --app App path (module:attribute format) │
│ FRONTEND-DIR --frontend-dir Frontend directory path (default: ./frontend) │
│ [default: frontend] │
╰──────────────────────────────────────────────────────────────────────────────╯

m release

Usage: m release COMMAND

╭─ Commands ───────────────────────────────────────────────────────────────────╮
│ auto Automated multi-package release workflow. │
│ mr Create or update a merge request. │
│ plan Preview which components will be released. │
│ prepare Prepare a release branch with bumped versions. │
│ push Push the release branch to the origin remote. │
│ tag Create tags and releases for updated components. │
╰──────────────────────────────────────────────────────────────────────────────╯

m routes

Usage: m routes [ARGS]

List API routes from the application.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ APP --app App path to inspect │
╰──────────────────────────────────────────────────────────────────────────────╯

m security

Usage: m security [OPTIONS] [ARGS...]

Run security checks using bandit.

All arguments and flags are passed directly to bandit. If no arguments are
provided, it defaults to the current directory.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ ARGS │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ --cwd Working directory │
╰──────────────────────────────────────────────────────────────────────────────╯

m studio

Usage: m studio [ARGS]

Start Framework M Studio visual editor

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ PORT --port Port to run Studio on [default: 9999] │
│ HOST --host Host to bind to [default: 0.0.0.0] │
│ RELOAD --reload --no-reload Enable auto-reload for development [default: │
│ False] │
│ CLOUD --cloud --no-cloud Enable cloud mode (Git-backed workspaces) │
│ [default: False] │
╰──────────────────────────────────────────────────────────────────────────────╯

m test

Usage: m test [OPTIONS] [ARGS...]

Run tests using pytest.

All arguments and flags are passed directly to pytest. If no arguments are
provided, it defaults to the current directory.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ ARGS │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ --cwd Working directory │
╰──────────────────────────────────────────────────────────────────────────────╯

m typecheck

Usage: m typecheck [OPTIONS] [ARGS...]

Type check using mypy.

All arguments and flags are passed directly to mypy. If no arguments are
provided, it defaults to 'src'.

╭─ Arguments ──────────────────────────────────────────────────────────────────╮
│ ARGS │
╰──────────────────────────────────────────────────────────────────────────────╯
╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ --cwd Working directory │
╰──────────────────────────────────────────────────────────────────────────────╯

m worker

Usage: m worker [ARGS]

Start the Taskiq worker for processing background jobs.

The worker connects to NATS JetStream and processes jobs from the queue. Set
NATS_URL environment variable to configure the NATS server.

╭─ Parameters ─────────────────────────────────────────────────────────────────╮
│ CONCURRENCY --concurrency Number of concurrent workers [default: 4] │
│ VERBOSE --verbose Enable verbose logging [default: False] │
│ --no-verbose │
╰──────────────────────────────────────────────────────────────────────────────╯