Introducing Smart Commit: My First CLI Tool for Smarter Git Commits
Hey devs!
I’m thrilled to introduce Smart Commit, my very first CLI tool that’s been an absolute game-changer for my workflow. I built it out of sheer frustration with messy, inconsistent commit messages and wanted a way to streamline my Git process. What started as a personal project quickly evolved into a robust tool packed with features that not only simplify my life but could help you too!
What is Smart Commit?
Smart Commit is a highly customizable CLI utility designed to guide you through the commit process interactively. It ensures your commit messages and branch names are consistent and well-formatted, integrating seamlessly with your development workflow.
Key Features
Interactive Prompts:
Pick exactly which prompts you need—from commit type, scope, summary, body, and footer, to ticket and CI tests. You get to tailor the commit process to your workflow.Template-Based Commit Messages:
Define your own commit message format using placeholders like{type}
,{summary}
,{body}
, and more. Total flexibility means your commit messages always follow your preferred style.CI Integration:
Optionally run a CI command before your commit. It’s a handy way to double-check your changes automatically.Auto Ticket Extraction:
Automatically extract a ticket ID from your branch name. No more manual copying and pasting—just seamless integration with your issue tracking!Push and Signed Commits:
Automatically push commits after creation with the--push
flag, and create GPG-signed commits using the--sign
flag for extra security.Commit Statistics & History Search:
View commit statistics as cool ASCII graphs (like a shortlog by author or an activity graph) or search your commit history by keyword, author, or date range. It’s all about keeping you informed about your project’s progress.Additional Commands:
Need to amend, rollback, or rebase? Smart Commit offers interactive commands for amending your last commit, rolling back changes (with options for soft or hard reset), and even a rebase helper with in-editor guidance.Advanced Branch Creation:
Thesc branch
command lets you create a new branch from a base branch (or current HEAD) using a customizable naming template. With support for universal placeholders, branch type selection, and custom sanitization rules, creating and managing branches has never been easier.
My Journey and Call for Contributions
I built Smart Commit to solve a very personal problem—dealing with messy commits—and I’m really proud of what it can do. This is my very first library, and it’s been a journey of learning, experimenting, and improving. I’m super open to feedback, suggestions, and contributions. Whether you have ideas to make it even better or want to jump in and contribute code, please feel free to open issues or submit pull requests.
Let’s build something awesome together!
Check It Out
You can find Smart Commit on GitHub here: Smart Commit on GitHub
Thanks a ton for taking a look, and happy coding!
Top comments (0)