@@ -126,85 +126,84 @@ docs = generate_docs("./my-project", config=config)
126126```
127127code2docs/
128128├── project
129- ├── updater
129+ ├── advanced_usage
130130 ├── badges
131131 ├── toc
132132 ├── formatters/
133- ├── quickstart
134- ├── advanced_usage
135- ├── sync/
133+ ├── registry
136134 ├── coverage_gen
137135 ├── _ source_links
138- ├── watcher
136+ ├── readme_gen
139137 ├── __ main__
138+ ├── watcher
140139 ├── depgraph_gen
141- ├── config_docs_gen
142- ├── getting_started_gen
143- ├── readme_gen
144140 ├── generators/
145- ├── advanced_usage
146- ├── quickstart
147- ├── code2llm_gen
148- ├── mkdocs_gen
149- ├── differ
150- ├── api_reference_gen
141+ ├── getting_started_gen
142+ ├── config_docs_gen
143+ ├── module_docs_gen
151144 ├── org_readme_gen
145+ ├── code2llm_gen
152146├── code2docs/
153- ├── analyzers/
154- ├── module_docs_gen
147+ ├── api_reference_gen
148+ ├── changelog_gen
149+ ├── mkdocs_gen
150+ ├── advanced_usage
155151 ├── contributing_gen
152+ ├── updater
153+ ├── analyzers/
156154 ├── architecture_gen
157- ├── changelog_gen
158- ├── registry
159- ├── quickstart
160155 ├── _ registry_adapters
156+ ├── api_changelog_gen
161157 ├── 04_sync_and_watch
162- ├── advanced_usage
158+ ├── quickstart
159+ ├── quickstart
163160 ├── 05_custom_generators
164- ├── entry_points
161+ ├── advanced_usage
165162 ├── 06_formatters
166- ├── examples_gen
163+ ├── 03_programmatic_api
164+ ├── entry_points
165+ ├── class_examples
167166 ├── basic_usage
167+ ├── 07_web_frameworks
168168 ├── 01_cli_usage
169- ├── 03_programmatic_api
170169 ├── 02_configuration
171- ├── 07_web_frameworks
172- ├── api_changelog_gen
170+ ├── examples_gen
171+ ├── differ
173172 ├── markdown
173+ ├── sync/
174+ ├── quickstart
174175 ├── base
175- ├── cli
176- ├── docstring_extractor
177176 ├── markdown_validator
177+ ├── cli
178178 ├── endpoint_detector
179- ├── dependency_scanner
180179 ├── project_scanner
180+ ├── dependency_scanner
181181 ├── config
182+ ├── docstring_extractor
182183 ├── llm_helper
183184```
184185
185186## API Overview
186187
187188### Classes
188189
189- - **`Updater `** — Apply selective documentation updates based on detected changes .
190+ - **`GeneratorRegistry `** — Registry of documentation generators .
190191- **`CoverageGenerator`** — Generate docs/coverage.md — docstring coverage report.
191192- **`SourceLinker`** — Build source-code links (relative paths + optional GitHub/GitLab URLs).
193+ - **`ReadmeGenerator`** — Generate README.md from AnalysisResult.
192194- **`DepGraphGenerator`** — Generate docs/dependency-graph.md with Mermaid diagrams.
193- - **`ConfigDocsGenerator`** — Generate docs/configuration.md from Code2DocsConfig dataclass.
194195- **`GettingStartedGenerator`** — Generate docs/getting-started.md from entry points and dependencies.
195- - **`ReadmeGenerator`** — Generate README.md from AnalysisResult.
196+ - **`ConfigDocsGenerator`** — Generate docs/configuration.md from Code2DocsConfig dataclass.
197+ - **`ModuleDocsGenerator`** — Generate docs/modules.md — consolidated module documentation.
198+ - **`OrgReadmeGenerator`** — Generate organization README with list of projects and brief descriptions.
196199- **`Code2LlmGenerator`** — Generate code2llm analysis files in project/ directory.
197- - **`MkDocsGenerator`** — Generate mkdocs.yml from the docs/ directory structure.
198- - **`ChangeInfo`** — Describes a detected change.
199- - **`Differ`** — Detect changes between current source and previous state.
200200- **`ApiReferenceGenerator`** — Generate docs/api.md — consolidated API reference.
201- - **`OrgReadmeGenerator`** — Generate organization README with list of projects and brief descriptions.
202- - **`ModuleDocsGenerator`** — Generate docs/modules.md — consolidated module documentation.
203- - **`ContributingGenerator`** — Generate CONTRIBUTING.md by detecting dev tools from pyproject.toml.
204- - **`ArchitectureGenerator`** — Generate docs/architecture.md — architecture overview with diagrams.
205201- **`ChangelogEntry`** — A single changelog entry.
206202- **`ChangelogGenerator`** — Generate CHANGELOG.md from git log and analysis diff.
207- - **`GeneratorRegistry`** — Registry of documentation generators.
203+ - **`MkDocsGenerator`** — Generate mkdocs.yml from the docs/ directory structure.
204+ - **`ContributingGenerator`** — Generate CONTRIBUTING.md by detecting dev tools from pyproject.toml.
205+ - **`Updater`** — Apply selective documentation updates based on detected changes.
206+ - **`ArchitectureGenerator`** — Generate docs/architecture.md — architecture overview with diagrams.
208207- **`ReadmeGeneratorAdapter`** — —
209208- **`ApiReferenceAdapter`** — —
210209- **`ModuleDocsAdapter`** — —
@@ -220,42 +219,44 @@ code2docs/
220219- **`Code2LlmAdapter`** — Adapter for code2llm analysis generation.
221220- **`OrgReadmeAdapter`** — Adapter for organization README generation.
222221- **`IndexHtmlAdapter`** — Adapter for generating index.html for GitHub Pages browsing.
222+ - **`ApiChange`** — A single API change between two analysis snapshots.
223+ - **`ApiChangelogGenerator`** — Generate API changelog by diffing current analysis with a saved snapshot.
223224- **`MetricsReportGenerator`** — Generate a metrics report from code analysis.
224225- **`APIChangelogGenerator`** — Generate changelog based on API changes.
225226- **`CustomGenerator`** — Example of extending the base generator class.
226227- **`ExamplesGenerator`** — Generate examples/ — usage examples from public API signatures.
227- - **`ApiChange `** — A single API change between two analysis snapshots .
228- - **`ApiChangelogGenerator `** — Generate API changelog by diffing current analysis with a saved snapshot .
228+ - **`ChangeInfo `** — Describes a detected change.
229+ - **`Differ `** — Detect changes between current source and previous state .
229230- **`MarkdownFormatter`** — Helper for constructing Markdown documents.
230231- **`GenerateContext`** — Shared context passed to all generators during a run.
231232- **`BaseGenerator`** — Abstract base for all documentation generators.
232- - **`DefaultGroup`** — Click Group that routes unknown subcommands to 'generate'.
233- - **`DocstringInfo`** — Parsed docstring with sections.
234- - **`DocstringExtractor`** — Extract and parse docstrings from AnalysisResult.
235233- **`MarkdownIssue`** — A single validation issue in a markdown file.
236234- **`ValidationReport`** — Aggregate result of markdown validation.
235+ - **`DefaultGroup`** — Click Group that routes unknown subcommands to 'generate'.
237236- **`Endpoint`** — Represents a detected web endpoint.
238237- **`EndpointDetector`** — Detects web endpoints from decorator patterns in source code.
238+ - **`ProjectScanner`** — Wraps code2llm's ProjectAnalyzer with code2docs-specific defaults.
239239- **`DependencyInfo`** — Information about a project dependency.
240240- **`ProjectDependencies`** — All detected project dependencies.
241241- **`DependencyScanner`** — Scan and parse project dependency files.
242- - **`ProjectScanner`** — Wraps code2llm's ProjectAnalyzer with code2docs-specific defaults.
243242- **`ReadmeConfig`** — Configuration for README generation.
244243- **`DocsConfig`** — Configuration for docs/ generation.
245244- **`ExamplesConfig`** — Configuration for examples/ generation.
246245- **`SyncConfig`** — Configuration for synchronization.
247246- **`Code2LlmConfig`** — Configuration for code2llm analysis generation.
248247- **`LLMConfig`** — Configuration for optional LLM-assisted documentation generation.
249248- **`Code2DocsConfig`** — Main configuration for code2docs.
249+ - **`DocstringInfo`** — Parsed docstring with sections.
250+ - **`DocstringExtractor`** — Extract and parse docstrings from AnalysisResult.
250251- **`LLMHelper`** — Thin wrapper around litellm for documentation generation.
251252
252253### Functions
253254
254255- `generate_badges(project_name, badge_types, stats, deps)` — Generate shields.io badge Markdown strings.
255256- `generate_toc(markdown_content, max_depth)` — Generate a table of contents from Markdown headings.
256257- `extract_headings(content, max_depth)` — Extract headings from Markdown content.
257- - `start_watcher(project_path, config)` — Start watching project for file changes and auto-resync docs.
258258- `generate_readme(project_path, output, sections, sync_markers)` — Convenience function to generate a README.
259+ - `start_watcher(project_path, config)` — Start watching project for file changes and auto-resync docs.
259260- `generate_docs(project_path, config)` — High-level function to generate all documentation.
260261- `parse_gitignore(project_path)` — Parse .gitignore file and return list of patterns to exclude.
261262- `generate_code2llm_analysis(project_path, config)` — Convenience function to generate code2llm analysis.
@@ -271,22 +272,24 @@ code2docs/
271272- `badge_examples()` — Generate various badge examples.
272273- `toc_examples()` — Demonstrate table of contents generation.
273274- `build_custom_readme()` — Build a custom README using formatters.
274- - `run_cli_basic(project_path)` — Run code2docs CLI programmatically.
275- - `run_cli_with_config(project_path, config_path)` — Run with custom configuration.
276275- `generate_readme_simple(project_path)` — Generate README.md content from a project.
277276- `generate_full_documentation(project_path)` — Generate complete documentation for a project.
278277- `custom_documentation_pipeline(project_path)` — Create a custom documentation pipeline.
279278- `inspect_project_structure(project_path)` — Inspect project structure from analysis.
280279- `generate_docs_if_needed(project_path, force)` — Only generate docs if code has changed.
281- - `create_basic_config()` — Create a basic configuration.
282- - `create_advanced_config()` — Create advanced configuration with all options.
283- - `save_yaml_config_example(path)` — Save example YAML config to file.
284- - `load_config_from_yaml(path)` — Load configuration from YAML file.
285280- `detect_flask_endpoints(project_path)` — Detect Flask endpoints in a project.
286281- `detect_fastapi_endpoints(project_path)` — Detect FastAPI endpoints in a project.
287282- `generate_api_docs_from_endpoints(project_path, output_dir)` — Generate API documentation from detected endpoints.
288283- `create_example_web_apps(target_dir)` — Create example Flask and FastAPI apps for testing.
289284- `document_web_project(project_path)` — Complete workflow: detect endpoints and generate docs.
285+ - `run_cli_basic(project_path)` — Run code2docs CLI programmatically.
286+ - `run_cli_with_config(project_path, config_path)` — Run with custom configuration.
287+ - `create_basic_config()` — Create a basic configuration.
288+ - `create_advanced_config()` — Create advanced configuration with all options.
289+ - `save_yaml_config_example(path)` — Save example YAML config to file.
290+ - `load_config_from_yaml(path)` — Load configuration from YAML file.
291+ - `validate_markdown_file(md_path, project_root)` — Validate a single markdown file.
292+ - `validate_markdown_tree(root, patterns, ignore)` — Validate every markdown file under ``root`` matching ``patterns``.
290293- `main()` — code2docs — Auto-generate project documentation from source code.
291294- `generate(project_path, config_path, readme_only, sections)` — Generate documentation (default command).
292295- `sync(project_path, config_path, verbose, dry_run)` — Synchronize documentation with source code changes.
@@ -295,8 +298,6 @@ code2docs/
295298- `check(project_path, config_path, target)` — Health check — verify documentation completeness.
296299- `validate(project_path, pattern, strict)` — Validate generated markdown: broken links, table shape, duplicate headings.
297300- `diff(project_path, config_path)` — Preview what would change without writing anything.
298- - `validate_markdown_file(md_path, project_root)` — Validate a single markdown file.
299- - `validate_markdown_tree(root, patterns, ignore)` — Validate every markdown file under ``root`` matching ``patterns``.
300301- `analyze_and_document(project_path, config)` — Convenience function: analyze a project in one call.
301302
302303
@@ -354,6 +355,7 @@ code2docs/
354355📄 `examples.07_web_frameworks` (5 functions)
355356📄 `examples.advanced_usage`
356357📄 `examples.basic_usage`
358+ 📄 `examples.class_examples`
357359📄 `examples.entry_points`
358360📄 `examples.quickstart`
359361📄 `project`
0 commit comments