Command Line Interface (CLI)
Metupy includes a built-in CLI tool for project scaffolding, page generation, theme management, live development, and static site exports.
1. Core Commands
| Command | Arguments / Options | Description |
|---|---|---|
metupy init | [project_name] | Scaffolds a new Metupy documentation starter project. |
metupy dev | --port (default: 5000) | Starts the local development WSGI server with hot reloading. |
metupy build | None | Generates static HTML and Markdown documentation output into dist/. |
metupy add | [component_names...] | Copies blueprint components into your local ./components/ folder. |
metupy make:page | [path] | Creates a single new page script inside ./pages/. |
metupy make:pagegroup | [folder/filename...] | Generates folder-based page groups inside ./pages/. |
metupy make:theme | [theme_name] | Scaffolds a new theme template directory under ./templates/. |
metupy install:theme | [user/repo] | Downloads and extracts a community theme directly from GitHub. |
2. Quick Start Workflow
1
Initialize New Project
Run
metupy init my-docs to scaffold project directories (pages/, assets/, components/, and pyproject.toml).2
Start Local Development Server
Navigate into your project directory (
cd my-docs) and run metupy dev to launch the server on port 5000.3
Generate Static Export
When ready to deploy, run
metupy build to render HTML pages and raw Markdown files into the dist/ folder.3. Scaffolding Helpers
Scaffolding Pages & Page Groups
Use
metupy make:page docs/setup or metupy make:pagegroup docs/install docs/config to quickly build nested route structures without manually writing boilerplate Python files.
Ecosystem Theme Installation
You can install external themes directly using
metupy install:theme username/repository-name. The CLI will download the zip archive from GitHub and place it inside ./templates/ automatically.