Skip to main content

🚀 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) (beta)
  • 📡 API endpoint documentation (coming soon)
  • 🧩 Database schema documentation (coming soon)
  • 📘 README.md generation (coming soon)
  • 🗂️ Architecture diagram generation (beta)

🔐 Requirements

  • Python 3.8 or newer
  • An OpenAI API key
  • A Git-initialized codebase

🧪 Installation

  1. Install the CLI:

    pip install code2docs-cli
    
  2. Run the CLI to verify the installation:

    c2d
    

🚀 Getting Started

To begin using Code2Docs:

  1. Make sure your project is inside a Git repository.
  2. Get your OpenAI API key from platform.openai.com.
  3. Save your API key locally using:
c2d save-key sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
  1. You’re ready to generate documentation!

🛠️ CLI Commands

--help

Lists ALL the commands for Code2Docs CLI

code-doc(Beta)

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 (Beta)

Generates a project-level README.md based on your codebase.

c2d readme-doc

archi-doc (Beta)

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

Metadata

Release files for code2docs-cli 1.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for code2docs-cli 1.3.2
File Size Uploaded Provenance Actions
code2docs_cli-1.3.2.tar.gz 10.6 kB Without provenance Details for code2docs_cli-1.3.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for code2docs-cli 1.3.2
File Interpreter ABI Platform Actions
code2docs_cli-1.3.2-py3-none-any.whl Python 3 none any Details for code2docs_cli-1.3.2-py3-none-any.whl

Total release size: 22.8 kB

Release files / code2docs_cli-1.3.2.tar.gz

Download URL code2docs_cli-1.3.2.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e3d79854bcc3703da30358116b2342068a212cfeb7a701e84e32da95fd5c4559
BLAKE2b-256 checksum
How to use checksums
c88acf54b6502d5095a779a7a7b766e9e3f6ee049810643b5fd9fb7dd9f895d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.9 Darwin/24.5.0

Release files / code2docs_cli-1.3.2-py3-none-any.whl

Download URL code2docs_cli-1.3.2-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a8ae9594c517501d1fa9c9b43431cc091987e49f5c86dc0a87e2f31399cbeb18
BLAKE2b-256 checksum
How to use checksums
6857a1243f4c79981849538c01d67b2c18f42849a6743127b49f9b77a936e7e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.9 Darwin/24.5.0

Security for code2docs-cli 1.3.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page