Skip to main content

Automate software documentation using AI (Gemini & K2 Think).

Project description

doced

Automate software documentation using AI reasoning.

doced is a CLI tool that scans your codebase, interviews you with intelligent questions, and generates comprehensive documentation including README, tutorials, architecture diagrams, and PDFs.

Features

  • 🔍 Smart Codebase Scanning - Respects .gitignore and intelligently filters files
  • 🤖 Multi-AI Approach - Uses Gemini for architecture mapping and K2 Think for deep reasoning
  • 💬 Interactive Interview - AI generates targeted questions based on your code
  • 📚 Comprehensive Docs - Generates README, tutorials, architecture docs, and PDFs
  • 🎨 Customizable Styles - Choose between Corporate/Creative tones and Brief/Detailed levels
  • 📊 Mermaid Diagrams - Automatically generates architecture and flow diagrams

Installation

Recommended (Auto-handles PATH)

pip install pipx
pipx install doced
pipx ensurepath

Alternative

pip install doced

Development Setup

# Clone the repo
git clone https://github.com/qmamab/doced.git
cd doced

# Install dependencies
pip install -r requirements.txt

Usage

1. Initialize (First Time Setup)

doced init

Sometimes that doesnt work on mac's, so try

python3 -m doced init

You'll be prompted for:

  • Gemini API Key
  • K2 Think API Key
  • Documentation Style (Corporate/Creative)
  • Detail Level (Brief/Detailed)

2. Generate Documentation

# In your project directory
doced create

The tool will:

  1. Scan your codebase
  2. Analyze architecture with Gemini
  3. Generate intelligent questions with K2 Think
  4. Interview you interactively
  5. Create comprehensive documentation in docs/
    • README.md
    • TUTORIAL.md
    • ARCHITECTURE.md
    • Documentation.pdf

API Configuration

Gemini API

K2 Think API

  • Model: MBZUAI-IFM/K2-Think
  • Endpoint: https://api.k2think.ai/v2/chat/completions
  • Rate Limit: 20 RPM
  • Get your key: Contact K2 Think team

Project Structure

doced/
├── pyproject.toml        # Dependencies and metadata
└── src/
    └── doced/
        ├── main.py       # CLI and orchestration
        └── scanner.py    # Code scanning logic

Configuration

Your config is stored at ~/.doced/config.json. You can re-run doced init to update it.

Troubleshooting

Import Errors

Make sure you're in the virtual environment:

source .venv/bin/activate

API Errors

  • Verify your API keys are correct
  • Check rate limits (K2 Think: 20 RPM)
  • Ensure you're using the correct model names

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doced-3.1.0.tar.gz (23.4 kB view details)

Uploaded Source

Built Distribution

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

doced-3.1.0-py3-none-any.whl (24.9 kB view details)

Uploaded Python 3

File details

Details for the file doced-3.1.0.tar.gz.

File metadata

  • Download URL: doced-3.1.0.tar.gz
  • Upload date:
  • Size: 23.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for doced-3.1.0.tar.gz
Algorithm Hash digest
SHA256 4687cc47cbfb57d7cf5b787a01e144b938bb5e2827f85a4d225b03fae36a1e6b
MD5 4f0f8f4cfec1140a0bb19ddc209242a7
BLAKE2b-256 c0f1a99506a1286837a3f4e13b20492bfc719ac77e36788c3c3e1b315f799e30

See more details on using hashes here.

File details

Details for the file doced-3.1.0-py3-none-any.whl.

File metadata

  • Download URL: doced-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for doced-3.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54ae0fd5c10ab3e87f625efe8d9530e22ca82d862f7fa66189cd86cabfbf1e16
MD5 b308ab97b1f92e8bab4726af4ff37dfd
BLAKE2b-256 23aebbd6fc1bf8fff5c0f3f1be952f56b1cd7d3940740711e791cec74289dae2

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