Package Exports
- @justadi10/logline
- @justadi10/logline/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@justadi10/logline) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Logline
Git CLI tool that writes my commit messages for me.
Logline makes committing code frictionless and consistent without forcing you to remember Conventional Commit rules or manually type messages every time. It uses AI to analyze your code changes and generates meaningful commit messages automatically.
Features
- ** AI-Powered Messages**: Uses Google Gemini to analyze your git diff and generate contextually relevant commit messages
- ** Conventional Commits**: Automatically follows conventional commit format (
type(scope): description
) - ** Interactive CLI**: Simple yes/no prompts with option to customize messages
- ** Smart Analysis**: Understands code changes, not just filenames
- ** Zero Configuration**: Works out of the box with minimal setup
- ** Fallback Support**: Works even without AI when API is unavailable
Installation
Global Installation
npm install -g logline
Local Development
git clone https://github.com/JustAdi10/Logline.git
cd Logline
npm install
npm link # Makes 'lol' command available globally
🔑 Setup
Get your free Gemini API key from Google AI Studio
Create a
.env
file in your project directory:
echo "GEMINI_API_KEY=your-api-key-here" > .env
- Or set it as an environment variable:
export GEMINI_API_KEY="your-api-key-here"
Usage
Basic Usage
- Stage your changes as usual:
git add .
- Run Logline instead of
git commit
:
lol # or `logline` if you prefer
- Review the AI-generated commit message:
Generating commit message with AI...
Suggested commit message:
feat: add AI-powered commit message generation
✔ Use this commit message? › (Y/n)
- Choose your action:
- Yes: Commits with the suggested message
- No: Prompts you to enter a custom message
- Ctrl+C: Cancels the operation
Example Workflow
# Make your changes
echo "console.log('Hello World')" >> app.js
# Stage changes
git add app.js
# Let Logline handle the commit
lol
Example Messages
Instead of generic messages, Logline generates contextual ones:
Traditional | Logline Generated |
---|---|
update app.js |
feat: add hello world logging functionality |
fix bug |
fix: resolve undefined variable error in auth |
change readme |
docs: update installation instructions |
How It Works
- Analyzes Changes: Reads your
git diff --staged
to understand what actually changed - AI Processing: Sends the diff to Gemini AI with specialized prompts for commit message generation
- Format Enforcement: Ensures output follows conventional commit standards
- User Control: Always gives you the final say on the commit message
Configuration
Environment Variables
Variable | Description | Default |
---|---|---|
GEMINI_API_KEY |
Your Google Gemini API key | Required for AI features |
Fallback Behavior
When AI is unavailable (no API key, network issues, etc.), Logline falls back to intelligent file-based analysis:
feat
: New source files or significant additionsfix
: Changes containing "fix", "bug", or error handlingdocs
: Documentation file changestest
: Test file modificationschore
: Configuration, dependency, or maintenance changes
Contributing
We welcome contributions! Here's how to get started:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and test them
- Use Logline to commit:
lol
😉 - Push and create a pull request
License
This project is licensed under the ISC License - see the LICENSE file for details.
Acknowledgments
- Google Gemini for powering the AI commit message generation
- Conventional Commits for the commit message format standards
- The developer community for inspiration on making git workflows more enjoyable
Issues & Support
Found a bug or have a feature request?
- Open an issue
- Check existing issues before creating a new one
- Include your OS, Node version, and error messages
Stats
Made with ❤️ by developers, for developers who want better commit messages without the hassle.