Analyze --help
outputs of CLIs to generate programmatic client libraries.
cliffold scaffold-cli-lib git --dest=cliffold/git
- Thanks to
--help
output, cliffold generates a Python library that can be used to interact with the CLI:
from cliffold.git import Git
git = Git()
print(git.version)
git.init()
git.commit(message="Initial commit")
To make this possible, cliffold
is currently in its research and collects CLI outputs.
Feel free to submit your CLI propositions with installation methods in #1.
See cliffold_research.md to check out the current research results.
You might simply install it with pip:
pip install cliffold
If you use Poetry, then run:
poetry add cliffold
Note
If you use Windows, it is highly recommended to complete the installation in the way presented below through WSL2.
-
Fork the cliffold repository on GitHub.
-
Install Poetry.
Poetry is an amazing tool for managing dependencies & virtual environments, building packages and publishing them. You might use pipx to install it globally (recommended):pipx install poetry
If you encounter any problems, refer to the official documentation for the most up-to-date installation instructions.
Be sure to have Python 3.8 installed—if you use pyenv, simply run:
pyenv install 3.8
-
Clone your fork locally and install dependencies.
git clone https://github.com/your-username/cliffold path/to/cliffold cd path/to/cliffold poetry env use $(cat .python-version) poetry install
Next up, simply activate the virtual environment and install pre-commit hooks:
poetry shell pre-commit install --hook-type pre-commit --hook-type pre-push
For more information on how to contribute, check out CONTRIBUTING.md.
Always happy to accept contributions! ❤️
© Copyright by Bartosz Sławecki (@bswck).
This software is licensed under the terms of MIT License.