skip to navigation
skip to content

Not Logged In

clime 0.2.7

Convert functions into multi-command program breezily.

Package Documentation

The full version of this documentaion is at


Clime lets you convert any module into a multi-command CLI program without any configuration.

The main features:

  1. It works well with zero configuration. Free you from the configuration hell.
  2. Docstrings (i.e., help texts) is just configurations. When you finish a docstring, a configuration of aliases and metavars are also finished.
  3. It generates usages for each command automatically.

It is a better choice than the heavy optparse or argparse for most of the CLI tasks.

CLI-ize ME!

Let me show you Clime with an example.

Here we have a simple script with a docstring here:

# file:

def repeat(message, times=2, count=False):
    '''It repeats the message.

        -m=<str>, --message=<str>  The description of this option.
        -t=<int>, --times=<int>
        -c, --count

    s = message * times
    return len(s) if count else s

After add this line:

import describes more about how to customize your program.

… your CLI program is ready!

$ python twice

$ python --times=3 thrice

It also generates a pretty usage for this script:

$ python --help
usage: [-t<int> | --times=<int>] [-c | --count] <message>
   or: repeat [-t<int> | --times=<int>] [-c | --count] <message>

If you have a docstring in your function, it also shows up in usage manual with --help.

$ python repeat --help
usage: [-t<int> | --times=<int>] [-c | --count] <message>
   or: repeat [-t<int> | --times=<int>] [-c | --count] <message>

It repeats the message.

    -m=<str>, --message=<str>  The message.
    -t=<int>, --times=<int>
    -c, --count

You can find more examples in the clime/examples.

.Command describes more about how it works.


Clime is hosted on two different platforms, PyPI and GitHub.

Install from PyPI

Install Clime from PyPI for a stable version:

$ sudo pip install clime

If you don’t have pip, execute

$ sudo apt-get install python-pip

to install pip on Debian-base Linux distribution.

Get Clime from GitHub

If you want to follow the latest version of Clime, use

$ git clone git://

to clone a Clime repository, or download manually from GitHub.

File Type Py Version Uploaded on Size
clime-0.2.7.tar.gz (md5) Source 2014-11-07 20KB
  • Downloads (All Versions):
  • 30 downloads in the last day
  • 374 downloads in the last week
  • 1649 downloads in the last month