Documentor
An enterprise-grade AI documentation suite. It ingests a codebase, parses it semantically, generates accurate documentation using LLMs, and serves it via CLI, Web UI, and CI/CD pipelines.
Installation
Recommended Method (pipx)
Because Documentor is a standalone CLI tool, the best way to install it on modern Linux/macOS systems (which enforce PEP 668) is using pipx. This installs Documentor in an isolated environment while exposing the CLI globally.
# If you don't have pipx installed: python3 -m pip install --user pipx
pipx install documentor-ai
Alternative Methods
If you are inside an active virtual environment (like .venv/), you can use standard pip:
pip install documentor-ai
(Note: If you attempt this globally on newer Linux distributions without pipx, you will get an externally-managed-environment error. You can bypass this by appending --break-system-packages, though pipx is heavily preferred).
BYO-LLM (Bring Your Own LLM)
Documentor uses LiteLLM under the hood, allowing you to use your preferred model (OpenAI, Anthropic, Gemini, DeepSeek, local models via Ollama, etc.).
Run the interactive setup command to configure your API keys:
documentor configure
(Alternatively, you can just export your keys directly in your terminal, e.g. export OPENAI_API_KEY="sk-...")
Usage
1. Command Line Interface (CLI)
To generate documentation for a repository, run:
documentor generate /path/to/your/repo --model gemini/gemini-3.6-flash
More Examples:
Generate for the current directory (.) using Google's fast Gemini Flash model:
documentor generate . --model gemini/gemini-3.6-flash
Generate using Anthropic's Claude:
documentor generate . --model claude-3-5-sonnet-20240620
2. Chat with your Codebase (RAG)
Once the repository is indexed, you can ask questions about your codebase.
Interactive Chat Mode (Recommended):
If you run chat without providing a specific question, it will drop you into an interactive terminal where you can chat continuously!
documentor chat --path . --model gemini/gemini-3.6-flash
Single Question Mode: If you just want a quick answer, you can provide the question directly:
documentor chat "How does the authentication system work?" --path . --model gemini/gemini-3.6-flash
3. Web UI (Playground)
Prefer a visual interface? Spin up the beautifully designed, glassmorphic Web UI:
documentor serve --port 8000
Then open http://localhost:8000 in your browser.
3. GitHub Action (CI/CD)
Documentor comes packaged as a lightning-fast Docker Action. You can automate documentation generation on your Pull Requests by creating .github/workflows/documentor.yml in your target repository:
name: Generate AI Docs
on:
pull_request:
branches: [ main ]
jobs:
docs:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: nirajmatere/documentor@main
with:
model: 'gemini/gemini-3.6-flash'
env:
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
- run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git add docs/ ARCHITECTURE.md QUICKSTART.md
git commit -m "docs: Auto-update AI documentation" || echo "No changes to commit"
git push
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file documentor_ai-0.1.1.tar.gz.
File metadata
- Download URL: documentor_ai-0.1.1.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
304c44c6ee60e0cfccce10deba7d9dcc859df215f74f17c6016ee8037d3d3038
|
|
| MD5 |
0da5d0027990bc1f558eda50396cbf25
|
|
| BLAKE2b-256 |
d3b71f817cbe16eb70992b2b2a6716aa93473e808709efa124c06ad0fa54bfbc
|
File details
Details for the file documentor_ai-0.1.1-py3-none-any.whl.
File metadata
- Download URL: documentor_ai-0.1.1-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
def0981103761339e2aa270732ccbc513ce07abe184dd1e7a1231e3f91216ab5
|
|
| MD5 |
604569a2fe3c701807ad0bc71052bea8
|
|
| BLAKE2b-256 |
648c526e330e999054d33fe47b9406a9dc40bcee69e7a41c8d7143dc3defd7ea
|