AI-powered documentation gatekeeper and architecture visualizer.
avdoc provides tools to analyze and improve repository documentation. It can evaluate codebases to generate a documentation quality score, automatically generate missing documentation, and produce architecture diagrams.
cargo install avdoccurl -sSf https://raw.githubusercontent.com/Aryan-202/avdoc/main/install.sh | shirm https://raw.githubusercontent.com/Aryan-202/avdoc/main/install.ps1 | iexDownload the pre-built binary for your platform from the latest release:
| Platform | Binary |
|---|---|
| Linux x86_64 | avdoc-linux-x86_64 |
| Linux ARM64 | avdoc-linux-arm64 |
| macOS x86_64 | avdoc-macos-x86_64 |
| macOS ARM64 (Apple Silicon) | avdoc-macos-arm64 |
| Windows x86_64 | avdoc-windows-x86_64.exe |
- An API key from OpenAI, Anthropic, or a compatible provider
- Set one of the following environment variables before use:
export OPENAI_API_KEY=your_key_here
# or
export ANTHROPIC_API_KEY=your_key_here
# or
export AVDOC_API_KEY=your_key_hereTo use a specific model, set:
export AVDOC_MODEL=gpt-4o # defaults to gpt-3.5-turboLint the repository to evaluate documentation coverage and quality.
avdoc lint [OPTIONS]| Option | Description |
|---|---|
--path <DIRECTORY> |
Path to the repository (defaults to current directory) |
--min-score <SCORE> |
Enforce a minimum documentation score from 0 to 100 |
--format <FORMAT> |
Output format: terminal, json, markdown |
Examples:
# Lint current directory
avdoc lint
# Fail CI if score drops below 80
avdoc lint --min-score 80
# Output as JSON
avdoc lint --format json
# Lint a specific repo path
avdoc lint --path ./my-projectGenerate architecture diagrams and visually map the repository structure.
avdoc diagram [OPTIONS]| Option | Description |
|---|---|
--path <DIRECTORY> |
Path to the repository |
--format <FORMAT> |
Output format: mermaid (default), ascii |
--update-readme |
Automatically append the diagram to README.md |
Examples:
# Generate a Mermaid diagram
avdoc diagram
# Generate ASCII diagram
avdoc diagram --format ascii
# Generate and append to README
avdoc diagram --update-readmeAnalyze and automatically generate missing documentation for the codebase using AI.
avdoc heal [OPTIONS]| Option | Description |
|---|---|
--path <DIRECTORY> |
Path to the repository |
--files <FILES>... |
Target specific files; if omitted, targets all low-scoring files |
--interactive |
Ask for confirmation before applying each change |
Examples:
# Heal all underdocumented files
avdoc heal
# Heal specific files
avdoc heal --files src/main.rs src/lib.rs
# Review each change before applying
avdoc heal --interactiveRe-run your original install command to get the latest version. If you installed via cargo:
cargo install avdocavdoc follows semantic versioning: patch versions (0.1.x) are bug fixes, minor versions (0.x.0) add new features, and major versions (x.0.0) indicate breaking changes.
avdoc currently parses and scores documentation for:
- Rust
- Python
- JavaScript / TypeScript
- Go
- Java
- C / C++
You can use avdoc as a documentation gate in CI pipelines. It exits with a non-zero code if the score falls below the minimum:
# GitHub Actions example
- name: Check documentation score
run: avdoc lint --min-score 70
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}MIT License — see LICENSE for details.