commit-now
v0.1.10
Published
AI-assisted git commit (Conventional Commits)
Maintainers
Readme
commit-now
AI‑assisted Git commit tool adhering to the Conventional Commits specification
Features
- Generates commit messages using AI (Lunos API; supports OpenAI and Gemini models)
- Enforces the Conventional Commits standard
- Automatically stages unstaged changes prior to committing
- Supports both short (title only) and long (title and body) commit messages
- Configurable API key and model, stored locally
- Modular TypeScript codebase (see
src/directory)
Installation
Install globally via npm:
npm install -g commit-nowAlternatively, clone the repository and install dependencies using pnpm:
git clone https://github.com/your-org/commit-now.git
cd commit-now
pnpm installTo build for production:
pnpm run buildUsage
From the project root, execute:
pnpm start -- [options]If you have built the project to dist/:
node dist/index.js [options]If installed globally:
cnow [options]Command-Line Options
-s,--shortGenerate a short commit message (title only)-l,--longGenerate a long commit message (title and body)-k,--keySet and save your Lunos API key-m,--modelSet and save your preferred model
When using the -k or -m flags, the configuration is updated and the process exits.
Example
cnow -lConfiguration
Configuration is stored in .config.json in the same directory as the script (not in the user home directory).
- The API key and model are prompted for on first use, or can be set via CLI flags.
- Obtain your Lunos API key from https://lunos.tech/dashboard/api-keys.
Development
Source code is located in the
src/directory, organized by functionality:src/index.ts— Main entry pointsrc/config.ts— Configuration utilitiessrc/git.ts— Git integration utilitiessrc/lunos.ts— Lunos API integrationsrc/cli.ts— Command-line interface and credential management
Build output is generated in the
dist/directory.TypeScript is configured with
src/as the root directory.
License
This project is licensed under the MIT License.
For additional information, please refer to the npm package page.
