Skip to content

sapotero/DocGenPlugin

Repository files navigation

KDocGen: Code & Documentation Generator

🛠️ Overview

KDocGen is a powerful IntelliJ IDEA plugin designed to streamline code generation and documentation creation for Kotlin developers.
With a single shortcut, you can instantly generate structured code, comprehensive documentation, and well-organized test cases—reducing manual effort and boosting productivity.

Whether you're writing new functions, documenting existing ones, or setting up test cases, KDocGen ensures your codebase remains clean, well-documented, and maintainable.
By leveraging AI-assisted automation, this plugin helps you focus on writing high-quality logic while handling repetitive tasks.

🔥 Why Use KDocGen?

Automate documentation – No more writing KDocs manually.
Generate missing code – Quickly create function bodies and method stubs.
Simplify testing – Instantly generate Kotest test files for your functions.
Enhance readability – Insert meaningful comments effortlessly.
Generate QA reports – Gain insights into potential issues and improvements.
Seamless IntelliJ IDEA integration – Works smoothly with a single shortcut.

Stay productive, write better code, and let KDocGen handle the rest! 🚀


✨ Features

  • 🔹 Generate function documentation – Insert AI-assisted KDoc for selected functions.
  • 🔹 Process code with AI – Modify, enhance, or analyze selected code based on AI instructions.
  • 🔹 Generate comments – Add meaningful, AI-generated comments to code.
  • 🔹 Generate Kotest tests – Instantly create Kotest test files for selected functions.
  • 🔹 Generate QA reports – Analyze functions and produce detailed reports.
  • 🔹 Seamless integration – Works effortlessly within IntelliJ IDEA using a single shortcut.
  • 🔹 Provider selection – Choose between API providers, including OpenAI, Groq, and a Custom option.

🛠️ Installation

  1. Open IntelliJ IDEA.
  2. Go to PluginsMarketplace.
  3. Search for KDocGen.
  4. Click Install.
  5. Go to SettingsKDocGen Settings.
  6. Click Save, and you're ready to go!

🚀 Usage

⚠️ No OpenAI Account Needed! Use Groq for Free!

Good news! You no longer need an OpenAI account to use KDocGen's AI-powered features.
Simply get a free Groq API key here: Groq Console and start using the plugin instantly!

Alternatively, if you prefer OpenAI, you can still use an OpenAI API Token.

Generating Documentation for a Function

  1. Navigate to the function.
  2. Press [⌘ + N] (on macOS).
  3. Select ✨ Generate KDoc.
  4. The plugin will generate KDoc for the selected function automatically.

Processing Selected Code with AI

  1. Write a comment describing the AI task (e.g., add a function, check for errors, enhance logic, etc.).
  2. Select the relevant code.
  3. Press [⌘ + N] (on macOS).
  4. Select ✨ Process with AI.
  5. The plugin will modify or enhance the selection based on your request.

Generating a Kotest Test for a Function

  1. Navigate to the function.
  2. Press [⌘ + N] (on macOS).
  3. Select ✨ Generate Kotest File.
  4. The plugin will generate a scratch file with a test using BehaviorSpec.

Generating a QA Report

  1. Navigate to the function.
  2. Press [⌘ + N] (on macOS).
  3. Select ✨ Generate QA Report.
  4. The plugin will generate a report highlighting potential issues and improvements.

Generating a Comment for Selected Code

  1. Select a piece of code (e.g., a function or class).
  2. Press [⌘ + N] (on macOS).
  3. Select ✨ Describe Selection.
  4. The plugin will automatically generate a comment.

⚡ Shortcut

Action Shortcut (macOS)
Generate Code & Docs ⌘ + N

📌 Future Enhancements

  • 🔹 Full K2 support for AI-powered features.
  • 🔹 Improved AI-based documentation generation.
  • 🔹 Support for additional languages (e.g., Java).

💡 Enhance your development workflow with automated code & documentation generation!


💖 Support the Project

If you’d like to support the author or have an idea, visit Boosty.

About

DocGenPlugin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages