Skip to main content

$ cli load from.yaml

Project description

GitHub Workflow Status (with branch) PyPI GitHub

cliffy :mountain:

YAML-defined CLI generator and manager

Features

  • Build and generate YAML-defined CLIs
  • Dynamic abstractions to rapidly build and test CLIs
  • Manage CLIs- load, enable, disable, update, and remove
  • Built-in shell and Python script support

Install

pip install cliffy

Usage

  • cli init <cli name>: Generate a template CLI manifest
  • cli load <manifest>: Add a new CLI based on the manifest
  • cli render <manifest>: Render the YAML manifest into executable code
  • cli list: Ouput a list of loaded CLIs
  • cli disable <cli name>: Disable a CLI
  • cli enable <cli name>: Enable a disabled CLI
  • cli unload <cli name>: Remove a loaded CLI

Example

  1. Define a manifest
# hello.yaml
name: hello
version: 0.1.0

commands:
  bash: $echo "hello from bash"
  python: print("hello from python")
  1. Load CLI
$ cli load hello.yaml
  1. Run CLI directly hello-demo

For more examples, check examples directory.

Development

poetry shell
cli -h

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

cliffy-0.2.3.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

cliffy-0.2.3-py3-none-any.whl (13.9 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