You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

code2docs-cli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

code2docs-cli

Code2Docs: An AI-powered, open source CLI tool for generating inline code documentation, API references, database schema docs, and project READMEs from your codebase.

1.3.2
pipPyPI
Maintainers
1

🚀 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

  • Install the CLI:

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

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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts