Utility CLI Tools that reusable for develop any Python Package
Project description
Utility Package: CLI Shelf
Table of Contents:
This is the Utility CLI Tools and Hooks on the Shelf for my Python packages that help me to make versioning, abbreviate Git CLI and logging on my any Python package repositories, because I do not want to hard code or set up the development flow every time that I create the new Python package project :tired_face:.
Installation
pip install clishelf
In the future, I will add more the CLI tools that able to dynamic with many style of config such as I want to make changelog file with style B by my custom message code.
Pre-Commit Hook
See pre-commit for instructions
- repo: https://github.com/korawica/clishelf
rev: v0.x.x
hooks:
- id: shelf-commit-msg
Features
This Utility Package provide some CLI tools for handler development process.
Usage: shelf.exe [OPTIONS] COMMAND [ARGS]...
The Main Shelf commands.
Options:
--help Show this message and exit.
Commands:
conf Return config for clishelf commands
cove Run the coverage command.
dep List of Dependencies that was set in pyproject.toml file.
echo Echo Hello World
emoji The Emoji commands
git The Extended Git commands
vs The Versioning commands.
Extended Git
This is abbreviation of Git CLI that warped with the Python subprocess package.
Usage: shelf.exe git [OPTIONS] COMMAND [ARGS]...
The Extended Git commands
Options:
--help Show this message and exit.
Commands:
bn Show the Current Branch name.
bn-clear Clear Local Branches that sync from the Remote repository.
cm Show the latest Commit message
cm-prev Commit changes to the Previous Commit with same message.
cm-revert Revert the latest Commit on the Local repository.
df Show changed files from previous commit to HEAD
init Initialize GIT config on local
log Show the Commit Logs from the latest Tag to HEAD.
mg Merge change from another branch with strategy, `theirs`...
pf Show Profile object that contain Name and Email of Author
tg Show the Latest Tag if it exists, otherwise it will show...
tg-clear Clear Local Tags that sync from the Remote repository.
Versioning
This is the enhancement bump2version
Python package for my bumping style.
Usage: shelf.exe vs [OPTIONS] COMMAND [ARGS]...
The Versioning commands.
Options:
--help Show this message and exit.
Commands:
bump Bump Version with specific action.
changelog Make Changelogs file
conf Return the config data for bumping version.
current Return Current Version that read from ``__about__`` by default.
tag Create the Git tag by version from the ``__about__`` file.
Emoji
This is the emoji CLI that getting data from GitHub dataset.
Usage: shelf.exe emoji [OPTIONS] COMMAND [ARGS]...
The Emoji commands
Options:
--help Show this message and exit.
Commands:
fetch Refresh emoji metadata file on assets folder.
ls List all emojis from metadata file.
Configuration
The configuration able to be .clishelf.yaml
or mapping value in pyproject.toml
.
.clishelf.yaml
:
git:
commit_prefix:
- ["comment", "Documents", ":bulb:"] # 💡
- ["typos", "Documents", ":pencil2:"] # ✏️
commit_prefix_group:
- ["Features", ":tada:"] # 🎉
version:
version: "./clishelf/__about__.py"
changelog: "CHANGELOG.md"
mode: "normal"
pyproject.toml
:
[tool.shelf.version]
version = "./clishelf/__about__.py"
changelog = "CHANGELOG.md"
mode = "normal"
Note:
The bump version mode able to benormal
ordatetime
only.
License
This project was licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.