Skip to main content

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).

Upgrading an Existing Installation

To get the latest version (including new features like Interactive Chat), run the upgrade command corresponding to how you installed it:

# If you used pipx
pipx upgrade documentor-ai

# If you used standard pip
pip install --upgrade documentor-ai

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 default model and API keys:

documentor configure

(You will be prompted for MODEL_NAME, GEMINI_API_KEY, etc. You can just press Enter to leave them empty or fall back to the default gemini/gemini-3.6-flash)

Usage

1. Command Line Interface (CLI)

To generate documentation for a repository, run:

documentor generate /path/to/your/repo

Note on Parsing: Documentor automatically ignores node_modules, dist, .env files, logs, and all .git ignored files by default. If you want to force Documentor to ignore specific files or folders, just create a .docignore file in the root of your project!

More Examples: Generate for the current directory (.) using your configured model:

documentor generate .

Single/Multiple Specific Files: If you only want to generate or regenerate documentation for specific files (for instance, if you only updated a few files in a large project), you can specify them using the --file or -f flag. This will skip ARCHITECTURE.md and QUICKSTART.md and only document the targeted files:

documentor generate . -f src/main.py -f src/utils.py

Generate using Anthropic's Claude (by overriding your default model):

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 .

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 .

Note: The AI assistant is strictly locked down to only answer questions about your documentation. It will politely decline requests to find bugs or answer off-topic queries!

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. The Web UI will automatically load the documentation for your current directory (.). It also features a Fullscreen AI Chat and a Light/Dark Theme toggle!

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
        env:
          # Define your model and map secrets appropriately
          MODEL_NAME: 'gemini/gemini-3.6-flash'
          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 documentor_docs/
          git diff --quiet && git diff --staged --quiet || git commit -m "docs: Auto-update AI documentation"
          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

documentor_ai-0.1.15.tar.gz (38.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

documentor_ai-0.1.15-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file documentor_ai-0.1.15.tar.gz.

File metadata

  • Download URL: documentor_ai-0.1.15.tar.gz
  • Upload date:
  • Size: 38.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for documentor_ai-0.1.15.tar.gz
Algorithm Hash digest
SHA256 fa08f3bb3fe541606c2c8e7dbc465834999ffcdb91ddefec83de033850c72ab7
MD5 7b232de8e64c7df71d46da4e76ce489f
BLAKE2b-256 1d5674d2d8a2d2b1be5564c22a3c4b7426637b421d0eb501f53cd7dc3b9d04eb

See more details on using hashes here.

File details

Details for the file documentor_ai-0.1.15-py3-none-any.whl.

File metadata

  • Download URL: documentor_ai-0.1.15-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.3

File hashes

Hashes for documentor_ai-0.1.15-py3-none-any.whl
Algorithm Hash digest
SHA256 7754744b7b36bf82fd23082a1d23dd52639ef29651a1ff8474c02bacb79e3bc3
MD5 8bb30728c9a4d53c38c8abd5ff0c476b
BLAKE2b-256 0717637e8424aa154b782794caf6bce582cdce60110b1a8bfdbd3ab4326eac97

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page