Skip to main content

commitcli is a cli to quick format your commits using conventional commits, odoo format or semantic git commits

Project description

Commit Cli

This project provides a cli to make git commits usings convetions in a terminal wizard like:

Checkit out on pypi.

Is a wrapper of the git commit -m command writed with 💟 on Python.

This was tested on a raspbian and a fedora OS with the nano, nvim and vim editor.

Features

Commitcli configuration file per project

You can add a .commitclirc file in your project directory.

you can copy the global .commitclirc file to your project directory and edit it to use a diferent format.

cp ~/.commitclirc .commitclirc

Conventional Commits Scope Cache

This tool uses a localfile .ignore.commitcli_modules to store the modules that you have already used in your commits and let you choose them on new commits.

but you can also use mongodb to store this cache, update on the .commitclirc file:

## ===============================================================
# from this default content in ~/.commitclirc

#Format for every commit
#supported formats free, odoo, sgc(semantic git commits) and cc (conventional commits)
format=cc

#Option to sign the commits o every commit, must be True or False
signgpg=False

#db configuration
db=localfile
db_url=localhost
db_port=27017
db_name=commitcli
#db_user=none
#db_password=none

## ===============================================================
# to this new content

#Format for every commit
#supported formats free, odoo, sgc(semantic git commits) and cc (conventional commits)
format=cc

#Option to sign the commits o every commit, must be True or False
signgpg=False

#db configuration
db=mongodb
db_url=localhost
db_port=27017
db_name=commitcli
#db_user=none -> just enable this if you have a user and password
#db_password=none -> just enable this if you have a user and password

Installation

pre requisites

i just need to install libgit2 to make it work

ubuntu

sudo nala install libgit2-dev

1 - UV

uv tool install commitcli

2 - PIP

note : use sudo if the local (user) python bin dir is not in the path

sudo pip install commitcli

Final - Config and enjoy

example content of the .commitclirc file:

#Format for every commit
#supported formats free, odoo, sgc(semantic git commits) and cc (conventional commits)
format=odoo

#Option to sign the commits o every commit, must be True or False
signgpg=False

change this to use cc on your project:

#Format for every commit
#supported formats free, odoo, sgc(semantic git commits) and cc (conventional commits)
format=cc

#Option to sign the commits o every commit, must be True or False
signgpg=False

save this file and add to your git repository and every comand will use cc format on this project.

Add files to commit

git add .

Use the tool

commitcli

Example

Odoo (default)

ejemplo de imagen

Configuration

This utility creates a file into the users home directory ~/.commitclirc in this file you will find some customizable options. the most important is the format option this option accepts this formats:

  • cc
  • odoo
  • free

Next Updates

  • only make a echo of a format
  • cli inline option to specify format (oddo, sgc, etc)
  • module list to chose for context in cc or something like this type(context)
  • quick templates
    • clean up
  • smarter
    • store module list and provide a list of modules to choose from and the last by default

Formats

  • conventional commits CC
  • semantic git commit SGC
  • odoo tags Odoo

Development

Help

using without install from the source

python -m commitcli

References

https://magmax.org/python-inquirer/

https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html

https://setuptools.readthedocs.io/en/latest/userguide/entry_point.html

https://medium.com/better-programming/python-click-building-your-first-command-line-interface-application-6947d5319ef7

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

commitcli-1.5.5.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

commitcli-1.5.5-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file commitcli-1.5.5.tar.gz.

File metadata

  • Download URL: commitcli-1.5.5.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for commitcli-1.5.5.tar.gz
Algorithm Hash digest
SHA256 f87e78b7e7edd4053c8d1c78ade70b73d6bc5fd095d4aa4ab66e62ce246204ae
MD5 b454088499b8a1b87f9936c1a7550a72
BLAKE2b-256 3c856f7ea51059228c8697df0b06aa05f263e7412440ec349abbeb663f70a855

See more details on using hashes here.

File details

Details for the file commitcli-1.5.5-py3-none-any.whl.

File metadata

  • Download URL: commitcli-1.5.5-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.14

File hashes

Hashes for commitcli-1.5.5-py3-none-any.whl
Algorithm Hash digest
SHA256 098029071009bc9993cd7a786d8cc0937c93f2e57c412da5a5216c07a9d91fd5
MD5 752ee37da81b99c76564fc94e037c681
BLAKE2b-256 deba1cc1d36ba8f529774d18484182a336c4425fdc41d452249f97bec768c76b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page