CodeTalk is an AI-powered CLI tool designed to streamline code commenting. It leverages the OpenAI API to generate clear, concise comments for your code, enhancing documentation and improving code readability effortlessly.
- AI-Powered Commenting: Automatically generate comments for functions, classes, and complex logic.
- Flexible Usage: Comment on all files, select specific files, or use file patterns.
- User-Friendly CLI: Intuitive command-line interface for easy interaction.
- Authentication: Users can sign up or log in using their email and password.
- Daily Comment Limit: Users have a limit on the number of comments they can make per day (default is 5).
-
Clone the CodeTalk repository:
git clone https://github.com/Suhaib3100/codetalk
-
Navigate to the project directory:
cd codetalk
-
Install the dependencies for the server:
cd codetalk-server npm install
-
Start the server:
npm start
-
In a new terminal, navigate to the client directory:
cd codetalk-client npm install npm run dev
To use CodeTalk, run the CLI tool:
node src/cli.js
- Choose API: You will be prompted to choose between using your own API or the cloud service.
- Cloud Service: If you choose the cloud service, you will need to enter your email and password. You can sign up or log in.
- Own API: If you choose to use your own API, you can directly enter the code you want to comment on.
- After logging in or signing up, you can view your total comments available and remaining comments for the day.
- You can select files to comment on or comment on all files in your project.
- GET /health
Description: Check if the server is running.
Response:{ "status": "Server is running" }
- POST /signup
Description: Register a new user.
Request Body:{ "email": "user@example.com", "password": "your_password" }
- POST /login
Description: Log in an existing user.
Request Body:{ "email": "user@example.com", "password": "your_password" }
-
POST /comment
Description: Generate comments for the provided code.
Request Body:{ "email": "user@example.com", "code": "function add(a, b) { return a + b; }", "commentStyle": "basic" }
Response:
{ "commentedCode": "// Function to add two numbers function add(a, b) { return a + b; }" }
- [Version 1.0.0] - YYYY-MM-DD
Initial release with core functionality.
- Task 1: Implement support for additional programming languages.
- Task 2: Enhance commenting styles and options.
- Task 3: Add a web interface for easier usage.
-
What is this project about?
CodeTalk aims to simplify the process of adding comments to code, making it easier for developers to maintain and understand their projects. -
How can I contribute to this project?
We welcome contributions! Please refer to our Contribution Guidelines for more information on how to contribute. -
What technologies are used in this project?
This project uses Node.js, Express.js, and the OpenAI API to provide intelligent code commenting.
See the full list of contributors here.
This project is licensed under the MIT License - see the LICENSE file for details.