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. Run the following command to set it up:

noto config key # or simply noto config key YOUR_API_KEY

Optionally, if you wish to configure a different Gemini model (the default model will be used if not configured), run:

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

Specify the commit type for your commit message:

noto --type # or simply noto -t

noto --type chore # or simply noto -t chore

Open an interactive editor to refine the generated commit message:

noto --edit # or simply noto -e

Combine all flags to specify the commit type, open the interactive editor, and apply the generated commit message in one go:

noto --edit --type feat --apply  # or simply: noto -e -t feat -a

This command will generate a commit message for a "feat" commit, let you refine it interactively, and then apply it directly to your current commit.

Retrieve the previously generated commit message:

noto prev

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

Pro Tips

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

Contributing

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

Thank you for using noto! If you have any feedback or suggestions, feel free to reach out or contribute to the project. ✨

License

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