Communicating through git professionally
autogit is a CLI tool to validate submitted commits according to git conventional commits standard. the tool allows to generate changelogs for releases in different formats. the ability to see quickly how your changelog looks motivates you to write more meaningful commits.
as a result of the tool work, you have decreased toll on release documentation writing, you communicate developer work better to other developers/users, and have a more professional-looking repository in terms of commits, tags, versions, releases, and changelogs.
- hooks to git-hooks and works to validate your git commits to git conventional commits standard for any git tool.
- has extra possible validating rules to configure, like having a minimum of 3 words in a subject of commit.
autogit hook activate --global
(flag to turn it on for all repos)
- suggests next semantic version for your product release with
autogit semver
- has options to suggest the next version as alpha, beta, or pre-release version with build metadata.
- generates changelogs with
autogit changelog
command- currently supports markdown and bbcode formats
- has option
--validate
to run validation of commits (for CI usage)
- easy create and push of a git tag with auto-inserted changelog through
autogit semver --tag --push
- initialize settings for more customization with
autogit init
inside a git repo- uncomment and override desired settings
- find out more commands and options with
autogit [any set of sub commands] --help
- CI-friendly binary file, which not require any dependencies for its usage for everything
- see CI example
- compiled for linux/windows/macos and amd64/arm64/386/arm
- Contains inbuilt git. Not requiring git to be installed for its functionality
- install latest
- install git if not present with
apt install -y git
- init git repo if not present
git init && git config user.email "you@example.com" && git config user.name example
- activating git hook,
autogit hook activate --global
(optionally global for all repos) - write some commits:
echo 123 >> README.md && git add -A && git commit -m "feat: init repo with first code"
echo 123 >> README.md && git add -A && git commit -m "fix: memory leak in sql connection opener"
echo 123 >> README.md && git add -A && git commit -m "feat: new super feature"
echo 123 >> README.md && git add -A && git commit -m 'feat!: new super feature'
BREAKING CHANGE: api for endpoint status changed to users-status'
- due to bash using !
as a keyword syntax, we need to use ''
single quotes
echo 123 >> README.md && git add -A && git commit -m "fix(api): example of scoped bug fix"
- generate changelog with
autogit changelog
video_instruction.mp4
go install github.com/darklab8/autogit/v2@latest
- install curl if not installed.(
apt update && apt install -y curl
for debian/ubuntu) - install git if not present (
apt update && apt install -y git
for debian/ubuntu) - install autogit with
sudo rm $(which autogit) ; sudo rm /usr/local/bin/autogit ; sudo curl -L $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/darklab8/autogit/releases/latest | sed "s/releases\/tag/releases\/download/")/autogit-linux-amd64 -o /usr/local/bin/autogit && sudo chmod 777 /usr/local/bin/autogit
- check installation with
autogit version
command. Expect to seeOK autogit version: v{version}
- install with
sudo rm $(which autogit) ; sudo rm /usr/local/bin/autogit ; sudo curl -L https://github.com/darklab8/autogit/releases/download/v{VERSION}/autogit-linux-amd64 -o /usr/local/bin/autogit && sudo chmod 777 /usr/local/bin/autogit
- install Git Bash
- install lautogit
mkdir -p ~/bin ; rm $(which autogit) ; curl -L $(curl -Ls -o /dev/null -w %{url_effective} https://github.com/darklab8/autogit/releases/latest | sed "s/releases\/tag/releases\/download/")/autogit-windows-amd64.exe -o ~/bin/autogit.exe && chmod 777 ~/bin/autogit.exe
- check installation with
autogit version
command. Expect to seeOK autogit version: v{version}
P.S. ~/bin/autogit.exe
must be any valid bin path (echo $PATH
, echo %PATH%
to get the list) accessable by your tool from where u are going to use it.
flowchart TD
UI[Interface-CLI\nUser interface via Cobra CLI third party lib]
UI --> Actions[Actions\nreusable actions without\nattachements to UI details]
Actions --> SemanticGit[Semantic Git\nImplements main business logic of repository\nwith added logic of conventional commits\nAnd semantic versioning]
Actions --> Validator[Validator\nRules for optional validations]
Validator --> SemanticGit
Actions --> Changelog[Changelog\nHow to generate one]
Changelog ---> SemanticGit
Changelog --> Markdown[in Markdown]
Changelog ---> OtherFormats[in other formats]
SemanticGit --> SemVer[SemVer\nimplements original Semantic Version\naccording to SemVer2.0.0 standard\nImplemented in current repo]
SemanticGit --> Git[Git\ngit wrapper to simple interface\nfor current repository logic\nimplemented in current repo]
Git --> GitGo[Git-Go\nEngine under the hood for\nGit repository operations\nImplemented by third party]
- Unit testable first, everything else later.
- Justified abstractions will appear with a strict minimal interface to reduce the overall complexity of a code.
- High usage of
type NewType string
for more self-documentation - Trying to find the domain language of the tool
- Minimize third-party lib dependencies
- Simplify end-user installation
- No auto-updates inside the program. Everything should work offline.
- CI-friendly, zero system dependencies solution
- Unit testing for Linux, checking for Windows, and compiling for macOS.
- @dd84ai at
dark.dreamflyer@gmail.com
- open Pull Requests with question
- Darklab Discord server
autogit was originally created by Andrei Novoselov (aka darkwind, aka dd84ai) The work is released under GPL license, free to modify, copy and etc. as long as you keep code open source and mentioned original author. See LICENSE file for details.