Skip to content
/ cliffold Public

Analyze --help outputs of CLIs to generate programmatic client libraries.

License

Notifications You must be signed in to change notification settings

bswck/cliffold

Repository files navigation

cliffold Package version Supported Python versions

Tests Coverage Poetry Ruff Code style License Pre-commit

Analyze --help outputs of CLIs to generate programmatic client libraries.

The idea

  1. cliffold scaffold-cli-lib git --dest=cliffold/git
  2. 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.

Installation

You might simply install it with pip:

pip install cliffold

If you use Poetry, then run:

poetry add cliffold

For contributors

Note

If you use Windows, it is highly recommended to complete the installation in the way presented below through WSL2.

  1. Fork the cliffold repository on GitHub.

  2. 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
  3. 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! ❤️

Legal info

© Copyright by Bartosz Sławecki (@bswck).
This software is licensed under the terms of MIT License.

About

Analyze --help outputs of CLIs to generate programmatic client libraries.

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published