clishelf


Nameclishelf JSON
Version 0.2.15 PyPI version JSON
download
home_pageNone
SummaryA CLI tools and hooks on my shelf
upload_time2025-01-29 12:08:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9.13
licenseNone
keywords utility cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # _CLI Shelf_

[![test](https://github.com/korawica/clishelf/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/korawica/clishelf/actions/workflows/tests.yml)
[![codecov](https://codecov.io/gh/korawica/clishelf/graph/badge.svg?token=7PF8JN2EIG)](https://codecov.io/gh/korawica/clishelf)
[![pypi version](https://img.shields.io/pypi/v/clishelf)](https://pypi.org/project/clishelf/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/clishelf?logo=pypi)](https://pypi.org/project/clishelf/)
[![size](https://img.shields.io/github/languages/code-size/korawica/clishelf)](https://github.com/korawica/clishelf)
[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![gh license](https://img.shields.io/github/license/ddeutils/ddeutil-observe)](https://github.com/ddeutils/ddeutil-workflow/blob/main/LICENSE)

A CLI tools and hooks on my shelf for my any Python packages.
This project help me to make Versioning, run Abbreviate of Git CLI.

> [!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 by [`Click`](https://github.com/pallets/click/).

## :round_pushpin: Installation

```shell
pip install -U 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.15"`  |         :x:          |
| `>=3.9.13,<3.14` | `pip install -U clishelf`                 |  :heavy_check_mark:  |

> [!WARNING]
> This package already install `pre-commit` with the latest version.

## :rocket: Pre-Commit Hook

See [pre-commit](https://github.com/pre-commit/pre-commit) for instructions

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

## :tada: Features

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

```text
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.

```text
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.

```text
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.

```text
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`:

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

`pyproject.toml`:

```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

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

| Module   | Key                        | Default                                 | Description                                                                                         |
|:---------|:---------------------------|:----------------------------------------|:----------------------------------------------------------------------------------------------------|
| git      | commit_prefix              | `None`                                  | Commit prefix that want to override/append                                                          |
|          | commit_prefix_group        | `None`                                  | Commit prefix group that want to override/append                                                    |
|          | commit_msg_format          | `"{emoji} {prefix}: {subject}"`         | Commit message format that use to prepare                                                           |
|          | commit_prefix_pre_demojize | `True`                                  | Auto de-emoji on a commit log subject                                                               |
|          | commit_prefix_force_fix    | `False`                                 | Force fix if commit message does not match with normal form                                         |
| version  | version                    | `"./{PROJECT-NAME}/__about__.py"`       | Version tracking file location path (with `.py` format)                                             |
|          | changelog                  | `"CHANGELOG.md"`                        | Changelog file location path                                                                        |
|          | mode                       | `"normal"`                              | `"normal"` for normal version<br>`"datetime"` for datetime time mode (format `%Y%m%d.%pre-release`) |
|          | commit_subject_format      | `"{emoji} {prefix}: {subject}"`         | Commit subject format that use to writing a changelog file with `commit_msg_format`                 |
|          | commit_msg_format          | `"- {subject} (_{datetime:%Y-%m-%d}_)"` | Commit message format that use to writing a changelog file                                          |

## :dart: Mini-Roadmap

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

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

## :speech_balloon: Contribute

I do not think this project will go around the world because it has specific propose,
and you can create by your coding without this project dependency for long term
solution. So, on this time, you can open [the GitHub issue on this project :raised_hands:](https://github.com/korawica/clishelf/issues)
for fix bug or request new feature if you want it.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "clishelf",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9.13",
    "maintainer_email": null,
    "keywords": "utility, cli",
    "author": null,
    "author_email": "korawica <korawich.anu@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/28/ab/c8ec95cae16bf96375480838f7c4a821980e1b47e9c36127802ab9723b7e/clishelf-0.2.15.tar.gz",
    "platform": null,
    "description": "# _CLI Shelf_\n\n[![test](https://github.com/korawica/clishelf/actions/workflows/tests.yml/badge.svg?branch=main)](https://github.com/korawica/clishelf/actions/workflows/tests.yml)\n[![codecov](https://codecov.io/gh/korawica/clishelf/graph/badge.svg?token=7PF8JN2EIG)](https://codecov.io/gh/korawica/clishelf)\n[![pypi version](https://img.shields.io/pypi/v/clishelf)](https://pypi.org/project/clishelf/)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/clishelf?logo=pypi)](https://pypi.org/project/clishelf/)\n[![size](https://img.shields.io/github/languages/code-size/korawica/clishelf)](https://github.com/korawica/clishelf)\n[![code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![gh license](https://img.shields.io/github/license/ddeutils/ddeutil-observe)](https://github.com/ddeutils/ddeutil-workflow/blob/main/LICENSE)\n\nA CLI tools and hooks on my shelf for my any Python packages.\nThis project help me to make Versioning, run Abbreviate of Git CLI.\n\n> [!NOTE]\n> This project was created because I do not want to hard code set up all of them\n> every time when I start create a new Python package :tired_face:. I provide some\n> reusable CLIs that was implemented by [`Click`](https://github.com/pallets/click/).\n\n## :round_pushpin: Installation\n\n```shell\npip install -U clishelf\n```\n\nIn the future, I will add more the CLI tools that able to dynamic with\nmany style of config such as I want to make changelog file with style B by my\ncustom message code.\n\n**Dependency supported**:\n\n| Python Version   | Installation                              |  Support Fixed Bug   |\n|:-----------------|:------------------------------------------|:--------------------:|\n| `== 3.8`         | `pip install \"clishelf>=0.1.10,<0.2.15\"`  |         :x:          |\n| `>=3.9.13,<3.14` | `pip install -U clishelf`                 |  :heavy_check_mark:  |\n\n> [!WARNING]\n> This package already install `pre-commit` with the latest version.\n\n## :rocket: Pre-Commit Hook\n\nSee [pre-commit](https://github.com/pre-commit/pre-commit) for instructions\n\n```yaml\n- repo: https://github.com/korawica/clishelf\n  rev: v0.2.15\n  hooks:\n    - id: shelf-commit-msg\n      stages: [commit-msg]\n```\n\n## :tada: Features\n\nThis Utility Package provide some CLI tools for handler development process.\n\n```text\nUsage: shelf.exe [OPTIONS] COMMAND [ARGS]...\n\n  The Main Shelf commands.\n\nCommands:\n  conf   Return config for clishelf commands\n  cove   Run the coverage command.\n  dep    List of Dependencies that was set in pyproject.toml file.\n  emoji  The Emoji commands\n  git    The Extended Git commands\n  vs     The Versioning commands.\n```\n\n### Extended Git\n\nThis is abbreviation of Git CLI that warped with the Python subprocess package.\n\n```text\nUsage: shelf.exe git [OPTIONS] COMMAND [ARGS]...\n\n  The Extended Git commands\n\nCommands:\n  bn-clear     Clear Local Branches that sync from the Remote repository.\n  cm           Prepare and show the latest commit message with the commit...\n  cm-prev      Commit changes to the Previous Commit with same message.\n  cm-revert    Revert the latest Commit on the Local repository.\n  mg           Merge change from another branch with strategy, `theirs`...\n  tg-clear     Clear Local Tags that sync from the Remote repository.\n```\n\n### Versioning\n\nThis is the enhancement `bump2version` Python package for my bumping style.\n\n```text\nUsage: shelf.exe vs [OPTIONS] COMMAND [ARGS]...\n\n  The Versioning commands.\n\nCommands:\n  bump       Bump package version with a next tag value with an input...\n  changelog  Make a changelog file that generate form previous commits.\n  current    Return Current Version that read from ``__about__`` by default.\n```\n\n### Emoji\n\nThis is the emoji CLI that getting data from GitHub dataset.\n\n```text\nUsage: shelf.exe emoji [OPTIONS] COMMAND [ARGS]...\n\n  The Emoji commands\n\nCommands:\n  fetch  Refresh emoji metadata file on assets folder.\n```\n\n## :cookie: Configuration\n\n### Basic Setting\n\n`.clishelf.yaml`:\n\n```yaml\nversion:\n  version: \"./clishelf/__about__.py\"\n  changelog: \"CHANGELOG.md\"\n  mode: \"normal\"\n```\n\n`pyproject.toml`:\n\n```toml\n[tool.shelf.version]\nversion = \"./clishelf/__about__.py\"\nchangelog = \"CHANGELOG.md\"\nmode = \"normal\"\n```\n\n> [!IMPORTANT]\n> The bump version mode able to be `normal` or `datetime` only.\n\n### Override Commit Prefix\n\n```yaml\ngit:\n  commit_prefix:\n    - [\"comment\", \"Documents\", \":bulb:\"]  # \ud83d\udca1\n    - [\"typos\", \"Documents\", \":pencil2:\"]  # \u270f\ufe0f\n  commit_prefix_group:\n    - [\"Features\", \":tada:\"]  # \ud83c\udf89\n```\n\n| Module   | Key                        | Default                                 | Description                                                                                         |\n|:---------|:---------------------------|:----------------------------------------|:----------------------------------------------------------------------------------------------------|\n| git      | commit_prefix              | `None`                                  | Commit prefix that want to override/append                                                          |\n|          | commit_prefix_group        | `None`                                  | Commit prefix group that want to override/append                                                    |\n|          | commit_msg_format          | `\"{emoji} {prefix}: {subject}\"`         | Commit message format that use to prepare                                                           |\n|          | commit_prefix_pre_demojize | `True`                                  | Auto de-emoji on a commit log subject                                                               |\n|          | commit_prefix_force_fix    | `False`                                 | Force fix if commit message does not match with normal form                                         |\n| version  | version                    | `\"./{PROJECT-NAME}/__about__.py\"`       | Version tracking file location path (with `.py` format)                                             |\n|          | changelog                  | `\"CHANGELOG.md\"`                        | Changelog file location path                                                                        |\n|          | mode                       | `\"normal\"`                              | `\"normal\"` for normal version<br>`\"datetime\"` for datetime time mode (format `%Y%m%d.%pre-release`) |\n|          | commit_subject_format      | `\"{emoji} {prefix}: {subject}\"`         | Commit subject format that use to writing a changelog file with `commit_msg_format`                 |\n|          | commit_msg_format          | `\"- {subject} (_{datetime:%Y-%m-%d}_)\"` | Commit message format that use to writing a changelog file                                          |\n\n## :dart: Mini-Roadmap\n\n- (**Optional**) I will implement use `rich` and `alive-progress` to this project for make\n  interface terminal prettier.\n- (**Optional**) Dynamic emoji changing for support other platform such as GitLab.\n- (**BIG**) Remove `bump2version` package and implement my bump function instead.\n\n> [!NOTE]\n> I will migrate this code from **Python** to **Rust** for performance of this CLI\n> (But I will observe for this again because this package does not have any issue with perf as well).\n\n## :speech_balloon: Contribute\n\nI do not think this project will go around the world because it has specific propose,\nand you can create by your coding without this project dependency for long term\nsolution. So, on this time, you can open [the GitHub issue on this project :raised_hands:](https://github.com/korawica/clishelf/issues)\nfor fix bug or request new feature if you want it.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A CLI tools and hooks on my shelf",
    "version": "0.2.15",
    "project_urls": {
        "Homepage": "https://github.com/korawica/clishelf/",
        "Source Code": "https://github.com/korawica/clishelf/"
    },
    "split_keywords": [
        "utility",
        " cli"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "602b3f3b5f7d8dc4eb12b551bf37af6c837491077ff966832427edff9e73ce7b",
                "md5": "ab57026f2e347a509f9feca8ca4f19e7",
                "sha256": "0b07c16005f8871c6c2d485f3269246b90867de9768257035f00b960a0cbd93c"
            },
            "downloads": -1,
            "filename": "clishelf-0.2.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ab57026f2e347a509f9feca8ca4f19e7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.13",
            "size": 41091,
            "upload_time": "2025-01-29T12:08:48",
            "upload_time_iso_8601": "2025-01-29T12:08:48.919692Z",
            "url": "https://files.pythonhosted.org/packages/60/2b/3f3b5f7d8dc4eb12b551bf37af6c837491077ff966832427edff9e73ce7b/clishelf-0.2.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "28abc8ec95cae16bf96375480838f7c4a821980e1b47e9c36127802ab9723b7e",
                "md5": "0fc7badf09525f505b554aab442d5428",
                "sha256": "cea27c6a277988118c437b31fd594a5ed26b520bb4eed0c5d6bae28c1847bfce"
            },
            "downloads": -1,
            "filename": "clishelf-0.2.15.tar.gz",
            "has_sig": false,
            "md5_digest": "0fc7badf09525f505b554aab442d5428",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.13",
            "size": 44241,
            "upload_time": "2025-01-29T12:08:50",
            "upload_time_iso_8601": "2025-01-29T12:08:50.209315Z",
            "url": "https://files.pythonhosted.org/packages/28/ab/c8ec95cae16bf96375480838f7c4a821980e1b47e9c36127802ab9723b7e/clishelf-0.2.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-29 12:08:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "korawica",
    "github_project": "clishelf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "clishelf"
}
        
Elapsed time: 1.87156s