Overlay Declarative Commands

Declarative Commands

Create New Commands Intuitively and With Ease

CliMate introduces its own JSON™ system, to create commands for your cli applications. Each key allows you to keep track of your progress. Easily scale your application when more commands are needed and keep everything readable in your development all through the content delivery system that powers the web.

Overlay Structured Menus

Structured Menus

Keep Your User Experience World Class With CliMate Menus

One of the premier features of the library. Dynamically create menus based on the commands you have written. As your application gets more complex organise your commands into groups. Keep your users spoilt for choice and happy interacting with your applications.

Overlay Quick Prototyping

Quick Prototyping

Meet And Exceed Deadlines With CliMate Convenience

We know you're busy writing your latest masterpieces and CliMate should help and not hinder this workflow. Use CliMate's built in convenience commands to structure your CLI files quickly and focus on creating the commands for your applications.

Opening cmd

Write Command Line Application With An Edge

CliMate is a utility for creating robust and easily extensible command line applications. It follows different procedures to the usual command line creations and offers its own unique features. Written in Python and utilising JSON the utility put user choice first.

Features

Declarative Commands
Structured Menus
Quick Prototyping

pip install py-climate

pip3 install py-climate

> clm

Installation

CliMate can be installed as easily as any other package using the python package manager pip. Drop the first command into your terminal and let pip do the rest. After the installation is finished, drop the second command in to get started.

Minimal Example

cli.json

Copied

cli.py

Copied

terminal

{

"general": {},

"commands": {

"say-hello": {

"name": "Say Hello",

"description": "Say Hello To Someone",

"target": {

"type": "function"

},

"arguments": {

"someone": {

"name": "Desired Name",

"description": "Name You Desire",

"type":"str",

"default": "World"

}

}

}

}

}

from climate import CliMate


def say_hello(someone):

print("Hello, {}!".format(someone))


if __name__ == "__main__":

climate = CliMate("cli.json")

climate.parse_args()

> python cli.py say-hello

Hello, World!


> python cli.py say-hello Henry

Hello, Henry!


> python cli.py

? Main Menu Say Hello To Someone

? Desired Name (World) Fabian

Hello, Fabian!


> python cli.py help --commands

-Entry-

-cli.py- [command] {argument}

[Commands]

say-hello {name}: Say Hello To Someone

help {optional-help}: Get Help

{Arguments(s)}

name (str): Name You Desire

optional-help (choices) --docs|--commands

Documentation

This will run through the procedure for making cli applications with CliMate. What better way to learn how to use it then looking at its guts.