Skip to main content

Generate command-line interfaces (CLI) by introspecting callables

Project description


a typelib and CLI analyzer/generator

Introspect, compose, marshal and export arbitrary callables into a unified, hierarchical, command-line interface (CLI)


auto-find tools scan signatures and export as CLI node if default is callable, call it to setup arg


FAST! EASY! natural import usage! –help is decent-ish with types/etc! AH!


  1. Install:

    # pip install xacto
  2. Run:

    # ln -s /path/to/bin/xacto do
  3. Create python file at tools/

    __all__ = ["easy", "hard"]
    #__xacto__ = {...}
    def easy(method, speed=16, *tasks):
    #easy.__xacto__ = {...}
    def hard(method, speed=32, *tasks, **params):
    #hard.__xacto__ = {...}
  4. Run:

    # ./do work easy --method=never task1 task2
  5. Run:

    # ./do work hard --speed=64 --method=cheat --code=iddqd taskN


  • true/false quirkyness (default=True means –default flips to False)

  • can’t handle lists (–arg a b c –other …)



  • setuptools

  • symlink to binary to create new

  • testing: set-like functions, import semantics.. everything

  • handle bools better

  • handle lists (–arg a b c –other …)

  • detect output

  • standard output structure

  • prettify to tty

  • lazy load tools

  • lazy import globals (cpython)

  • bytecode cache

  • argument forwarding/chaining

  • integrate with

  • tab-completion

  • auto-reduce common components for aliases

  • bind tools to xacto object (eg. celery/waf)

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

xacto-0.6.3.tar.gz (10.1 kB view hashes)

Uploaded Source

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