Introducing dev-mate-cli

Mayank Kumar - Sep 21 - - Dev Community

I’m excited to share release v0.1 of dev-mate-cli, an open-source command-line tool I built to automate some key parts of the development process. Designed for efficiency, this tool helps developers streamline repetitive tasks, like generating comments for your code, and ensures better workflow management.

You can check out the full project on GitHub.

What Does dev-mate-cli Do?

At its core, dev-mate-cli integrates with OpenAI’s API to automatically generate comments for your code written in any programming language using LLMs. This means you can focus on coding while the tool takes care of the documentation, helping you maintain high standards with minimal effort.

In addition to generating comments, it also offers customization for token usage, specifying temperature for LLM to control creativity and the handling of output files. This ensures that if you’re working with multiple files, you won’t accidentally overwrite your previous work. The tool is designed to be versatile and flexible, making it suitable for various development workflows.

For a more detailed breakdown of features, you can check out the README, where I’ve included step-by-step instructions on how to set up and use the tool.

Technologies Used

This project is built using TypeScript, which adds clarity and maintainability to the code. To create a user-friendly command-line program, it makes use of the Commander npm package, allowing users to interact with the application through simple and intuitive commands.

By integrating OpenAI's Chat Completion API, the project remains flexible, as it is not bound to a single model from any LLM provider; it can adapt to various models that support OpenAI's Chat Completion API. This opens up exciting possibilities for exploring different LLMs based on the project’s needs.

Additionally, ESLint is included to help maintain coding standards, ensuring that the code remains consistent and easy to work with as the project grows in the open-source realm.

How to Use dev-mate-cli

Once you’ve cloned the repo and installed the dependencies, the CLI can be run directly from your terminal. The tool accepts various flags, such as --token-usage and --temperature, which makes it easy to integrate into your development process without unnecessary complexity.

All of this is documented in the GitHub README, where you’ll also find advanced usage examples and additional customization options.

Key Features of dev-mate-cli

  • Auto-Generated Comments: Using OpenAI’s API, it automatically generates code comments based on the structure of your code.

  • Customizable File Handling: Includes logic to handle multiple input files and specifying an output file to store output.

  • LLM Selection: Choose which AI model to use with the --model flag.

For the complete list of features and how to implement them, head over to the repository.

Video Demo
Want to see it in action? I’ve recorded a short video demo showcasing the common commands in real-time.

dev-mate-cli has been built with simplicity and efficiency in mind. It’s easy to set up, simple to use, and can significantly improve your workflow by automating code documentation. For more information, and to try it out yourself, check out the GitHub repository. I'd love to hear your thoughts and feedback on how this tool can be even more useful!

. . . . . . . . . . . .