owcli


Nameowcli JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/tadashi-aikawa/owcli
SummaryCLI framework which supports both command and subcommand.
upload_time2023-07-30 13:07:23
maintainer
docs_urlNone
authortadashi-aikawa
requires_python>=3.7,<4.0
licenseMIT
keywords cli framework
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            owcli
=====

[![pypi](https://img.shields.io/pypi/v/owcli.svg)](https://pypi.org/project/owcli/)
[![versions](https://img.shields.io/pypi/pyversions/owcli.svg)](https://pypi.org/project/owcli/)
[![Actions Status](https://github.com/tadashi-aikawa/owcli/workflows/Tests/badge.svg)](https://github.com/tadashi-aikawa/owcli/actions)
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/tadashi-aikawa/owcli/blob/master/LICENSE)

CLI framework which supports both command and subcommand based on [docopt].

[docopt]: http://docopt.org/


Install
-------

```
$ pip install owcli
```


Quick start
-----------

Create owcli project.

```
$ owcli init <app_name> --python <python_version>
```

Run

```
$ cd <app_name>
$ pipenv install
$ pipenv run python <app_name>/main.py --help
```

### Concrete example

```bash
$ owcli init testapp --python 3.7
------------------------
| Create entries...    |
------------------------
📂 /mnt/c/Users/syoum/git/github.com/tadashi-aikawa/owcli/testapp
 ∟📄 Pipfile
 ∟📄 README.md
 ∟📄 setup.py
 ∟📂 testapp
   ∟📂 commands
     ∟📂 cmd1
       ∟📄 main.py
       ∟📄 __init__.py
     ∟📂 cmd2
       ∟📄 main.py
       ∟📂 subcmd1
         ∟📄 main.py
         ∟📄 __init__.py
       ∟📂 subcmd2
         ∟📄 main.py
         ∟📄 __init__.py
       ∟📄 __init__.py
     ∟📄 __init__.py
   ∟📄 main.py
   ∟📄 __init__.py

------------------------
| Next you have to ... |
------------------------
.
.

$ cd testapp
$ pipenv install
$ pipenv shell
$ python testapp/main.py --help
Usage:
  testapp <command> [<subcommand>] [<args>...]
  testapp <command> [<subcommand>] (-h | --help)
  testapp (-h | --help)
  testapp --version

Commands:
  cmd1                Command1
  cmd2                Command2

$ python testapp/main.py cmd2 -h
Usage:
  testapp cmd2 [<subcommand>] [<args>...]
  testapp cmd2 (-h | --help)

Subcommands:
  subcmd1                       Subcommand1
  subcmd2                       Subcommand2

$ python testapp/main.py cmd2 subcmd1 --help
Subcommand1

Usage:
  testapp cmd2 subcmd1 <names>... [-f|--flag]
  testapp cmd2 subcmd1 (-h | --help)

Options:
  <names>...                           Names
  -f --flag                            Flag
  -h --help                            Show this screen.
  
$ python testapp/main.py cmd2 subcmd1 hoge hoga hogu -f
flag: true
names:
  - hoge
  - hoga
  - hogu
```


For developer
-------------

### Requirements

* poetry
* make
* bats

### Commands


#### Integration test

```
$ make test-cli
```

### Version up

```bash
make release version=x.y.z
```


Licence
-------

### MIT

This software is released under the MIT License, see LICENSE.txt.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/tadashi-aikawa/owcli",
    "name": "owcli",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "cli framework",
    "author": "tadashi-aikawa",
    "author_email": "syou.maman@gmail.com",
    "download_url": "",
    "platform": null,
    "description": "owcli\n=====\n\n[![pypi](https://img.shields.io/pypi/v/owcli.svg)](https://pypi.org/project/owcli/)\n[![versions](https://img.shields.io/pypi/pyversions/owcli.svg)](https://pypi.org/project/owcli/)\n[![Actions Status](https://github.com/tadashi-aikawa/owcli/workflows/Tests/badge.svg)](https://github.com/tadashi-aikawa/owcli/actions)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/tadashi-aikawa/owcli/blob/master/LICENSE)\n\nCLI framework which supports both command and subcommand based on [docopt].\n\n[docopt]: http://docopt.org/\n\n\nInstall\n-------\n\n```\n$ pip install owcli\n```\n\n\nQuick start\n-----------\n\nCreate owcli project.\n\n```\n$ owcli init <app_name> --python <python_version>\n```\n\nRun\n\n```\n$ cd <app_name>\n$ pipenv install\n$ pipenv run python <app_name>/main.py --help\n```\n\n### Concrete example\n\n```bash\n$ owcli init testapp --python 3.7\n------------------------\n| Create entries...    |\n------------------------\n\ud83d\udcc2 /mnt/c/Users/syoum/git/github.com/tadashi-aikawa/owcli/testapp\n \u221f\ud83d\udcc4 Pipfile\n \u221f\ud83d\udcc4 README.md\n \u221f\ud83d\udcc4 setup.py\n \u221f\ud83d\udcc2 testapp\n   \u221f\ud83d\udcc2 commands\n     \u221f\ud83d\udcc2 cmd1\n       \u221f\ud83d\udcc4 main.py\n       \u221f\ud83d\udcc4 __init__.py\n     \u221f\ud83d\udcc2 cmd2\n       \u221f\ud83d\udcc4 main.py\n       \u221f\ud83d\udcc2 subcmd1\n         \u221f\ud83d\udcc4 main.py\n         \u221f\ud83d\udcc4 __init__.py\n       \u221f\ud83d\udcc2 subcmd2\n         \u221f\ud83d\udcc4 main.py\n         \u221f\ud83d\udcc4 __init__.py\n       \u221f\ud83d\udcc4 __init__.py\n     \u221f\ud83d\udcc4 __init__.py\n   \u221f\ud83d\udcc4 main.py\n   \u221f\ud83d\udcc4 __init__.py\n\n------------------------\n| Next you have to ... |\n------------------------\n.\n.\n\n$ cd testapp\n$ pipenv install\n$ pipenv shell\n$ python testapp/main.py --help\nUsage:\n  testapp <command> [<subcommand>] [<args>...]\n  testapp <command> [<subcommand>] (-h | --help)\n  testapp (-h | --help)\n  testapp --version\n\nCommands:\n  cmd1                Command1\n  cmd2                Command2\n\n$ python testapp/main.py cmd2 -h\nUsage:\n  testapp cmd2 [<subcommand>] [<args>...]\n  testapp cmd2 (-h | --help)\n\nSubcommands:\n  subcmd1                       Subcommand1\n  subcmd2                       Subcommand2\n\n$ python testapp/main.py cmd2 subcmd1 --help\nSubcommand1\n\nUsage:\n  testapp cmd2 subcmd1 <names>... [-f|--flag]\n  testapp cmd2 subcmd1 (-h | --help)\n\nOptions:\n  <names>...                           Names\n  -f --flag                            Flag\n  -h --help                            Show this screen.\n  \n$ python testapp/main.py cmd2 subcmd1 hoge hoga hogu -f\nflag: true\nnames:\n  - hoge\n  - hoga\n  - hogu\n```\n\n\nFor developer\n-------------\n\n### Requirements\n\n* poetry\n* make\n* bats\n\n### Commands\n\n\n#### Integration test\n\n```\n$ make test-cli\n```\n\n### Version up\n\n```bash\nmake release version=x.y.z\n```\n\n\nLicence\n-------\n\n### MIT\n\nThis software is released under the MIT License, see LICENSE.txt.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "CLI framework which supports both command and subcommand.",
    "version": "0.8.0",
    "project_urls": {
        "Documentation": "https://tadashi-aikawa.github.io/owcli/",
        "Homepage": "https://github.com/tadashi-aikawa/owcli",
        "Repository": "https://github.com/tadashi-aikawa/owcli/blob/master/README.md"
    },
    "split_keywords": [
        "cli",
        "framework"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "46e0af7168bd06c87ab9f13505d1abeea93b18a39f1745f4a8acea8e240280cf",
                "md5": "5c2f870b74842f65ada92dc92691f877",
                "sha256": "9a6ffcd399e2da29f9460dd78298fd4f8c9b48d5f571eb874db8bf0f23ba0b9b"
            },
            "downloads": -1,
            "filename": "owcli-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5c2f870b74842f65ada92dc92691f877",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 12059,
            "upload_time": "2023-07-30T13:07:23",
            "upload_time_iso_8601": "2023-07-30T13:07:23.146537Z",
            "url": "https://files.pythonhosted.org/packages/46/e0/af7168bd06c87ab9f13505d1abeea93b18a39f1745f4a8acea8e240280cf/owcli-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-30 13:07:23",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tadashi-aikawa",
    "github_project": "owcli",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "owcli"
}
        
Elapsed time: 0.09825s