Code2Docs: An AI-powered, open source CLI tool for generating inline code documentation, API references, database schema docs, and project READMEs from your codebase.
Project description
🚀 Code2Docs CLI
Code2Docs is an AI-powered CLI tool that helps you generate high-quality documentation for your codebase — including inline docstrings, API documentation, database schema descriptions, and project READMEs.
⚠️ This project is still under active development. Expect new features and improvements regularly.
📚 Base Repo: https://github.com/xKarinSan/Code2Docs
💬 Community Discord: https://discord.gg/qugCeYBYud
🌐 Landing Page: https://code2docs-open-source.netlify.app/
🔗 LinkedIn: https://www.linkedin.com/company/code2docs
✨ Features
- 📄 Inline documentation (docstrings + inline comments)
- 📡 API endpoint documentation (coming soon)
- 🧩 Database schema documentation (coming soon)
- 📘 README.md generation (coming soon)
- 🗂️ Architecture diagram generation (coming soon)
🔐 Requirements
- Python 3.8 or newer
- An OpenAI API key
- A Git-initialized codebase
🧪 Installation
-
Install the CLI:
pip install code2docs-cli -
Run the CLI:
c2d
🚀 Getting Started
To begin using Code2Docs:
- Make sure your project is inside a Git repository.
- Get your OpenAI API key from platform.openai.com.
- Save your API key locally using:
c2d save-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- You’re ready to generate documentation!
🛠️ CLI Commands
--help
Lists ALL the commands for Code2Docs CLI
code-doc
Generates inline documentation (docstrings and comments) for your codebase.
c2d code-doc
api-doc (Coming Soon)
Generates documentation for your API endpoints.
c2d api-doc
db-doc (Coming Soon)
Generates documentation for your database schema.
c2d db-doc
readme-doc (Coming Soon)
Generates a project-level README.md based on your codebase.
c2d readme-doc
archi-doc (Coming Soon)
Generates an architecture diagram based on the structure of your codebase.
c2d archi-doc
archi-doc (Coming Soon)
Generates an architecture diagram based on the structure of your codebase.
c2d archi-doc
save-key
Saves your OpenAI API key locally for authentication.
c2d save-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
load-key
Displays the currently saved OpenAI API key.
c2d load-key
--help
Displays all available commands and usage.
c2d --help
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 code2docs_cli-1.2.0.tar.gz.
File metadata
- Download URL: code2docs_cli-1.2.0.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.9 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c47dcab5f67c09e5541bfec41f6979be410dd7aa501672f416acee490bd57a57
|
|
| MD5 |
9092279e882f3218c265c4cf9035d671
|
|
| BLAKE2b-256 |
b3b5c8f3cce9c2775386d7b1c4329c9789b1307c7dae98a7410554eefc4bd453
|
File details
Details for the file code2docs_cli-1.2.0-py3-none-any.whl.
File metadata
- Download URL: code2docs_cli-1.2.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.9 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bf6da9407e1267808453a2393c8e074f128969305e6eb012e9dff2348c969fd6
|
|
| MD5 |
e2fbe835a7e0199846fe2dc4bff20966
|
|
| BLAKE2b-256 |
bc6295313c21b11653fc2b7b17d3c2fcbf2e3feabf54658cfb432128a60f3b9f
|