Skip to content

Overview

arc is a tool for building declarative, and highly extendable CLI applications for Python ^3.10.

Features

arc's features include:

Installation

arc can be installed with pip

$ pip install arc-cli

Example

To start off, here's a simple example application that can be used to greet someone

examples/hello.py
import arc


@arc.command
def hello(name: str):
    """Greets someone by name"""
    arc.print(f"Hello {name}!")


hello()

Tip

The above example, and all examples in this documentation are complete and should run as-is. Additionally all examples are available in the source repo

$ python hello.py Joseph
Hello Joseph!

Automatic Documentation

And a quick demonstration of the documention generation:

$ python hello.py --help
USAGE
    hello.py [-h] name

DESCRIPTION
    Greets someone by name

ARGUMENTS
    name

OPTIONS
    --help (-h)  Displays this help message
Pretty cool, huh? arc will pull all of the information that it needs from your function docstrings and parameter definitons.

Check out the Usage section for more information on how to use arc.

Playground

You can check out the playground to try out arc in your browser.