{"_id":"@aayush0821/commit-ai","name":"@aayush0821/commit-ai","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@aayush0821/commit-ai","version":"1.0.0","description":"AI powered Git workflow assistant that generates commits and creates PRs","license":"MIT","author":{"name":"Aayush Vats"},"type":"module","main":"dist/index.js","bin":{"commit-ai":"dist/bin/index.js"},"keywords":["git","github","ai","cli","developer-tools","commit","pull-request","automation"],"repository":{"type":"git","url":"git+https://github.com/Aayush-0821/commit-ai.git"},"bugs":{"url":"https://github.com/Aayush-0821/commit-ai/issues"},"homepage":"https://github.com/Aayush-0821/commit-ai#readme","scripts":{"dev":"tsx bin/index.ts","build":"tsc","test":"vitest","test:watch":"vitest --watch","start":"node dist/index.js"},"dependencies":{"chalk":"^5.6.2","commander":"^15.0.0","dotenv":"^17.4.2","envsight":"^1.0.0","inquirer":"^14.0.2","octokit":"^5.0.5","openai":"^6.42.0","ora":"^9.4.0","simple-git":"^3.36.0"},"devDependencies":{"@types/inquirer":"^9.0.9","@types/node":"^25.9.3","nodemon":"^3.1.14","tsx":"^4.22.4","typescript":"^6.0.3","vitest":"^4.1.9"},"_id":"@aayush0821/commit-ai@1.0.0","gitHead":"3c7de09a3748e31286250f7867dd95453aff889d","_nodeVersion":"22.16.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-16oOSZaTNDhr5QlRp+Egd/YObcfHgc1kreq/IPQ9AHMncJbO+eFKNFN+5J0rmvndD0dmX5LLClvVRcBxwQejiQ==","shasum":"5307d62614e7ab63685ef7dc0b02b3e08dc7f9f0","tarball":"https://registry.npmjs.org/@aayush0821/commit-ai/-/commit-ai-1.0.0.tgz","fileCount":34,"unpackedSize":57149,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD1w0NPIPbsnn6o3qnPQ/iRH1OLgcLgF5MTOWMmZDuCWgIhAP5yj469A7ckCAYGwmKMhzRCyb59do3G985mXS2CIWa/"}]},"_npmUser":{"name":"aayush0821","email":"vatsayush67@gmail.com"},"directories":{},"maintainers":[{"name":"aayush0821","email":"vatsayush67@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/commit-ai_1.0.0_1781615716870_0.24752748376918188"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-16T13:15:16.670Z","1.0.0":"2026-06-16T13:15:16.994Z","modified":"2026-06-16T13:15:17.200Z"},"maintainers":[{"name":"aayush0821","email":"vatsayush67@gmail.com"}],"description":"AI powered Git workflow assistant that generates commits and creates PRs","homepage":"https://github.com/Aayush-0821/commit-ai#readme","keywords":["git","github","ai","cli","developer-tools","commit","pull-request","automation"],"repository":{"type":"git","url":"git+https://github.com/Aayush-0821/commit-ai.git"},"author":{"name":"Aayush Vats"},"bugs":{"url":"https://github.com/Aayush-0821/commit-ai/issues"},"license":"MIT","readme":"#  Commit-AI\r\n\r\n> AI-powered Git workflow assistant that generates intelligent commit messages, manages branches, pushes changes, and creates GitHub Pull Requests — all from your terminal.\r\n\r\n![alt text](image.png)\r\n\r\n##  Overview\r\n\r\nCommit-AI is a developer productivity CLI tool that automates the repetitive parts of the Git workflow.\r\n\r\nInstead of manually:\r\n\r\n- checking your changes\r\n- writing commit messages\r\n- creating branches\r\n- committing code\r\n- pushing changes\r\n- opening Pull Requests\r\n\r\nCommit-AI turns the entire process into a single command:\r\n\r\n```bash\r\ncommit-ai pr\r\n```\r\n\r\nIt analyzes your repository changes, understands your code diff using AI, generates a conventional commit message, prepares a PR description, safely handles branches, pushes your code, and creates a GitHub Pull Request.\r\n\r\n## Problem\r\n\r\nEvery Developer has faced this : \r\n\r\n```\r\ngit status\r\n\r\ngit diff\r\n\r\n\"what should I name this commit?\"\r\n\r\ngit add .\r\n\r\ngit commit -m \"update\"\r\n\r\ngit push\r\n\r\ngo to GitHub\r\n\r\ncreate PR\r\n\r\nwrite description\r\n```\r\n\r\nThe Git workflow is powerful, but repetitive. Commit-AI removes that friction.\r\n\r\n## Features\r\n\r\n### AI Commit Message Generation\r\n\r\nCommit-AI analyzes your git diff and creates meaningful conventional commits.\r\n\r\n<u>Example</u> : \r\n\r\nBefore :\r\n```\r\ngit commit -m \"changes\"\r\n```\r\n\r\nAfter : \r\n```\r\nfeat(auth) : add jwt authentication middleware\r\n```\r\n\r\nSupported Formats : \r\n```\r\nfeat\r\nfix\r\nchore\r\nrefactor\r\ndocs\r\ntest\r\n```\r\n\r\n### AI Generated Pull Request\r\n\r\n- feat \r\n- fix \r\n- chore \r\n- refactor \r\n- docs \r\n- test \r\n\r\n<u>Example :</u>\r\n\r\n```\r\nTitle:\r\n\r\nfeat(auth): add jwt authentication\r\n\r\n\r\nBody:\r\n\r\n## Summary\r\n\r\nAdded JWT based authentication flow.\r\n\r\n## Changes\r\n\r\n- Added token validation\r\n- Added middleware\r\n- Updated auth routes\r\n\r\n## Risks\r\n\r\n- Existing users need migration\r\n```\r\n\r\n### Smart Branch Management\r\n\r\nCommit-AI understands Git Branches.\r\n\r\n- <b>Use Current Branch</b>\r\n```\r\nmain\r\n```\r\n\r\n- <b>Switch Existing Branch</b>\r\n\r\n<u>Example :</u>\r\n\r\n```\r\nmain\r\ndevelop\r\nfeature/payment\r\nfeature/dashboard\r\n```\r\n\r\nCommit-AI safely moves your changes.\r\n\r\n- <b> Create new Branch Automatically</b>\r\n\r\n<u>Example : </u>\r\n\r\n```\r\nfix/payment-validation\r\nfeat/user-authentication\r\nrefactor/api-layer\r\n```\r\n\r\nGenerated from your changes.\r\n\r\n### One Command WorkFlow\r\n\r\nThe complete PR flow :\r\n```\r\ncommit-ai pr\r\n```\r\n\r\nDoes :\r\n```\r\nAnalyze repository\r\n        ↓\r\nRead git diff\r\n        ↓\r\nGenerate AI commit\r\n        ↓\r\nGenerate PR description\r\n        ↓\r\nSelect branch\r\n        ↓\r\nCommit changes\r\n        ↓\r\nPush changes\r\n        ↓\r\nCreate GitHub PR\r\n```\r\n\r\n## Installation\r\n\r\n### Install globally using npm\r\n\r\n```\r\nnpm install -g commit-ai\r\n```\r\n\r\n<b>Verify Installtion : </b>\r\n\r\n```\r\ncommit-ai --version\r\n```\r\n\r\n## Configuration\r\n\r\nBefore using commit-AI, initialize your setup.\r\n\r\nRun :\r\n```\r\ncommit-ai init\r\n```\r\n\r\nYou will configure:\r\n\r\n- GitHub repository access\r\n- AI API key\r\n\r\n## Commands\r\n\r\n### 1) commit-ai init\r\n\r\nInitialize commit-ai    Configuration.\r\n\r\n<b>Usage :</b>\r\n```\r\ncommit-ai init\r\n```\r\n\r\n<b>Creates Configuration : </b>\r\n\r\n```\r\n~/.commit-ai/config.json\r\n```\r\n\r\n<b>Stores :</b>\r\n\r\n- Github Token\r\n- AI Settings\r\n- Preferences\r\n\r\n### 2) commit-ai status\r\n\r\nAnalyze Repository State.\r\n\r\n<u>Example :</u>\r\n\r\n```\r\ncommit-ai status\r\n```\r\n\r\n<u>Output :</u>\r\n\r\n```\r\nCommit-AI Repository Analysis\r\n\r\nBranch:\r\nfeature/auth\r\n\r\nStatus:\r\n✔ Working directory clean\r\n\r\nFiles:\r\n0 modified\r\n```\r\n\r\n### 3) commit-ai commit\r\n\r\nGenerate an AI Commit Message.\r\n\r\n<u>Example :</u>\r\n\r\n```\r\ncommit-ai commit\r\n```\r\n\r\n<u>Flow :</u>\r\n```\r\nRead diff\r\n\r\nAI analyzes changes\r\n\r\nGenerate message\r\n\r\nConfirm\r\n\r\nCommit\r\n```\r\n\r\n<u>Example Output :</u>\r\n\r\n```\r\nGenerated:\r\n\r\nfeat(api): add user validation endpoint\r\n\r\nCommit?\r\n```\r\n\r\n### 4) commit-ai pr\r\n\r\nThe Main Command.\r\n\r\n<u>Example :</u>\r\n\r\n```\r\ncommit-ai pr\r\n```\r\n\r\n<u>Full WorkFlow</u>\r\n\r\n```\r\n✔ Repository detected\r\n\r\n✔ Changes analyzed\r\n\r\n✔ Commit generated\r\n\r\n\r\nWhere should PR be created?\r\n\r\n1. Current branch\r\n2. Existing branch\r\n3. New branch\r\n\r\n\r\n✔ Commit created\r\n\r\n✔ Code pushed\r\n\r\n✔ Pull Request created\r\n\r\n\r\nGitHub URL:\r\nhttps://github.com/user/repo/pull/10\r\n```\r\n\r\n## Architecture\r\n\r\nCommit-AI is built with a modular Architecture.\r\n\r\n```\r\nsrc\r\n\r\n├── ai\r\n│   └── commitAI.ts\r\n│\r\n├── core\r\n│   ├── diffAnalyzer.ts\r\n│   ├── branchGenerator.ts\r\n│   └── statusAnalyzer.ts\r\n│\r\n├── git\r\n│   ├── actions.ts\r\n│   ├── branch.ts\r\n│   ├── diff.ts\r\n│   └── remote.ts\r\n│\r\n├── github\r\n│   ├── parser.ts\r\n│   ├── pullRequest.ts\r\n│   └── prGenerator.ts\r\n│\r\n└── workflow\r\n\r\n    ├── prWorkflow.ts\r\n    └── branchManager.ts\r\n```\r\n\r\n## Internal WorkFlow\r\n\r\nWhen running : \r\n\r\n```\r\ncommit-ai pr\r\n```\r\n\r\n<u><b>Internally : </b></u>\r\n\r\n### 1) Repository Detection\r\n\r\nReads :\r\n```\r\ngit remote -v\r\n```\r\n\r\nExtracts : \r\n```\r\nowner\r\nrepository\r\n```\r\n\r\n### 2) Diff Analysis\r\n\r\nRuns :\r\n```\r\ngit diff\r\n```\r\n\r\nAnalysis :\r\n- changed files\r\n- additions\r\n- removals\r\n- modifications\r\n\r\n### 3) AI Processing\r\n\r\nThe diff is sent to AI.\r\n\r\n<u>AI Returns :</u>\r\n\r\n```\r\ncommit message\r\n\r\nPR Title\r\n\r\nPR Description\r\n```\r\n\r\n### 4) Branch Handling\r\n\r\nCommit-AI checks :\r\n```\r\ncurrent branch\r\n\r\nworking tree status\r\n\r\navailable branches\r\n```\r\nThen safely switches or creates.\r\n\r\n### 5) Git Execution\r\n\r\n<u>Runs :</u>\r\n```\r\ngit add .\r\n\r\ngit commit\r\n\r\ngit push\r\n```\r\n\r\n### 6) Github API\r\n\r\n<u>Creates :</u>\r\n```\r\nPull Request\r\n```\r\n\r\nusing Github REST API.\r\n\r\n## Testing\r\n\r\n<b>Commit-AI uses :</b>\r\n- Vitest\r\n- Unit Testing\r\n\r\n<b>Run Tests :</b>\r\n```\r\nnpm test\r\n```\r\n\r\n<b><u>Current Coverage :</u></b>\r\n```\r\n✓ Commit message validation\r\n\r\n✓ Diff analyzer\r\n\r\n✓ Branch generator\r\n```\r\n\r\n## Tech Stack\r\n\r\n### Runtime\r\n- Node.js\r\n- TypeScript\r\n\r\n### Git Integration\r\n- simple-git\r\n\r\n### CLI\r\n- commander\r\n- inquirer\r\n- chalk\r\n- ora\r\n\r\n### AI\r\n- OpenRouter API\r\n\r\n### Github\r\n- Octokit\r\n\r\n### Testing\r\n- Vitest\r\n\r\n## Contributing\r\n\r\nContributions are Welcome.\r\n\r\n<u>Steps :</u>\r\n\r\n```\r\ngit clone https://github.com/Aayush-0821/commit-ai.git\r\n\r\nnpm install\r\n\r\nnpm run build\r\n\r\nnpm test\r\n```\r\n\r\n<u>Create a Branch :</u>\r\n\r\n```\r\ngit checkout -b feature/new-feature\r\n```\r\n\r\nMake Changes.\r\n\r\n<u>Create PR :</u>\r\n\r\n```\r\ncommit-ai pr\r\n```\r\n\r\n## License\r\n\r\n<b>MIT License</b>\r\n\r\n## Author\r\n\r\nBuilt by Aayush Vats","readmeFilename":"README.md","_rev":"1-068a7f2c38adc44efdc86467972240c3"}