cli-cleanup #1
Reference in New Issue
Block a user
No description provided.
Delete Branch "cli-cleanup"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refactor: Modular CLI Structure, Type Synchronization, and Documentation Audit
This PR overhauls the
doc-forgeCLI for better maintainability, synchronizes type stubs across the package, and completes a comprehensive docstring audit to support high-quality documentation generation.Key Changes
1. CLI Consolidation and Restructuring
docforge.cli.mkdocs_utilsanddocforge.cli.mcp_utils).generate,generate-mcp,mkdocs,serve-mcp) with two high-level entry points:doc-forge build: Handles introspection, source generation, and final site building for both MkDocs and MCP.doc-forge serve: Launches development servers for both formats.main.pyinto a thin wrapper, delegating tocommands.pyfor CLI structure.2. Type System Alignment (.pyi files)
.pyfile has a corresponding.pyistub that matches its signature.serverssub-package and new CLI utility modules.__init__.pyifiles.3. Documentation Audit (Human and LLM focused)
ArgsandReturnsblocks.4. Test Suite Refactoring
tests/to match the new modular organization, creating dedicatedtests/mkdocs/andtests/mcp/directories.buildandserveworkflows.How to Verify
Run the updated test suite:
Manual check of the new CLI:
Impact
.pyicoverage provides better IDE completion and stricter type-checking for downstream consumers.