{"_id":"@aliklc/smart-commit","_rev":"4-a447bdb6eb397314874d763c0f8a85fe","name":"@aliklc/smart-commit","dist-tags":{"latest":"2.4.0"},"versions":{"2.2.0":{"name":"@aliklc/smart-commit","version":"2.2.0","keywords":["git","commit","cli","ai","conventional-commits","gemini","commit-message"],"author":"","license":"ISC","_id":"@aliklc/smart-commit@2.2.0","maintainers":[{"name":"aliklc","email":"aliklcc80@icloud.com"}],"homepage":"https://github.com/aliklc/smart-commit#readme","bugs":{"url":"https://github.com/aliklc/smart-commit/issues"},"bin":{"smart-commit":"dist/index.js"},"dist":{"shasum":"9710e867a21cc3b65ed0efaa044078be6b173755","tarball":"https://registry.npmjs.org/@aliklc/smart-commit/-/smart-commit-2.2.0.tgz","fileCount":18,"integrity":"sha512-4LdkgKwcxZP+Vt52YcHSdb5Dc8TSCOp7q5OScZdueG+xGKSd52hXHNTDfFw6xmtmcwtiwCZTx1EfFHvqXizZvQ==","signatures":[{"sig":"MEYCIQCXTCQHl4Hr0iY351ZzZUWWrMeFnWt9DJDTeeLmLMkUxgIhAKAN5EWsySjTj8o2KP/kYIJid10Sx7JjtRdUAnNI5aBt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23514},"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"9e9ee90f45af713cb7ca9324c90eddc9a902187b","scripts":{"dev":"ts-node src/index.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliklc","email":"aliklcc80@icloud.com"},"repository":{"url":"git+https://github.com/aliklc/smart-commit.git","type":"git"},"_npmVersion":"11.4.2","description":"AI-powered Conventional Commits CLI — generates commit messages from git diff (Gemini)","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.1.0","chalk":"^4.1.2","dotenv":"^16.4.0","inquirer":"^9.2.0","@google/genai":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","@types/ora":"^3.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/inquirer":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/smart-commit_2.2.0_1772878334367_0.8156341527230833","host":"s3://npm-registry-packages-npm-production"}},"2.3.0":{"name":"@aliklc/smart-commit","version":"2.3.0","keywords":["git","commit","cli","ai","conventional-commits","gemini","commit-message"],"author":"","license":"ISC","_id":"@aliklc/smart-commit@2.3.0","maintainers":[{"name":"aliklc","email":"aliklcc80@icloud.com"}],"homepage":"https://github.com/aliklc/smart-commit#readme","bugs":{"url":"https://github.com/aliklc/smart-commit/issues"},"bin":{"smart-commit":"dist/index.js"},"dist":{"shasum":"09f1ef67c25f93303c23374d5bf28d24e175b7a9","tarball":"https://registry.npmjs.org/@aliklc/smart-commit/-/smart-commit-2.3.0.tgz","fileCount":18,"integrity":"sha512-nDSKJEdF7eGZvyIBUVvtHdjJsXMqUFPyhmE5whIB1RtkNdgk7ThxdYYFW/mto5LqHS1As3Q78heTXM2w7Z5eBw==","signatures":[{"sig":"MEYCIQC7HcEj4nPVMXoKod/5ufkQ35NlMrr0umJc7cc+mXIaDwIhALWmdOTKdf4RyC+wOYEw3ld5zw6iFfF5IISFnFlYvgaq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26297},"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"7d74c2aa96bd1d4bd1a42073adea5a08252e8dfb","scripts":{"dev":"ts-node src/index.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliklc","email":"aliklcc80@icloud.com"},"repository":{"url":"git+https://github.com/aliklc/smart-commit.git","type":"git"},"_npmVersion":"11.4.2","description":"AI-powered Conventional Commits CLI — generates commit messages from git diff (Gemini)","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.1.0","chalk":"^4.1.2","dotenv":"^16.4.0","inquirer":"^9.2.0","@google/genai":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","@types/ora":"^3.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/inquirer":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/smart-commit_2.3.0_1772879552205_0.678143681585992","host":"s3://npm-registry-packages-npm-production"}},"2.3.2":{"name":"@aliklc/smart-commit","version":"2.3.2","keywords":["git","commit","cli","ai","conventional-commits","gemini","commit-message"],"author":"","license":"ISC","_id":"@aliklc/smart-commit@2.3.2","maintainers":[{"name":"aliklc","email":"aliklcc80@icloud.com"}],"homepage":"https://github.com/aliklc/smart-commit#readme","bugs":{"url":"https://github.com/aliklc/smart-commit/issues"},"bin":{"smart-commit":"dist/index.js"},"dist":{"shasum":"023e5ba1f0756b27996373d2985b3002fc647f8a","tarball":"https://registry.npmjs.org/@aliklc/smart-commit/-/smart-commit-2.3.2.tgz","fileCount":19,"integrity":"sha512-trGEELSk8g6sc2rt300ocwKH2o828xX3iZHc3QdDAwue3TOrWItS435skaEGIXROEK9KFHp03ZKhHZrz/TFmFQ==","signatures":[{"sig":"MEUCIASg/TZ+jvHUHKyBgQT8a3SO2Y4tx387jzaX28wGr2rNAiEAqU2F0Klt7OSIDKsWE5d2WNbYNFYBHLyeC9AF2nVps9E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":27030},"main":"dist/index.js","type":"commonjs","types":"./dist/index.d.ts","engines":{"node":">=20"},"gitHead":"b8fc8465a982ba016fc92371316a6131d0b0734b","scripts":{"dev":"ts-node src/index.ts","test":"echo \"Error: no test specified\" && exit 1","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"aliklc","email":"aliklcc80@icloud.com"},"repository":{"url":"git+https://github.com/aliklc/smart-commit.git","type":"git"},"_npmVersion":"11.4.2","description":"AI-powered Conventional Commits CLI — generates commit messages from git diff (Gemini)","directories":{},"_nodeVersion":"22.17.0","dependencies":{"ora":"^8.1.0","chalk":"^4.1.2","dotenv":"^16.4.0","inquirer":"^9.2.0","@google/genai":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"ts-node":"^10.9.2","@types/ora":"^3.1.0","typescript":"^5.6.0","@types/node":"^22.0.0","@types/inquirer":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/smart-commit_2.3.2_1772880017486_0.8024664370775478","host":"s3://npm-registry-packages-npm-production"}},"2.4.0":{"name":"@aliklc/smart-commit","version":"2.4.0","description":"AI-powered Conventional Commits CLI — generates commit messages from git diff (Gemini)","main":"dist/index.js","bin":{"smart-commit":"dist/index.js"},"scripts":{"build":"tsc","prepublishOnly":"npm run build","start":"node dist/index.js","dev":"ts-node src/index.ts","test":"echo \"Error: no test specified\" && exit 1"},"keywords":["git","commit","cli","ai","conventional-commits","gemini","commit-message"],"author":"","license":"ISC","repository":{"type":"git","url":"git+https://github.com/aliklc/smart-commit.git"},"bugs":{"url":"https://github.com/aliklc/smart-commit/issues"},"homepage":"https://github.com/aliklc/smart-commit#readme","type":"commonjs","engines":{"node":">=20"},"dependencies":{"@google/genai":"^1.0.0","chalk":"^4.1.2","dotenv":"^16.4.0","inquirer":"^9.2.0","ora":"^8.1.0"},"devDependencies":{"@types/inquirer":"^9.0.0","@types/node":"^22.0.0","@types/ora":"^3.1.0","ts-node":"^10.9.2","typescript":"^5.6.0"},"_id":"@aliklc/smart-commit@2.4.0","gitHead":"8f976793e045fe04b6355c8235d2c8d24a5678fa","types":"./dist/index.d.ts","_nodeVersion":"22.17.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-3v99BCp23j/1NodD6FIu9lAARLoVNo6+FahWPxYaHKHXT00iSeMgjow3E+G5BM6TQ2hHFTWHDxLXqZgDAaxLJw==","shasum":"b84ba439be528f0974022516b205670f7da9629c","tarball":"https://registry.npmjs.org/@aliklc/smart-commit/-/smart-commit-2.4.0.tgz","fileCount":19,"unpackedSize":30819,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCID1nqlVzzHKN4/ZiPYi6lCadKtS6UjlTrCn1GzCkd305AiBveAhl9WO4V8BWXFIuuNW6WGss4ivRHsXivR0xo7wfpQ=="}]},"_npmUser":{"name":"aliklc","email":"aliklcc80@icloud.com"},"directories":{},"maintainers":[{"name":"aliklc","email":"aliklcc80@icloud.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/smart-commit_2.4.0_1772965427323_0.4104704421187937"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-07T10:12:14.243Z","modified":"2026-03-08T10:23:47.560Z","2.2.0":"2026-03-07T10:12:14.516Z","2.3.0":"2026-03-07T10:32:32.344Z","2.3.2":"2026-03-07T10:40:17.648Z","2.4.0":"2026-03-08T10:23:47.462Z"},"bugs":{"url":"https://github.com/aliklc/smart-commit/issues"},"license":"ISC","homepage":"https://github.com/aliklc/smart-commit#readme","keywords":["git","commit","cli","ai","conventional-commits","gemini","commit-message"],"repository":{"type":"git","url":"git+https://github.com/aliklc/smart-commit.git"},"description":"AI-powered Conventional Commits CLI — generates commit messages from git diff (Gemini)","maintainers":[{"name":"aliklc","email":"aliklcc80@icloud.com"}],"readme":"# smart-commit\n\nAI-powered CLI that generates **Conventional Commits** (emoji + subject + optional bullet body) from your staged `git diff` using **Google Gemini**. No more blank or generic commit messages.\n\n---\n\n## Features\n\n| Feature | Description |\n|--------|-------------|\n| **One-time setup** | Paste your Gemini API key when asked; it’s saved to `.env` in the project. |\n| **No manual .env** | First run prompts for the key and creates/updates `.env` for you. |\n| **Length-aware** | Small changes → short message; large changes → subject + bullet list. |\n| **Edit before commit** | Open the suggested message in your editor (e.g. Notepad, VS Code), edit, save, then confirm. |\n| **Git integration** | Optional `git sc` / `git smart-commit` alias so you run it like a Git command. |\n\n---\n\n## Install\n\n| Method | Command | When to use |\n|--------|---------|-------------|\n| **Global** | `npm install -g @aliklc/smart-commit` | Use `smart-commit` in any repo. |\n| **No install** | `npx @aliklc/smart-commit` | One-off or CI; no global install. |\n\n---\n\n## Quick start\n\n1. **Stage changes:**  \n   `git add .` (or specific files)\n\n2. **Run the CLI:**  \n   `smart-commit` or `npx @aliklc/smart-commit`\n\n3. **First time only:**  \n   You’ll be asked for a [Gemini API key](https://aistudio.google.com/apikey) (free). Paste it; the tool saves it to `.env` and won’t ask again.\n\n4. **Choose an action:**\n\n   | Choice | What it does |\n   |--------|----------------|\n   | **Yes** | Commit with the suggested (or edited) message. |\n   | **Edit** | Open the message in your editor; save and close to use the edited text. |\n   | **Regenerate** | Ask AI for a new message (same diff). |\n   | **No** | Cancel; no commit. |\n\n---\n\n## How it works\n\n```mermaid\nflowchart TD\n    A[Run smart-commit] --> B[Read staged diff]\n    B --> C{Staged files?}\n    C -->|No| D[Error: run git add first]\n    C -->|Yes| E{API key in .env?}\n    E -->|No| F[Prompt for key → save to .env]\n    F --> G[Call Gemini with diff]\n    E -->|Yes| G\n    G --> H[Show suggested message]\n    H --> I{Your choice?}\n    I -->|Yes| J[git commit -m message]\n    I -->|Edit| K[Open in editor]\n    K --> H\n    I -->|Regenerate| G\n    I -->|No| L[Cancel]\n```\n\n- **Input:** `git diff --staged` (only what you staged).\n- **AI:** Gemini gets the diff + a prompt (Conventional Commits, emoji, length by change size).\n- **Output:** You get one suggested message; you can accept, edit in your editor, or regenerate.\n\n---\n\n## Use as a Git command (optional)\n\nUse `git sc` or `git smart-commit` from any terminal (e.g. Git Bash) after a one-time setup:\n\n| Where | Command |\n|-------|---------|\n| **Any terminal** | `npx @aliklc/smart-commit --setup-git-alias` |\n| **If installed globally** | `smart-commit -s` or `smart-commit --setup-git-alias` |\n\nThen in any repo:\n\n```bash\ngit add .\ngit sc\n```\n\n---\n\n## Editing the message\n\nWhen you choose **Edit**:\n\n- The suggested message is opened in your **default editor** (e.g. Notepad on Windows if `EDITOR` is not set).\n- You change the text directly, save, and close the editor.\n- The CLI reads the file and shows the updated message; you can then **Yes** / **Edit** / **Regenerate** / **No**.\n\nTo use VS Code as the editor (optional):\n\n```bash\n# Windows (cmd)\nset EDITOR=code --wait\n\n# Git Bash / Linux / macOS\nexport EDITOR=\"code --wait\"\n```\n\n---\n\n## Requirements\n\n| Requirement | Details |\n|-------------|---------|\n| **Node.js** | **20+** |\n| **Git** | Repo with staged changes (`git add` before running). |\n| **Gemini API key** | Free at [Google AI Studio](https://aistudio.google.com/apikey). |\n\n---\n\n## License\n\nISC\n","readmeFilename":"README.md"}