Autocomment 0.1 release!!

About the project

Autocomment is a Cli tool that automates the process of adding meaningful comments to your source code. By integrating with OpenAI’s language models, Autocomment generates insightful comments that enhance code readability a…


This content originally appeared on DEV Community and was authored by aldrin312

About the project

Autocomment is a Cli tool that automates the process of adding meaningful comments to your source code. By integrating with OpenAI’s language models, Autocomment generates insightful comments that enhance code readability and documentation.

Key Features

  • Supports multiple coding languages: Javascript, C#, C++, TypeScript, ect.
  • Easy and simple.
  • Able to save output to a file.
  • Works in any directory.

Installation Guide

  1. Get a free API Key at https://console.groq.com
  2. Clone the repo
   git clone https://github.com/aldrin312/AutoCommentingTool.git
  1. Install NPM packages
   npm install
   npm install --save groq-sdk
   npm install commander
   npm install dotenv
  1. Create a .env file and add your api into it

    GROQ_API_KEY=<api-key>
    

Usage

To use the CLI tool make sure to change the excecution policies for windows.

To do this run windows powershell in administration mode and run the command:

    Set-ExecutionPolicy RemoteSigned

And then run the command:

    npm link

To create the CLI tool avialable to use in powershell in any directory.

Tool Execution:

    autocomment <filename> ...

Command can also be executed without changing execution policy or running npm link by running this command:

   node index.js <filename> ...

Options:

  • --version or -v: Shows the current version of Autocomment.
  • --help or -h: Shows help menu.
  • --save <output-filename> or -s <output-filename>: saves the output to the output folder with the designated filename.
 autocomment -s <output-filename> <filename>...

Demo:
tool demo

Future features

  • Customization: Allow user to specify how they want the comments to be generated
  • Option to add the api in Cli.
  • Save the outputs to multiple files.
  • File restrictions: Only allow specific file formats.

GitHub link

https://github.com/aldrin312/AutoCommentingTool


This content originally appeared on DEV Community and was authored by aldrin312


Print Share Comment Cite Upload Translate Updates
APA

aldrin312 | Sciencx (2024-09-21T00:04:39+00:00) Autocomment 0.1 release!!. Retrieved from https://www.scien.cx/2024/09/21/autocomment-0-1-release/

MLA
" » Autocomment 0.1 release!!." aldrin312 | Sciencx - Saturday September 21, 2024, https://www.scien.cx/2024/09/21/autocomment-0-1-release/
HARVARD
aldrin312 | Sciencx Saturday September 21, 2024 » Autocomment 0.1 release!!., viewed ,<https://www.scien.cx/2024/09/21/autocomment-0-1-release/>
VANCOUVER
aldrin312 | Sciencx - » Autocomment 0.1 release!!. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/09/21/autocomment-0-1-release/
CHICAGO
" » Autocomment 0.1 release!!." aldrin312 | Sciencx - Accessed . https://www.scien.cx/2024/09/21/autocomment-0-1-release/
IEEE
" » Autocomment 0.1 release!!." aldrin312 | Sciencx [Online]. Available: https://www.scien.cx/2024/09/21/autocomment-0-1-release/. [Accessed: ]
rf:citation
» Autocomment 0.1 release!! | aldrin312 | Sciencx | https://www.scien.cx/2024/09/21/autocomment-0-1-release/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.