Skip to content

snelusha/noto

Repository files navigation

noto ✨

(/nōto/, notebook in Japanese)

Features

  • Instant Commit Messages: Generate clear, context-aware messages based on staged changes.

  • Seamless Git Integration: Apply messages directly, skip the copy-paste.

  • Interactive Editing: Easily refine your commit message with the new --edit flag.

  • Enhanced Configuration: Manage your LLM model preferences with an improved configuration interface.

Installation

Install noto globally using npm:

npm install -g @snelusha/noto

After installation, you can run noto from any terminal.

Prerequisites

Before using noto, you must configure your Google Generative API key. You can now provide your API key in two ways:

1. Using an environment variable (recommended)

Set the NOTO_API_KEY environment variable globally so it's available across your system.

macOS/Linux (eg., in .bashrc, .zshrc or .profile)

export NOTO_API_KEY=your_api_key_here

Then reload your terminal or run:

source ~/.zshrc # or ~/.bashrc or ~/.profile

Windows (Command Prompt or PowerShell):

setx NOTO_API_KEY "your_api_key_here"

Note: You may need to restart your terminal (or system) for changes to take effect.

2. Using the built-in configuration command

noto config key # or simply noto config key YOUR_API_KEY

noto will first look for the NOTO_API_KEY environment variable. If it's not found, it will fall back to the local configuration.

You can also configure a specific Gemini mode (optional):

noto config model

If you ever need to reset your configuration, you can now run:

noto config reset

Usage

Generate a new commit message:

noto

Apply the generated commit message to your current commit:

noto --apply # or simply noto -a

Copy the generated commit message to your clipboard:

noto --copy # or simply noto -c

Retrieve the previously generated commit message:

noto prev

Amend the previously generated commit message:

noto prev --amend --edit # or simply: noto prev --amend -e

Note: When using the --amend flag with the noto prev command, the --edit (-e) flag is also required. This combination will allow you to modify (amend) the previous commit message before applying it.

Note: All of the flags shown above (--apply, --copy, --edit) can also be used with the noto prev command to work with the previously generated commit message.

Switch between branches in your git repo with an interactive prompt:

noto checkout

Create and switch to a new branch:

noto checkout -b new-branch-name

Update noto to the latest version:

noto upgrade

noto will automatically detect your installation method and update itself accordingly.

Pro Tips

  • 🚀 Get fast commits on the fly with noto -a to streamline your workflow!

Contributing

We welcome contributions and suggestions! If you have ideas or improvements, feel free to open a pull request or reach out with feedback. ✨

Thank you for using noto!

License

This project is licensed under the MIT License. © 2025 Sithija Nelusha Silva

About

Generate clean commit messages in a snap! ✨

Topics

Resources

License

Stars

Watchers

Forks

Contributors 5