Auto-commit tool integrated with Stackspot AI
Project description
Stackspot Commit Helper
Overview
The Stackspot Commit Helper is a Python tool that automates Git commit message generation using Stackspot AI. It analyzes your code changes and creates meaningful commit messages while handling the commit and push operations seamlessly.
Features
- 🤖 AI-Powered Commit Messages: Generates contextual commit messages based on your code changes
- 🔄 Automated Git Workflow: Handles staging, commit and push operations
- 🔢 Branch Number Integration: Optional inclusion of branch numbers in commit messages
- ⚡ Simple CLI Interface: Easy to use command-line tool
- 🔐 Secure Configuration: Environment variable based configuration
Stackspot Credentials
To use Stackspot's AI for commit message generation, you must set up credentials with the Stackspot Platform.
-
Create an account at Stackspot Platform.
-
Go to Stackspot AI.
-
Access Profile → Access Token.
-
Create new credentials and copy the following:
Client ID
Client Secret
Realm
Installation
Install using pip:
pip install stackspot-commit-helper
After installation, set the following environment variables to configure the tool based on your system::
STACKSPOT_CLIENT_ID="your_client_id"
STACKSPOT_CLIENT_SECRET="your_client_secret"
STACKSPOT_REALM="your_realm"
QUICK_COMMAND_COMMIT="your_quick_command_name" # Optional: if your account has the 'generate-git-commit-message' command
Usage
Once the tool is installed and configured, you can use it from the terminal:
Commit and Push To run the tool and generate a commit message based on the code changes:
scommit
Include Branch Number If you want to include the current branch number in your commit message, you can use the -b or --branch option:
scommit -b
This will prepend the branch number (if available) to the generated commit message, like [#123] - <commit_message>.
Dependencies
This tool requires the following Python packages:
python-dotenv – For loading environment variables from a .env file.
stackspot – For interacting with Stackspot's AI services.
Troubleshooting
No Changes to Commit
If the tool reports "No changes to commit", it means that there are no unstaged changes in your Git repository. Ensure that you have made changes before running the command.
Stackspot API Error
If there is an issue with the Stackspot API (e.g., invalid credentials or a failed execution), you will receive an error message. Make sure your Stackspot credentials are correct and try again.
Contributing
Contributions are welcome! If you find a bug or have a feature request, feel free to open an issue or submit a pull request.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stackspot_commit_helper-0.1.9.tar.gz.
File metadata
- Download URL: stackspot_commit_helper-0.1.9.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af107f1e190413dc029d607a97a60f51858e39c8e3cbe3afc9fe65335949cc4c
|
|
| MD5 |
261abed01db9a7ed1cd9c94f964ecb75
|
|
| BLAKE2b-256 |
e2f4c3d3750efd608eafc3c35407e23f59b6c5249f94c3c6ee3b7aec75b74572
|
Provenance
The following attestation bundles were made for stackspot_commit_helper-0.1.9.tar.gz:
Publisher:
python-publish.yml on engeziellithonzup/stackspot-commit-helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stackspot_commit_helper-0.1.9.tar.gz -
Subject digest:
af107f1e190413dc029d607a97a60f51858e39c8e3cbe3afc9fe65335949cc4c - Sigstore transparency entry: 202248053
- Sigstore integration time:
-
Permalink:
engeziellithonzup/stackspot-commit-helper@2ab1d3e71a6518c345bb5c41e581523779f8b977 -
Branch / Tag:
refs/tags/0.1.9 - Owner: https://github.com/engeziellithonzup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2ab1d3e71a6518c345bb5c41e581523779f8b977 -
Trigger Event:
release
-
Statement type:
File details
Details for the file stackspot_commit_helper-0.1.9-py3-none-any.whl.
File metadata
- Download URL: stackspot_commit_helper-0.1.9-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
549b352e0afe13392ea4034d513853fe7d47a4d7e598fd6ae511e1a8afc4945d
|
|
| MD5 |
de739941f6cf2db3617d55b905296106
|
|
| BLAKE2b-256 |
584f91ed74b17b2dfc2b9b0aa178848a87c6f9804027523fe90ae46daca2d6da
|
Provenance
The following attestation bundles were made for stackspot_commit_helper-0.1.9-py3-none-any.whl:
Publisher:
python-publish.yml on engeziellithonzup/stackspot-commit-helper
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
stackspot_commit_helper-0.1.9-py3-none-any.whl -
Subject digest:
549b352e0afe13392ea4034d513853fe7d47a4d7e598fd6ae511e1a8afc4945d - Sigstore transparency entry: 202248056
- Sigstore integration time:
-
Permalink:
engeziellithonzup/stackspot-commit-helper@2ab1d3e71a6518c345bb5c41e581523779f8b977 -
Branch / Tag:
refs/tags/0.1.9 - Owner: https://github.com/engeziellithonzup
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2ab1d3e71a6518c345bb5c41e581523779f8b977 -
Trigger Event:
release
-
Statement type: