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
.gitignoreand 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:
- Scan your codebase
- Analyze architecture with Gemini
- Generate intelligent questions with K2 Think
- Interview you interactively
- Create comprehensive documentation in
docs/README.mdTUTORIAL.mdARCHITECTURE.mdDocumentation.pdf
API Configuration
Gemini API
- Model:
gemini-2.0-flash-latest - Get your key: https://makersuite.google.com/app/apikey
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
Release history Release notifications | RSS feed
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 doced-1.0.2.tar.gz.
File metadata
- Download URL: doced-1.0.2.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffa416dcc3e258e1e5055b952d63ca25cb13fcfd6835adbce13f7e3defdcf57b
|
|
| MD5 |
cab511043324c1e22f972d42bc6712f9
|
|
| BLAKE2b-256 |
eacd823a4677ac13c06f7c35a30865c89bed462ef34fae771f4d26bed29ec466
|
File details
Details for the file doced-1.0.2-py3-none-any.whl.
File metadata
- Download URL: doced-1.0.2-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ef86c1b7e3a0ab76ce830f2016b9f43d69e1dba37db148aec10de41c33f6134
|
|
| MD5 |
9df7433e7170a40a0682073971004a7f
|
|
| BLAKE2b-256 |
487f7efb8d233fa66a455ee086a3d77baa81ec44150893873c045217ae306185
|