Skip to main content

CLI on my shelf (Tools and Hooks) for any my Python packages

Project description

CLI Shelf

test codecov pypi version PyPI - Python Version size code style: black gh license

This is the CLI on my shelf (Tools and Hooks) for any my Python packages that help me to make Versioning, run Abbreviate of Git CLI, and Wrapped Dev Python packages (more-itertools, pre-commit, ...) on my any Python package repositories.

[!NOTE] This project was created because I do not want to hard code set up all of them every time when I start create a new Python package :tired_face:. I provide some reusable CLIs that was implemented from Click.

:round_pushpin: 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.

Dependency supported:

Python Version Installation Support Fixed Bug
== 3.8 pip install "clishelf>=0.1.10,<0.2.8" :x:
>=3.9.13,<3.13 pip install -U clishelf :heavy_check_mark:

:rocket: Pre-Commit Hook

See pre-commit for instructions

- repo: https://github.com/korawica/clishelf
  rev: v0.2.8
  hooks:
    - id: shelf-commit-msg
      stages: [commit-msg]

:tada: Features

This Utility Package provide some CLI tools for handler development process.

Usage: shelf.exe [OPTIONS] COMMAND [ARGS]...

  The Main Shelf commands.

Commands:
  conf   Return config for clishelf commands
  cove   Run the coverage command.
  dep    List of Dependencies that was set in pyproject.toml file.
  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

Commands:
  bn-clear     Clear Local Branches that sync from the Remote repository.
  cm           Prepare and show the latest commit message with the commit...
  cm-prev      Commit changes to the Previous Commit with same message.
  cm-revert    Revert the latest Commit on the Local repository.
  mg           Merge change from another branch with strategy, `theirs`...
  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.

Commands:
  bump       Bump package version with a next tag value with an input...
  changelog  Make a changelog file that generate form previous commits.
  current    Return Current Version that read from ``__about__`` by default.

Emoji

This is the emoji CLI that getting data from GitHub dataset.

Usage: shelf.exe emoji [OPTIONS] COMMAND [ARGS]...

  The Emoji commands

Commands:
  fetch  Refresh emoji metadata file on assets folder.

:cookie: Configuration

Basic Setting

.clishelf.yaml:

version:
  version: "./clishelf/__about__.py"
  changelog: "CHANGELOG.md"
  mode: "normal"

pyproject.toml:

[tool.shelf.version]
version = "./clishelf/__about__.py"
changelog = "CHANGELOG.md"
mode = "normal"

[!IMPORTANT] The bump version mode able to be normal or datetime only.

Override Commit Prefix

git:
  commit_prefix:
    - ["comment", "Documents", ":bulb:"]  # 💡
    - ["typos", "Documents", ":pencil2:"]  # ✏️
  commit_prefix_group:
    - ["Features", ":tada:"]  # 🎉

:dart: Mini-Roadmap

  • I will implement use rich and alive-progress to this project for make interface terminal prettier.
  • Dynamic emoji changing for support other platform such as GitLab.
  • (BIG) Remove bump2version package and implement the own bump function.

[!NOTE] I will migrate this code from Python to Rust for performance of CLI (But I will observe for this again because this package does not have any issue with perf as well.)

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

clishelf-0.2.8.tar.gz (41.0 kB view details)

Uploaded Source

Built Distribution

clishelf-0.2.8-py3-none-any.whl (38.3 kB view details)

Uploaded Python 3

File details

Details for the file clishelf-0.2.8.tar.gz.

File metadata

  • Download URL: clishelf-0.2.8.tar.gz
  • Upload date:
  • Size: 41.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for clishelf-0.2.8.tar.gz
Algorithm Hash digest
SHA256 7d4275cc39e908df62516541f4048b74dfd5ecd9693159291a750b193e699e25
MD5 5c627af9288f76e366e1b9c61e347444
BLAKE2b-256 6ddcc5978801d13cf32b5e487c859d9af379fdd6401f0c5f4e50d5eb21c278f7

See more details on using hashes here.

File details

Details for the file clishelf-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: clishelf-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 38.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for clishelf-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 475688749dbe4025fec3cbc45837b51e914712f4a893b7b4b228d9a660f9dce5
MD5 4ce7780abb5c87ff00ae80a93dddc5b0
BLAKE2b-256 0b238a33d27efaa85ed1ddfb9ffbe21e621c57ddc57a782703f3ae8b02ceb82f

See more details on using hashes here.

Supported by

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