Metadata-Version: 2.1
Name: cliar
Version: 1.2.0
Summary: Create CLIs with classes and type hints.
Home-page: https://moigagoo.github.io/cliar/
License: MIT
Keywords: cli,commandline
Author: Konstantin Molchanov
Author-email: moigagoo@live.com
Requires-Python: >=3.6,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Description-Content-Type: text/x-rst

.. image:: https://img.shields.io/pypi/v/cliar.svg
  :target: https://pypi.org/project/cliar
.. image:: https://travis-ci.org/moigagoo/cliar.svg?branch=develop
  :target: https://travis-ci.org/moigagoo/cliar
.. image:: https://codecov.io/gh/moigagoo/cliar/branch/develop/graph/badge.svg
  :target: https://codecov.io/gh/moigagoo/cliar

*****
Cliar
*****

Create a CLI from a Python class, make it powerful with type hints.

**Cliar** is a Python tool that helps you create commandline interfaces:

.. code-block:: python

    from cliar import Cliar

    class Git(Cliar):
        '''Git clone created with Cliar'''

        def clone(self, repo, dir='.'):
            '''Clone a git repo from REPO to DIR.'''

            print(f'Cloning from {repo} to {dir}')

    if __name__ == '__main__':
        Git().parse()

Run the script:

.. code-block:: bash

    $ python git.py clone http://foo.bar -d baz
    Cloning from http://foo.bar to baz


Requirements
============

Cliar runs with Python 3.6+ on Windows, Linux, and Mac. There are no external dependencies.


Install
=======

Install Cliar from `PyPI <https://pypi.org/project/cliar>`__ with pip:

.. code-block:: bash

    $ pip install cliar

