From bd294bea307b21883e22ab86ef30e857fc5b44d9 Mon Sep 17 00:00:00 2001 From: Vishesh 'ironeagle' Bangotra Date: Wed, 21 Jan 2026 18:39:58 +0530 Subject: [PATCH] cli example changes --- docforge/__init__.py | 27 ++++++++++++++++++--------- docforge/cli/__init__.py | 6 ++---- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/docforge/__init__.py b/docforge/__init__.py index 87ba0a8..05b3ede 100644 --- a/docforge/__init__.py +++ b/docforge/__init__.py @@ -6,6 +6,12 @@ speed, flexibility, and beautiful output. It decouples the introspection of your code from the rendering process, allowing you to generate documentation for various platforms (starting with MkDocs) from a single internal models. +## Available Commands + +- **build**: Build documentation (MkDocs site or MCP resources). +- **serve**: Serve documentation (MkDocs or MCP). +- **tree**: Visualize the introspected project structure. + ## Installation Install using `pip` with the optional `mkdocs` dependencies for a complete setup: @@ -16,10 +22,14 @@ pip install doc-forge ## Quick Start -1. **Generate Markdown Sources**: - Introspect your package and create ready-to-use Markdown files: +1. **Build Documentation**: + Introspect your package and generate documentation in one step: ```bash - doc-forge generate --module my_package --docs-dir docs + # Build MkDocs site + doc-forge build --mkdocs --module my_package --site-name "My Docs" + + # Build MCP resources + doc-forge build --mcp --module my_package ``` 2. **Define Navigation**: @@ -33,14 +43,13 @@ pip install doc-forge - my_package/utils.md ``` -3. **Generate MkDocs Configuration**: +3. **Preview**: ```bash - doc-forge mkdocs --site-name "My Awesome Docs" - ``` + # Serve MkDocs site + doc-forge serve --mkdocs -4. **Preview**: - ```bash - doc-forge serve + # Serve MCP documentation + doc-forge serve --mcp ``` ## Project Structure diff --git a/docforge/cli/__init__.py b/docforge/cli/__init__.py index 7ced811..094887b 100644 --- a/docforge/cli/__init__.py +++ b/docforge/cli/__init__.py @@ -6,11 +6,9 @@ with doc-forge. ## Available Commands +- **build**: Build documentation (MkDocs site or MCP resources). +- **serve**: Serve documentation (MkDocs or MCP). - **tree**: Visualize the introspected project structure. -- **generate**: Create Markdown source files from Python code. -- **mkdocs**: Generate the primary `mkdocs.yml` configuration. -- **build**: Build the final documentation site. -- **serve**: Launch a local development server with live-reloading. """ from .main import main