npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@resdeby/commitify

v1.1.8

Published

AI-Powered Git Commit Message Generator CLI

Readme

🚀 Commitify

✨ AI-powered Git commit message generator with multiple providers (Gemini, Groq, Ollama)

Version License: MIT Node.js Version AI Providers TypeScript Conventional Commits

Ucapkan selamat tinggal pada kebingungan merangkai pesan commit manual! Commitify menganalisis perubahan kode Anda (git diff) dan menghasilkan pesan commit yang singkat, padat, dan sesuai standar Conventional Commits menggunakan AI.


✨ Fitur Unggulan

  • 🤖 Multi-Provider AI – Pilih antara Google Gemini, Groq, atau Ollama (local, gratis tanpa limit).
  • 📋 Conventional Commits – Otomatis menghasilkan pesan dengan tipe seperti feat, fix, chore, refactor, dll.
  • ⚡ Cepat & Efisien – Analisis diff dan generate commit dalam hitungan detik.
  • 🎨 Emoji Support – Tambahkan emoji di awal pesan commit untuk tampilan yang lebih menarik.
  • 🔧 Konfigurasi Global – Simpan API key secara global (~/.commitifyrc) agar bisa digunakan di semua proyek.
  • 📜 Riwayat Commit – Lihat riwayat commit yang pernah digenerate dengan commitify history.
  • 🧪 Dry Run – Coba generate pesan tanpa melakukan commit (--dry-run).
  • 📊 Statistik Perubahan – Tampilkan jumlah file, insertions, dan deletions (--stats).
  • 🛠️ Custom Template – Buat prompt template sendiri sesuai kebutuhan (inline --template atau via --template-file).
  • ⚠️ Breaking Changes – Tandai perubahan sebagai breaking dengan menambahkan ! di pesan commit.
  • 🪝 Git Hook – Otomatis generate pesan saat git commit (commitify hook install).
  • ↩️ Undo Commit – Batalkan commit terakhir, perubahan kembali ke staging (commitify undo).
  • 🌊 Streaming Output – Pesan commit muncul real-time saat digenerate (Gemini, Groq, Ollama).
  • 🔄 Auto Retry – Error rate limit/server sibuk otomatis dicoba ulang.

🛠️ Prasyarat

  • Node.js (versi 18 atau lebih baru)
  • Git yang sudah terinisialisasi di repository Anda
  • API Key dari salah satu provider (kecuali Ollama):
    • Google Gemini – gratis 60 req/menit
    • Groq – gratis 30 req/menit, lebih cepat
    • Ollama – local, gratis tanpa limit (install terpisah)

📦 Instalasi

Via NPM

npm install -g @resdeby/commitify

⚠️ Paketnya bernama @resdeby/commitify (scoped). Perintah CLI yang terpasang tetap commitify.

Via Repository (untuk development)

git clone https://gitlab.com/resdeby/commitify.git
cd commitify
npm install
npm run build
npm link

⚙️ Konfigurasi

Commitify mendukung 3 cara konfigurasi (prioritas: lokal > global > environment):

  1. Interaktif (Direkomendasikan)
commitify --init

Ikuti panduan interaktif untuk memilih provider, memasukkan API key, dan mengatur preferensi lainnya. Pada akhir setup, Anda akan ditanya apakah ingin menyimpan konfigurasi secara global (agar bisa dipakai di semua proyek) atau lokal (hanya untuk proyek saat ini).

  1. Manual – File Konfigurasi Buat file .commitifyrc di root proyek (lokal) atau di home directory (global):
{
  "provider": "gemini",
  "model": "gemini-2.0-flash-exp",
  "geminiApiKey": "YOUR_GEMINI_API_KEY",
  "emoji": true,
  "autoApprove": false,
  "defaultType": "feat",
  "defaultScope": "",
  "maxTokens": 300,
  "maxDiffSize": 3000,
  "language": "en",
  "promptTemplate": "Analisis git diff berikut..."
}

Catatan: temperature diatur per provider (tidak bisa diubah lewat config). Default maxTokens = 300, default maxDiffSize = 3000.

3. Environment Variables

export GEMINI_API_KEY=your_key_here
export GROQ_API_KEY=your_key_here

🚀 Penggunaan

Perintah Dasar

# Stage perubahan terlebih dahulu
git add .

# Jalankan commitify (akan interaktif)
commitify

# Mode cepat (auto-approve)
commitify -y

# Auto-add + dry-run
commitify --add --dry-run

# Tampilkan statistik perubahan
commitify --stats

# Gunakan custom template
commitify --template "Buatkan pesan commit untuk: {diff}"

# Tandai sebagai breaking change
commitify --breaking

# Pilih file yang di-staging secara interaktif
commitify --select-files

# Biarkan AI mendeteksi tipe commit
commitify --auto-type

# Generate 3 pilihan pesan commit
commitify --multi

# Pesan commit dalam bahasa Indonesia
commitify --lang id

# Auto-scope dari direktori file yang berubah
commitify --auto-scope -y

# Template prompt dibaca dari file
commitify --template-file ./prompt.txt

Git Hook & Undo

# Pasang prepare-commit-msg hook (commitify generate pesan saat git commit)
commitify hook install

# Cek status / lepas hook
commitify hook status
commitify hook uninstall

# Undo commit terakhir (perubahan tetap di-staging)
commitify undo

# Paksa reset walaupun commit bukan dari Commitify
commitify undo --force

