clipy
clipy is a Python package for creating command-line interfaces (CLIs) in a pythonic way. Its core philosophy is that a command shouldn't be as different from a Python function.
The key features are:
- Pythonic API: The functions and class definitions are the commands and groups.
- Easy to use: It's easy to create CLIs with automatic help generation and argument casting.
- Support complex CLIs: You can create complex applications with deeply nested commands, variable number of arguments, and more.
- End user friendly: Given wrong input, it will point out the exact location of the error like a compiler would do.
Quickstart
Install:
pip install clipyx
A simple example:
import clipy
@clipy.Command
def greeting(name: str):
"""
Greeting the provided name
Args:
name: The name to greet
"""
print(f"Hello There!\nGeneral {name}!")
if __name__ == "__main__":
greeting()
Then enjoy your CLI:
python greeting.py --help
# usage: greeting [--name <str>]
# Greeting the provided name
# options:
# --name NAME:str The name to greet
# --help Show this help message and exit.
python greeting.py --name=Kenobi
# Hello There!
# General Kenobi!
python greeting.py Kenobi
# Hello There!
# General Kenobi!
python greeting.py --not-an-arg
# usage: greeting [--name <str>]
# command:
# $ greeting --not-an-arg
# ^^^^^^^^^^^^
# greeting: error: unknown argument: --not-an-arg
Supported Python versions: 3.9 and above.
For more complex examples, like automatic casting, nested commands, variable number of arguments, and more, check the examples folder.
Installation
clipy is available on PyPI, you can install it using pip:
pip install clipyx
Otherwise, you can install a specific version from GitHub:
pip install git+https://github.com/G-Lauz/clipy.git@v1.0.0
Or clone the repository and install it manually:
git clone https://github.com/G-Lauz/clipy.git
cd clipy
pip install .
Why clipy?
There are already many CLI libraries in Python, such as argparse, Click, Typer, and more. So why do we need another one?
The goal here isn't to replace them, but provide an alternative that emphasizes a different design philosophy. clipy is designed to be as close to regular Python code as possible, making it easy to learn and use. You should use clipy when you want to focus on the logic of your application rather than the CLI framework.
Roadmap
- Support configuration files as arguments (e.g.
json,yaml, etc.). - Support short and combined short options (e.g.
-hfor--helpand-abc). - Support a wider range of argument types (e.g.
pathlib.Path,enum, etc.). - See the issue tracker for more details and to contribute.
Contributing
Contributions are welcome! If you have any ideas, suggestions, or bug reports, please open an issue or submit a pull request on GitHub.
Please read the CONTRIBUTING.md to help you get started.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Release files for clipyx 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| clipyx-1.0.0.tar.gz | 19.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clipyx-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.8 kB
Release files / clipyx-1.0.0.tar.gz
| Download URL | clipyx-1.0.0.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2b33eca6b0fa6aabc227c0c7756ee8510abf2f2b823f862fc5efaf4d368bde77
|
|
BLAKE2b-256 checksum How to use checksums |
c7f5ffed54f12080cbcdfab798de64ed027b621c5b2569213ef7d5dc55e427dc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.
Transparency logRelease files / clipyx-1.0.0-py3-none-any.whl
| Download URL | clipyx-1.0.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a107f142db29ebb7644c6f1c40fa1058d731d7a79be8ef66fd5ccbf60c6a064d
|
|
BLAKE2b-256 checksum How to use checksums |
68f653f3f91d4925ea4fcdb1884b47a696ac218cc71f4feab6c81be8c9d55f11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 20, 2026.
Transparency log