How to use AutoCommitMsg in the terminal instead of as an extension
This gives flexibility so you don't want to use VS Code or if you want to use the terminal inside sidepanel for your commit workflow.
See steps below to setup and run the tool in the CLI.
Note
For development, see CLI Development.
The pre-built binaries are added to releases on GitHub so you can install them without needing the project or Node.
macOS and Linux:
curl -fsSL https://raw.githubusercontent.com/MichaelCurrin/auto-commit-msg/refs/heads/master/bin/install_cli.sh | bashWarning this is experimental Windows PowerShell:
iwr https://github.com/username/repo/releases/latest/download/install.ps1 -useb | iexTip
To setup as a pre-commit hook, see Shell
Use the -h or --help flags with any of these to avoid making changes.
This is the main command you should use.
Note this will commit, so if you want to experiment with commit output without committing, use the command below instead.
No flags are needed.
$ gacm --helpThis will not commit.
No flags are needed.
$ acm --helpThis is a simpler command which does not interact with Git, intended for integrating with the Bash shell.
$ auto_commit_message_generate "$CHANGES"The behavior depends on how Git treats files, so you should know these points:
- The commands will pick up on staged changes and certain unstaged changes (modified and deleted, but not created as they are untracked).
- If you want to handle created files, make sure to stage them first.
- If you want to target only select changes for smaller commit, then stage stages and use the
--cachedflag to ignored unstaged changes.
If you get permission denied error, you can do this and then go back to the install step.
$ npm unlink -g auto-commit-msg