Riwayat

# Lihat 5 commit terakhir
commitify history --last 5

# Export riwayat ke JSON / CSV
commitify history --export riwayat.json
commitify history --export riwayat.csv

# Hapus seluruh riwayat
commitify history --clear

Subcommand

| Perintah | Deskripsi | | :------------------------ | ------------------------------------------------------------------------- | | commitify | Jalankan generator utama (interaktif) | | commitify doctor | Diagnostik sistem dan konfigurasi | | commitify config [apiKey] | Lihat atau set API Key (tambahkan --global untuk global) | | commitify generate / gen | Generate commit message (mode sederhana) | | commitify history | Riwayat commit (--last [n], --export <file>, --clear, --yes) | | commitify hook <action> | Kelola git hook: install, uninstall, status | | commitify undo [--force] | Undo commit terakhir (soft reset; --force jika bukan dari Commitify) | | commitify interactive / i | Mode interaktif step-by-step | | commitify --init | Setup interaktif konfigurasi |

Opsi (Flags)

| Flag | Deskripsi | | :---------------------- | ----------------------------------------------------------------- | | -y, --yes | Langsung commit tanpa konfirmasi manual | | -a, --add | Otomatis git add . sebelum commit | | -s, --select-files | Pilih file yang akan di-staging secara interaktif (checkbox) | | -t, --auto-type | Biarkan AI mendeteksi tipe commit dari diff (skip pilihan tipe) | | --amend | Lakukan git commit --amend | | --init | Generate file .commitifyrc interaktif | | -v, --verbose | Tampilkan detail proses (debug) | | --stats | Tampilkan statistik perubahan | | --dry-run | Generate pesan tanpa melakukan commit | | --multi | Generate 3 pilihan pesan commit untuk dipilih | | --lang <en\|id> | Bahasa pesan commit (default: dari config, en) | | --template <template> | Custom prompt template (gunakan {diff}, {type}, {scope}, {emoji}) | | --template-file <path> | Baca prompt template dari file | | --auto-scope | Deteksi scope otomatis dari direktori file yang diubah | | --breaking | Tandai sebagai breaking change (tambah !) | | --hook <file> | Mode git hook: tulis pesan commit ke file (dipanggil prepare-commit-msg) | | --hook-source <source> | Sumber hook (message/merge/dll dilewati, tidak memblokir commit) |

🧪 Contoh Sesi

$ commitify --add --dry-run

╭────────────────────────────────────────────╮
│ ⚡ COMMITIFY v1.1.5                        │
│ AI-Powered Git Commit Message Generator    │
╰────────────────────────────────────────────╯

── Ringkasan Perubahan ──────────────────────────────────────────
  3 file  +45 −6
    package.json                                     +   3 −   1
    src/services/git.service.ts                      +  30 −   4
    src/utils/config.ts                              +  12 −   1
  Diff       10020 chars (dipotong)
  ✅ Semua perubahan berhasil di-stage.

── Konfigurasi AI ───────────────────────────────────────────────
  Provider   Groq
  Model      llama-3.3-70b-versatile  ·  max 300 tokens
  Bahasa     English
  API key    gsk_••••••••abcd
  Branch     main
  Mode       interaktif · dry-run

── Pilih tipe commit ────────────────────────────────────────────
  ✨ feat     - Fitur baru
  🐛 fix      - Perbaikan bug
❯ 🔧 chore    - Maintenance / tugas teknis

── Konfirmasi commit ────────────────────────────────────────────
╭──────────────────────────────────────────────╮
│ Pesan commit yang akan digunakan            │
│                                              │
│ 🔧 chore(deps): update dependencies latest   │
╰──────────────────────────────────────────────╯

Gunakan pesan ini?
  ✅ Ya, commit sekarang
  ✏️ Edit pesan
  ❌ Batal

╭──────────────────────────────────────────────╮
│ 🧪 DRY RUN – tidak melakukan commit          │
│                                              │
│ Pesan  🔧 chore(deps): update dependencies…  │
│ Meta   main  ·  2.1s                         │
│ Diff   3 file  +45 −6                        │
│ AI     groq · llama-3.3-70b-versatile        │
│                                              │
│ Jalankan ulang tanpa --dry-run untuk commit. │
╰──────────────────────────────────────────────╯

🤝 Kontribusi

Kontribusi sangat diterima! Silakan buka issue atau pull request.

  1. Fork repository ini
  2. Buat branch fitur (git checkout -b feature/FiturBaru)
  3. Commit perubahan (git commit -m 'feat: Menambahkan fitur X')
  4. Push ke branch (git push origin feature/FiturBaru)
  5. Buat Pull Request

📄 Lisensi

Proyek ini dilisensikan di bawah MIT License.

Hak Cipta © [2026] [Resdeby]

Dengan lisensi ini, Anda diperbolehkan untuk:

  • Menggunakan, menyalin, dan memodifikasi perangkat lunak ini
  • Mendistribusikan ulang perangkat lunak ini, baik versi asli maupun yang telah dimodifikasi
  • Menggabungkan ke dalam proyek komersial maupun pribadi

Satu-satunya kewajiban Anda adalah mencantumkan pemberitahuan hak cipta dan pernyataan lisensi ini di semua salinan atau bagian penting dari perangkat lunak ini.

📌 Untuk teks lisensi selengkapnya, silakan lihat file LICENSE atau kunjungi opensource.org/licenses/MIT.