malas-commit: The ultimate tool for developers who need automated, meaningful commit messages without the hassle! This fast and efficient NPM package uses AI (Groq or Gemini) to generate smart, context-aware commit messages in seconds. With automatic fallback support, you get reliable generation even when one API has issues. Perfect for boosting productivity in your Git workflows.
The word malas in Indonesian means lazy. Often, developers feel lazy or lack motivation to come up with commit messages that are both clear and concise. Malas Commit automates this task for you!
- Indonesian (ma.las):
- a. Not willing to work on something: orang yang malas itu lebih senang mengemis daripada bekerja (The lazy person prefers begging to working).
- a. Not eager or reluctant to do something: malas rasanya mengunjungi rapat seperti itu (feeling too lazy to attend such a meeting).
- π€ Dual AI Support: Use Groq or Gemini APIs (or both with automatic fallback)
- π Automatic Fallback: If Groq fails, automatically switches to Gemini
- π Smart Context Limits: Dynamic diff limits based on API (200K chars for Gemini, 20K for Groq)
- β‘ Easy Configuration: Quickly set up and get started with your API key
- π Automated Commit Messages: No more thinking about commit messages! Generate them instantly
- π Global Installation: Install once, use everywhere
- π― Simple Command: Generate messages with a single command
You need at least ONE of the following API keys (both are free!):
- Sign up at Groq Console
- Fast inference with Llama models
- Free tier: ~32K token context
- Get your key from Google AI Studio
- Supports much larger context (up to 1M tokens)
- Free tier: 1,500 requests/day
- Configure both for automatic fallback
- Groq is tried first, Gemini as backup
- Maximum reliability and uptime
Node.js: Version 16.0.1 or higher
To install the package globally, run the following command:
npm i malas-commit -gOption 1: Groq only (fast)
malas setConfig GROQ_APIKEY <your-groq-apikey>Option 2: Gemini only (large context)
malas setConfig GEMINI_APIKEY <your-gemini-apikey>Option 3: Both (automatic fallback)
malas setConfig GROQ_APIKEY <your-groq-apikey>
malas setConfig GEMINI_APIKEY <your-gemini-apikey>malas
OR
mls
To generate a pull request title and description in Markdown format (without pushing your changes), use the following command:
malas prYou can configure malas-commit by editing the ~/.malas-commit file. Example configuration:
{
"GROQ_APIKEY": "<your-groq-apikey>",
"GEMINI_APIKEY": "<your-gemini-apikey>",
"COMMIT_PROMPT": "<your-custom-prompt>" // Leave blank to use default
}- Groq First: If
GROQ_APIKEYis set, Groq is tried first - Gemini Fallback: If Groq fails and
GEMINI_APIKEYis set, automatically switches to Gemini - Gemini Only: If only
GEMINI_APIKEYis set, uses Gemini directly - Error: If no API keys are configured, shows an error
The diff character limit automatically adjusts based on your configuration:
- Gemini only: 200,000 characters (10x larger!)
- Groq or Both: 20,000 characters (safe for Groq)
This means with Gemini, you can process much larger codebases without truncation!
- Fix the bug where the process still runs after selecting "no" in the yes/no prompt.
- Implement error handling for failed network requests.
- Refactor the code for better readability.
- Write unit tests for the new features.
- Add an auto-generated pull request description generator related to changes using Markdown format code.
- Migrate to semantic commit. (Semantic Commit Guide)
We welcome contributions! Please read our contributing guidelines to get started.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to all the contributors and the open-source community for their support.

