clishelf


Nameclishelf JSON
Version 0.2.4 PyPI version JSON
download
home_pageNone
SummaryCLI Shelf Tools and Hooks for My Python Packages
upload_time2024-05-04 07:16:12
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 - 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)

**Table of Contents**:

* [Installation](#installation)
* [Pre-Commit Hook](#pre-commit-hook)
* [Features](#features)
  * [Extended Git](#extended-git)
  * [Versioning](#versioning)
  * [Emoji](#emoji)
* [Configuration](#configuration)

This is the **CLI Shelf Tools and Hooks** for 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.

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

## Installation

```shell
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                            |
|------------------|-----------------------------------------|
| `== 3.8`         | `pip install "clishelf>=0.1.10,<0.2.4"` |
| `>=3.9.13,<3.13` | `pip install -U clishelf`               |

## 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.4
  hooks:
    - id: shelf-commit-msg
      stages: [commit-msg]
```

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

**List of Feature Groups**:

* [Extended Git](#extended-git)
* [Versioning](#versioning)
* [Emoji](#emoji)

### 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           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.

```text
Usage: shelf.exe vs [OPTIONS] COMMAND [ARGS]...

  The Versioning commands.

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.

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

  The Emoji commands

Commands:
  fetch  Refresh emoji metadata file on assets folder.
```

## 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:"]  # 🎉
```

## 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.)

## License

This project was licensed under the terms of the [MIT license](LICENSE).

            

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/4f/69/29c1ec83bb1824bd197c609d2fede8f0e7c324fadc0626b88bea5c42445a/clishelf-0.2.4.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 - 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\n**Table of Contents**:\n\n* [Installation](#installation)\n* [Pre-Commit Hook](#pre-commit-hook)\n* [Features](#features)\n  * [Extended Git](#extended-git)\n  * [Versioning](#versioning)\n  * [Emoji](#emoji)\n* [Configuration](#configuration)\n\nThis is the **CLI Shelf Tools and Hooks** for my Python packages that help me\nto make Versioning, run Abbreviate of Git CLI, and Wrapped Dev Python packages\n(`more-itertools`, `pre-commit`, ...) on my any Python package repositories.\n\nThis project was created because I do not want to hard code set up all of them\nevery time when I start create a new Python package :tired_face:. I provide some\nreusable CLIs that was implemented from the [`Click`](https://github.com/pallets/click/)\npackage.\n\n## Installation\n\n```shell\npip install 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                            |\n|------------------|-----------------------------------------|\n| `== 3.8`         | `pip install \"clishelf>=0.1.10,<0.2.4\"` |\n| `>=3.9.13,<3.13` | `pip install -U clishelf`               |\n\n## 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.4\n  hooks:\n    - id: shelf-commit-msg\n      stages: [commit-msg]\n```\n\n## 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**List of Feature Groups**:\n\n* [Extended Git](#extended-git)\n* [Versioning](#versioning)\n* [Emoji](#emoji)\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           Show the Current Branch name.\n  bn-clear     Clear Local Branches that sync from the Remote repository.\n  cm           Show the latest Commit message\n  cm-prev      Commit changes to the Previous Commit with same message.\n  cm-revert    Revert the latest Commit on the Local repository.\n  df           Show changed files from previous commit to HEAD\n  init         Initialize GIT config on local\n  log          Show the Commit Logs from the latest Tag to HEAD.\n  mg           Merge change from another branch with strategy, `theirs`...\n  pf           Show Profile object that contain Name and Email of Author\n  tg           Show the Latest Tag if it exists, otherwise it will show...\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 Version with specific action.\n  changelog  Make Changelogs file\n  conf       Return the config data for bumping version.\n  current    Return Current Version that read from ``__about__`` by default.\n  tag        Create the Git tag by version from the ``__about__`` file.\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## 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## Mini-Roadmap\n\n- I will implement use `rich` and `alive-progress` to this project for make\n  interface terminal prettier.\n- Dynamic emoji changing for support other platform such as GitLab.\n- (BIG) Remove `bump2version` package and implement the own bump function.\n\n> [!NOTE]\n> I will migrate this code from **Python** to **Rust** for performance of CLI\n> (But I will observe for this again because this package does not have any issue with perf as well.)\n\n## License\n\nThis project was licensed under the terms of the [MIT license](LICENSE).\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "CLI Shelf Tools and Hooks for My Python Packages",
    "version": "0.2.4",
    "project_urls": {
        "Homepage": "https://github.com/korawica/clishelf/",
        "Source code": "https://github.com/korawica/clishelf/"
    },
    "split_keywords": [
        "utility",
        " cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfebac64fb4c67b768ad12deabc6faed2b756e573c53303391a7ba033297ce84",
                "md5": "983a2dc2778380d418408982b6e7ee48",
                "sha256": "60b92ee75b64f01505610123fbd2fa90969fc47be263dcf89f1dadbfdf1f0515"
            },
            "downloads": -1,
            "filename": "clishelf-0.2.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "983a2dc2778380d418408982b6e7ee48",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9.13",
            "size": 38538,
            "upload_time": "2024-05-04T07:16:10",
            "upload_time_iso_8601": "2024-05-04T07:16:10.937561Z",
            "url": "https://files.pythonhosted.org/packages/df/eb/ac64fb4c67b768ad12deabc6faed2b756e573c53303391a7ba033297ce84/clishelf-0.2.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4f6929c1ec83bb1824bd197c609d2fede8f0e7c324fadc0626b88bea5c42445a",
                "md5": "e3532591a794607ab6f25e0b6a288ba4",
                "sha256": "4128b54dcf8bb9c7df10c93a8ef3aac10d31fe91198dc3b3d2c2fcb349abb9e9"
            },
            "downloads": -1,
            "filename": "clishelf-0.2.4.tar.gz",
            "has_sig": false,
            "md5_digest": "e3532591a794607ab6f25e0b6a288ba4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9.13",
            "size": 41517,
            "upload_time": "2024-05-04T07:16:12",
            "upload_time_iso_8601": "2024-05-04T07:16:12.700262Z",
            "url": "https://files.pythonhosted.org/packages/4f/69/29c1ec83bb1824bd197c609d2fede8f0e7c324fadc0626b88bea5c42445a/clishelf-0.2.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-04 07:16:12",
    "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: 0.28769s