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
- Get a free API Key at https://console.groq.com
- Clone the repo
git clone https://github.com/aldrin312/AutoCommentingTool.git
- Install NPM packages
npm install
npm install --save groq-sdk
npm install commander
npm install dotenv
-
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>...
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
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/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.