commit-now

0.1.10 • Public • Published

commit-now

npm version

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-now

Alternatively, clone the repository and install dependencies using pnpm:

git clone https://github.com/your-org/commit-now.git
cd commit-now
pnpm install

To build for production:

pnpm run build

Usage

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, --short Generate a short commit message (title only)
  • -l, --long Generate a long commit message (title and body)
  • -k, --key Set and save your Lunos API key
  • -m, --model Set and save your preferred model

When using the -k or -m flags, the configuration is updated and the process exits.

Example

cnow -l

Configuration

Configuration is stored in .config.json in the same directory as the script (not in the user home directory).

Development

  • Source code is located in the src/ directory, organized by functionality:

    • src/index.ts — Main entry point
    • src/config.ts — Configuration utilities
    • src/git.ts — Git integration utilities
    • src/lunos.ts — Lunos API integration
    • src/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.

Package Sidebar

Install

npm i commit-now

Weekly Downloads

38

Version

0.1.10

License

MIT

Unpacked Size

14.2 kB

Total Files

9

Last publish

Collaborators

  • superxdev