New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

sweet-commit

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sweet-commit

AI-powered commit messages that just work. One command, perfect commits, every time.

latest
Source
npmnpm
Version
2.2.2
Version published
Maintainers
1
Created
Source

sweet-commit

npm version

AI-powered commit messages that just work. One command, perfect commits, every time.

Installation

npm install -g sweet-commit

Update

To update to the latest version:

scom update

Check your current version:

scom -v

Usage

Basic usage

Generate and commit (will prompt to stage if needed):

scom

You can also specify the commit style directly with a flag. For example:

scom -s       # Short commit message
scom --adaptive   # Adaptive commit message
scom -d       # Detailed commit message

Commit style flags

You can control the commit message style directly from the CLI:

  • scom --short or scom -s — Short, conventional commit message
  • scom --adaptive or scom -a — Adaptive (short for simple, detailed for complex)
  • scom --detailed or scom -d — Fully detailed, multi-line commit message

Note: CLI flags always override your config file's default style.

What happens

  • Checks for unstaged changes and offers to stage them automatically
  • Analyzes your changes using AI
  • Generates a commit message in your chosen style
  • Lets you confirm or regenerate the message
  • Commits after confirmation

Setup

  • Get your Gemini API key from Google AI Studio.

  • Run the setup command:

    scom setup
    
  • Follow the prompts to enter your API key. That's it!

About the .scom.conf file

When you run scom setup, a .scom.conf file is created in your config directory (e.g. ~/.config/.scom.conf and inside APPDATA for windows).

  • This file securely stores your Gemini API key and other configuration options, such as your default commit style.

  • You can edit this file manually if you want to change your API key or set a different default commit style (e.g., adaptive, short, or detailed).

  • Example .scom.conf:

    apiKey=your-gemini-api-key
    humanLikeCommit=true
    defaultCommitStyle=adaptive
    

Note: CLI flags (like --short, --adaptive, --detailed) always override the style set in .scom.conf for a single run.

Features

  • Flexible commit styles: Use CLI flags to choose short, adaptive, or detailed commit messages on demand
  • Auto-stage prompt: Automatically offers to stage unstaged changes
  • Intelligent message generation: Comprehensive bodies for complex changes, concise for simple ones
  • Conventional commits: Follows best practices and conventional commit format
  • Gemini AI powered: Uses latest Gemini AI for intelligent commit message creation
  • Clean interface: Minimal, beautiful CLI with no unnecessary output
  • Zero configuration: Works immediately after API key setup
  • Flexible setup: Supports environment variables and .env files

Dependencies

  • @clack/prompts - Clean CLI interface
  • @google/genai - Gemini AI integration

Requirements

  • Node.js 20 or later
  • Git repository with staged changes
  • Gemini API key

Keywords

git

FAQs

Package last updated on 16 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts