Glint is a micro-framework for for providing command like functionality to a python command line application. Glint allows an application to accept command line arguments in the following fashion: <command> required_arg --optional_arg value --flag


The inspiration for Glint came from wanting to have a command driven CLI appliation similar to how git works which I was unable to replicate with argparse.


Glint requires Python 3.3 or higher to work, once you have downloaded the latest version from the release page at GitHub you need to run the following command from the base directory:

python install

At some point we will be submitting to the Python Package Index once that is done then it will be the preferred method to retreive and install Glint.

Quick start

The smallest working example is the script below

#! /bin/env python

import glint

def hello():
        print('Hello world.')

if __name__ == '__main__':
        runner = glint.Runner()
        runner['hello'] = hello

This script provides you with two commands: the built in help command and the hello command which was defined in the script. The built in help command will output information that it has about the available commands that can be run, to view the help you would run the following command ./ help which would produce output that looks like

usage: ./ <command>


  help    Show this message and exit

See './ help --command <command>' for help on that command.

Running the hello command that is defined in the example looks like ./ hello which produces the following expected output

Hello World.

For a more comprehensive look see the usage page.

Indices and tables

Project Versions

Table Of Contents

Next topic


This Page