Skip to main content

Easy multi-level command line applications with man pages

Project description

Wilderness

PyPI version Build status Downloads Documentation Status

Wilderness is a light wrapper around argparse for creating command line applications with multiple subcommands, in the style of Git. Wilderness also makes it easy to generate man pages for your application.

Wilderness is heavily inspired by Cleo and argparse-manpage, but aims to stick as closely as possible to argparse to avoid users needing to learn a new API.

Installation

Wilderness is available on PyPI:

$ pip install wilderness

Usage

Building command line applications with Wilderness is straightforward, but it does expect a certain structure of the application. You can create applications with or without subcommands, as illustrated with the fakedf and fakegit examples, respectively.

Creating wilderness applications consist of the following steps:

  1. Subclassing the wilderness.Application class to hold the main application.

  2. Adding one or more wilderness.Command objects for each of the subcommands, optionally organized into wilderness.Groups.

  3. Minor changes to setup.py to build the manpages.

Examples

Here are some examples that use Wilderness to build command line applications:

Repository Description
fakegit A multi-level command line application similar to Git
fakedf An application without subcommands similar to df

Add your example here by opening a pull request!

Notes

License: See the LICENSE file.

Author: Gertjan van den Burg

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wilderness-0.1.2.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

wilderness-0.1.2-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page