Skip to main content

owcli

pypi versions Actions Status license

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

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

$ owcli init testapp --python 3.13
------------------------
| 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

  • uv
  • make
  • bats

Commands

Integration test

$ make test-cli

📦 Release

https://github.com/tadashi-aikawa/owcli/actions/workflows/release.yaml?query=workflow%3ARelease

Licence

MIT

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

Metadata

Release files for owcli 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for owcli 0.9.0
File Size Uploaded Provenance
owcli-0.9.0.tar.gz 17.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for owcli 0.9.0
File Interpreter ABI Platform
owcli-0.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.2 kB

Release files / owcli-0.9.0.tar.gz

Download URL owcli-0.9.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
23d2e5fe6c297e85600ce4b074631a7979475cb93eb32a5b324b5617d6d44029
BLAKE2b-256 checksum
How to use checksums
f97830cd3ff8c68aff24de2794ea0ed5e37635684f25056c278161da2339e541
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.5.14

Release files / owcli-0.9.0-py3-none-any.whl

Download URL owcli-0.9.0-py3-none-any.whl
Size 12.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
019159742c37f1a657d287aadfff9a39fb5af7fafc934daec7b8023b7165cad6
BLAKE2b-256 checksum
How to use checksums
6997f65a5160236fac8a96b39a65d81522fa63fc72b8c552b080db895f20246e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.5.14

Security for owcli 0.9.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page