Skip to main content

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

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

code2docs_cli-1.3.1.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

code2docs_cli-1.3.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file code2docs_cli-1.3.1.tar.gz.

File metadata

  • Download URL: code2docs_cli-1.3.1.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.9 Darwin/21.6.0

File hashes

Hashes for code2docs_cli-1.3.1.tar.gz
Algorithm Hash digest
SHA256 7eb765cfad033c9430154d100e65aac70800f865bb28af747bbb51764a8ff6ff
MD5 05551de872d9a55c53cbf4a572e9b9ef
BLAKE2b-256 91643a3a524daed308a5b6d771c13bbe5b3cb01ac0568b5a66d0345db33fe36d

See more details on using hashes here.

File details

Details for the file code2docs_cli-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: code2docs_cli-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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

Hashes for code2docs_cli-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc80e1d903b615c994d476711bd451f008155352c16647191bfe1c69807eb14e
MD5 21855f9d3f84b0b371a0c0c9a5bbf8f0
BLAKE2b-256 87abe25cd869dfe52f03bd44fb5432b6a51ae3ad0e40dd5a54a0fe506a2e7b7d

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