codedoc-ai 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- codedoc_ai-0.1.4/.env.example +23 -0
- codedoc_ai-0.1.4/.github/ISSUE_TEMPLATE/bug_report.md +43 -0
- codedoc_ai-0.1.4/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- codedoc_ai-0.1.4/.github/PULL_REQUEST_TEMPLATE.md +21 -0
- codedoc_ai-0.1.4/CHANGELOG.md +66 -0
- codedoc_ai-0.1.4/CODE_OF_CONDUCT.md +18 -0
- codedoc_ai-0.1.4/CONTRIBUTING.md +65 -0
- codedoc_ai-0.1.4/LICENSE +21 -0
- codedoc_ai-0.1.4/MANIFEST.in +10 -0
- codedoc_ai-0.1.4/PKG-INFO +500 -0
- codedoc_ai-0.1.4/README.md +465 -0
- codedoc_ai-0.1.4/SECURITY.md +22 -0
- codedoc_ai-0.1.4/codedoc/__init__.py +18 -0
- codedoc_ai-0.1.4/codedoc/__main__.py +7 -0
- codedoc_ai-0.1.4/codedoc/agents/__init__.py +13 -0
- codedoc_ai-0.1.4/codedoc/agents/base_agent.py +112 -0
- codedoc_ai-0.1.4/codedoc/agents/dependency_agent.py +71 -0
- codedoc_ai-0.1.4/codedoc/agents/documentation_agent.py +95 -0
- codedoc_ai-0.1.4/codedoc/agents/orchestrator.py +172 -0
- codedoc_ai-0.1.4/codedoc/agents/structure_agent.py +71 -0
- codedoc_ai-0.1.4/codedoc/bootstrap.py +28 -0
- codedoc_ai-0.1.4/codedoc/cli/__init__.py +3 -0
- codedoc_ai-0.1.4/codedoc/cli/cli.py +168 -0
- codedoc_ai-0.1.4/codedoc/core/__init__.py +40 -0
- codedoc_ai-0.1.4/codedoc/core/db.py +226 -0
- codedoc_ai-0.1.4/codedoc/core/graph.py +219 -0
- codedoc_ai-0.1.4/codedoc/core/loader.py +161 -0
- codedoc_ai-0.1.4/codedoc/core/output.py +123 -0
- codedoc_ai-0.1.4/codedoc/core/project_view.py +269 -0
- codedoc_ai-0.1.4/codedoc/core/queue.py +137 -0
- codedoc_ai-0.1.4/codedoc/core/scanner.py +185 -0
- codedoc_ai-0.1.4/codedoc/llm/__init__.py +4 -0
- codedoc_ai-0.1.4/codedoc/llm/api_provider.py +89 -0
- codedoc_ai-0.1.4/codedoc/llm/base.py +60 -0
- codedoc_ai-0.1.4/codedoc/llm/factory.py +76 -0
- codedoc_ai-0.1.4/codedoc/llm/local_provider.py +70 -0
- codedoc_ai-0.1.4/codedoc/parser/__init__.py +3 -0
- codedoc_ai-0.1.4/codedoc/parser/factory.py +70 -0
- codedoc_ai-0.1.4/codedoc/parser/generic_parser.py +88 -0
- codedoc_ai-0.1.4/codedoc/parser/python_parser.py +54 -0
- codedoc_ai-0.1.4/codedoc/parser/react_parser.py +60 -0
- codedoc_ai-0.1.4/codedoc/pipeline.py +264 -0
- codedoc_ai-0.1.4/codedoc/utils/__init__.py +16 -0
- codedoc_ai-0.1.4/codedoc/utils/errors.py +112 -0
- codedoc_ai-0.1.4/codedoc/utils/logger.py +47 -0
- codedoc_ai-0.1.4/codedoc_ai.egg-info/PKG-INFO +500 -0
- codedoc_ai-0.1.4/codedoc_ai.egg-info/SOURCES.txt +74 -0
- codedoc_ai-0.1.4/codedoc_ai.egg-info/dependency_links.txt +1 -0
- codedoc_ai-0.1.4/codedoc_ai.egg-info/entry_points.txt +2 -0
- codedoc_ai-0.1.4/codedoc_ai.egg-info/requires.txt +13 -0
- codedoc_ai-0.1.4/codedoc_ai.egg-info/top_level.txt +1 -0
- codedoc_ai-0.1.4/pyproject.toml +57 -0
- codedoc_ai-0.1.4/setup.cfg +4 -0
- codedoc_ai-0.1.4/tests/__init__.py +0 -0
- codedoc_ai-0.1.4/tests/fixtures/flutter_app/app.dart +0 -0
- codedoc_ai-0.1.4/tests/fixtures/flutter_app/main.dart +0 -0
- codedoc_ai-0.1.4/tests/fixtures/java_app/Main.java +0 -0
- codedoc_ai-0.1.4/tests/fixtures/java_app/Service.java +0 -0
- codedoc_ai-0.1.4/tests/fixtures/python_app/__pycache__/main.cpython-312.pyc +0 -0
- codedoc_ai-0.1.4/tests/fixtures/python_app/__pycache__/models.cpython-312.pyc +0 -0
- codedoc_ai-0.1.4/tests/fixtures/python_app/__pycache__/utils.cpython-312.pyc +0 -0
- codedoc_ai-0.1.4/tests/fixtures/python_app/main.py +0 -0
- codedoc_ai-0.1.4/tests/fixtures/python_app/models.py +0 -0
- codedoc_ai-0.1.4/tests/fixtures/python_app/utils.py +0 -0
- codedoc_ai-0.1.4/tests/fixtures/react_app/App.tsx +0 -0
- codedoc_ai-0.1.4/tests/fixtures/react_app/index.html +0 -0
- codedoc_ai-0.1.4/tests/fixtures/react_app/main.tsx +0 -0
- codedoc_ai-0.1.4/tests/fixtures/react_app/router.tsx +0 -0
- codedoc_ai-0.1.4/tests/fixtures/react_sample.tsx +0 -0
- codedoc_ai-0.1.4/tests/test_agents.py +143 -0
- codedoc_ai-0.1.4/tests/test_graph.py +57 -0
- codedoc_ai-0.1.4/tests/test_llm_mock.py +170 -0
- codedoc_ai-0.1.4/tests/test_parser.py +96 -0
- codedoc_ai-0.1.4/tests/test_pipeline.py +327 -0
- codedoc_ai-0.1.4/tests/test_queue.py +83 -0
- codedoc_ai-0.1.4/tests/test_scanner.py +47 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Copy this file to .env in the project you want to document.
|
|
2
|
+
# Do not commit .env to Git.
|
|
3
|
+
|
|
4
|
+
# OpenAI or OpenAI-compatible providers
|
|
5
|
+
# OPENAI_API_KEY=sk-your-openai-key
|
|
6
|
+
|
|
7
|
+
# Anthropic Claude
|
|
8
|
+
# ANTHROPIC_API_KEY=sk-ant-your-anthropic-key
|
|
9
|
+
|
|
10
|
+
# Generic fallback API key used by codedoc when provider-specific keys are absent
|
|
11
|
+
# LLM_API_KEY=your-api-key
|
|
12
|
+
|
|
13
|
+
# Local LLM mode: Ollama, LM Studio, llama.cpp server, or another OpenAI-compatible server
|
|
14
|
+
# LLM_MODE=local
|
|
15
|
+
# API_BASE_URL=http://localhost:11434/v1
|
|
16
|
+
|
|
17
|
+
# Optional model and output settings
|
|
18
|
+
# MODEL_NAME=gpt-4o-mini
|
|
19
|
+
# OUTPUT_DIR=docs_output
|
|
20
|
+
# LOG_LEVEL=INFO
|
|
21
|
+
|
|
22
|
+
# Strict project-relative ignore paths, separated by semicolons
|
|
23
|
+
# CODEDOC_IGNORE_PATHS=/myenv;services/generated
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug report
|
|
3
|
+
about: Report a reproducible problem in codedoc-ai
|
|
4
|
+
title: "[Bug]: "
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What happened?
|
|
10
|
+
|
|
11
|
+
Describe the bug clearly.
|
|
12
|
+
|
|
13
|
+
## How to reproduce
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
# command you ran
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Expected behavior
|
|
20
|
+
|
|
21
|
+
What did you expect to happen?
|
|
22
|
+
|
|
23
|
+
## Environment
|
|
24
|
+
|
|
25
|
+
- OS:
|
|
26
|
+
- Python version:
|
|
27
|
+
- codedoc-ai version:
|
|
28
|
+
- LLM mode: `api` or `local`
|
|
29
|
+
- Model:
|
|
30
|
+
|
|
31
|
+
## Config
|
|
32
|
+
|
|
33
|
+
Paste relevant config without secrets.
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Logs or error output
|
|
40
|
+
|
|
41
|
+
```text
|
|
42
|
+
paste logs here
|
|
43
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature request
|
|
3
|
+
about: Suggest an improvement for codedoc-ai
|
|
4
|
+
title: "[Feature]: "
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ""
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Problem
|
|
10
|
+
|
|
11
|
+
What problem would this solve?
|
|
12
|
+
|
|
13
|
+
## Proposed solution
|
|
14
|
+
|
|
15
|
+
What would you like `codedoc-ai` to do?
|
|
16
|
+
|
|
17
|
+
## Alternatives considered
|
|
18
|
+
|
|
19
|
+
Any other approach you considered?
|
|
20
|
+
|
|
21
|
+
## Additional context
|
|
22
|
+
|
|
23
|
+
Add examples, links, or screenshots if useful.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
## Summary
|
|
2
|
+
|
|
3
|
+
Describe what this pull request changes.
|
|
4
|
+
|
|
5
|
+
## Type of change
|
|
6
|
+
|
|
7
|
+
- [ ] Bug fix
|
|
8
|
+
- [ ] New feature
|
|
9
|
+
- [ ] Documentation
|
|
10
|
+
- [ ] Refactor
|
|
11
|
+
- [ ] Tests
|
|
12
|
+
|
|
13
|
+
## Verification
|
|
14
|
+
|
|
15
|
+
- [ ] `python -m pytest`
|
|
16
|
+
- [ ] `python -m build`
|
|
17
|
+
- [ ] `python -m twine check dist/*`
|
|
18
|
+
|
|
19
|
+
## Notes
|
|
20
|
+
|
|
21
|
+
Anything reviewers should pay special attention to?
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.1.4 - 2026-05-02
|
|
4
|
+
|
|
5
|
+
- Redesigned **public output structure** for cleaner, AI-friendly documentation.
|
|
6
|
+
- Separated **internal cache (`codedoc_db.json`)** from **public output (`codedoc.json` / `codedoc.md`)**.
|
|
7
|
+
- Added **project-level overview** including entry file, file count, languages, and folder summary.
|
|
8
|
+
- Added **project tree visualization** in both JSON and Markdown outputs.
|
|
9
|
+
- Added **folder-based grouping** with summarized purpose and file listings.
|
|
10
|
+
- Introduced **dependency graph** with internal file relationships and external dependencies.
|
|
11
|
+
- Flattened file structure in public output:
|
|
12
|
+
- Removed nested and duplicated `result` / `documentation` blocks.
|
|
13
|
+
- Consolidated descriptions, roles, functions, classes, and exports into a single clean structure.
|
|
14
|
+
- Added **file-level linking metadata**:
|
|
15
|
+
- `internal_dependencies`
|
|
16
|
+
- `external_dependencies`
|
|
17
|
+
- `imported_by`
|
|
18
|
+
- Removed **author and git metadata** from public output by default.
|
|
19
|
+
- Improved **Markdown output (`--format md`)**:
|
|
20
|
+
- Added Project Overview, Tree, Folder Map, Dependency Map, and structured file summaries.
|
|
21
|
+
- Ensured **format-specific output behavior**:
|
|
22
|
+
- `--format md` → only `codedoc.md`
|
|
23
|
+
- `--format json` → only `codedoc.json`
|
|
24
|
+
- `--format both` → both files
|
|
25
|
+
- Added **clear CLI and pipeline logging**:
|
|
26
|
+
- Displays selected output format
|
|
27
|
+
- Displays exact output file path
|
|
28
|
+
- Added **BOM-safe file reading (`utf-8-sig`)** across Python, JS/TS, and generic parsers.
|
|
29
|
+
- Ensured **language-agnostic processing** (no Python-only assumptions).
|
|
30
|
+
- Added tests for:
|
|
31
|
+
- New public output structure
|
|
32
|
+
- Markdown generation
|
|
33
|
+
- Dependency graph presence
|
|
34
|
+
- Cross-language compatibility (including TS/TSX)
|
|
35
|
+
- Cleaned up public output by removing:
|
|
36
|
+
- Cache history
|
|
37
|
+
- Raw agent responses
|
|
38
|
+
- Redundant description fields
|
|
39
|
+
|
|
40
|
+
## 0.1.3 - 2026-05-02
|
|
41
|
+
|
|
42
|
+
- Changed generated docs to one combined JSON file by default.
|
|
43
|
+
- Added `--format json|md|both` output selection.
|
|
44
|
+
- Added smart content-hash reuse for unchanged and duplicate files.
|
|
45
|
+
- Added cache-based output regeneration when selected docs are missing.
|
|
46
|
+
- Redesigned public output with project overview, tree, folder map, dependency graph, and flattened file summaries.
|
|
47
|
+
- Removed local author metadata and raw agent result duplication from public output.
|
|
48
|
+
- Expanded public README with provider setup, defaults, config, output, and cache behavior.
|
|
49
|
+
|
|
50
|
+
## 0.1.1 - 2026-05-01
|
|
51
|
+
|
|
52
|
+
- Added safer default scanning for virtual environments such as `myenv`.
|
|
53
|
+
- Added configurable `skip_dirs`.
|
|
54
|
+
- Added strict project-relative ignore paths through CLI, config, environment, and Python API.
|
|
55
|
+
- Added `--ignore PATH` CLI option.
|
|
56
|
+
- Added scanner tests for virtual environment and strict path ignores.
|
|
57
|
+
- Fixed misleading API key warning when CLI overrides select local LLM mode.
|
|
58
|
+
|
|
59
|
+
## 0.1.0 - 2026-05-01
|
|
60
|
+
|
|
61
|
+
- Initial alpha release.
|
|
62
|
+
- Added entry-file dependency traversal.
|
|
63
|
+
- Added local and API LLM provider support.
|
|
64
|
+
- Added per-file Markdown and JSON output.
|
|
65
|
+
- Added `_index.json`, `_summary.md`, and incremental `codedoc_db.json` memory.
|
|
66
|
+
- Added CLI and Python API entry points.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Code of Conduct
|
|
2
|
+
|
|
3
|
+
This project is intended to be a welcoming, practical space for people building developer tools.
|
|
4
|
+
|
|
5
|
+
## Expected Behavior
|
|
6
|
+
|
|
7
|
+
- Be respectful and constructive.
|
|
8
|
+
- Assume good intent, but accept correction.
|
|
9
|
+
- Keep criticism focused on code, design, documentation, and project direction.
|
|
10
|
+
- Help make issues and pull requests clear for future readers.
|
|
11
|
+
|
|
12
|
+
## Unacceptable Behavior
|
|
13
|
+
|
|
14
|
+
- Harassment, insults, threats, or personal attacks.
|
|
15
|
+
- Publishing private information or secrets.
|
|
16
|
+
- Disruptive behavior that makes collaboration harder.
|
|
17
|
+
|
|
18
|
+
Maintainers may close issues, remove comments, or block users who repeatedly violate these expectations.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Contributing
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve `codedoc-ai`.
|
|
4
|
+
|
|
5
|
+
## How Contributions Work
|
|
6
|
+
|
|
7
|
+
1. Fork the repository.
|
|
8
|
+
2. Create a branch from `main`.
|
|
9
|
+
3. Make your changes.
|
|
10
|
+
4. Add or update tests when behavior changes.
|
|
11
|
+
5. Run the verification commands.
|
|
12
|
+
6. Open a pull request with a clear description.
|
|
13
|
+
|
|
14
|
+
## Development Setup
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git clone https://github.com/atharvm416/codedoc-ai.git
|
|
18
|
+
cd codedoc-ai
|
|
19
|
+
python -m venv .venv
|
|
20
|
+
.venv\Scripts\activate
|
|
21
|
+
pip install -e ".[dev]"
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
On macOS/Linux:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
source .venv/bin/activate
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Verification
|
|
31
|
+
|
|
32
|
+
Run these before opening a pull request:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
python -m pytest
|
|
36
|
+
python -m build
|
|
37
|
+
python -m twine check dist/*
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Good First Contributions
|
|
41
|
+
|
|
42
|
+
- Add parser fixtures for more frameworks.
|
|
43
|
+
- Improve import resolution for a specific language.
|
|
44
|
+
- Add tests for edge cases in dependency traversal.
|
|
45
|
+
- Improve documentation examples.
|
|
46
|
+
- Add provider support for another OpenAI-compatible local server.
|
|
47
|
+
|
|
48
|
+
## Pull Request Guidelines
|
|
49
|
+
|
|
50
|
+
- Keep changes focused.
|
|
51
|
+
- Explain why the change is needed.
|
|
52
|
+
- Include before/after behavior when fixing a bug.
|
|
53
|
+
- Do not commit `.env`, API keys, `docs_output`, `codedoc_db.json`, `dist`, or virtual environments.
|
|
54
|
+
- Keep generated artifacts out of pull requests unless a maintainer asks for them.
|
|
55
|
+
|
|
56
|
+
## Reporting Bugs
|
|
57
|
+
|
|
58
|
+
Please include:
|
|
59
|
+
|
|
60
|
+
- Your operating system.
|
|
61
|
+
- Python version.
|
|
62
|
+
- `codedoc-ai` version.
|
|
63
|
+
- The command you ran.
|
|
64
|
+
- Relevant config without secrets.
|
|
65
|
+
- A small reproduction project or fixture when possible.
|
codedoc_ai-0.1.4/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Atharv Mannur
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|