SAM is a CLI tool that generates commit messages based on the changes in a Git repository using OpenAI's GPT-4o-mini language model.
- Go (version 1.16 or later)
- Git
-
Clone the SAM repository:
git clone https://github.com/blackestwhite/sam.git
-
Change to the SAM directory:
cd sam
-
Make installer executable
chmod +x ./install.sh
-
Run installer
./install.sh
Once SAM is installed, you can use it as follows:
sam <command>
commit
: Generates a commit message based on the changes in the Git repository.improve
: Suggest improvements, fix bugs, and propose new features for the projectrequest
: Handle specific requests based on project analysis for example:sam request "how to add feature x"
help
: Displays usage information.
SAM requires an API key from OpenAI to generate commit messages. Before using SAM, you need to set up your API key by creating a .samrc
file in your home directory ($HOME
) and adding your API key to it.
Example .samrc
file:
OPENAI_API_KEY="sk-xxxxxxxxxxxxxxxxxx"
Ethereum: blackestwhite.eth
TON(Telegram Open Network): blackestwhite.ton