Skip to main content

Autocleus

A demi god amongst CLIs: A CLI for creating your own CLIs in Python Easily. Autocleus provides the core engine for your CLI, allowing you to focus on building out the functionality of your CLI without the concern of actually building a CLI. When you finished developing your CLI, you can then package it up using Autocleus. Let Autocleus be of service to you.

Quickstart

You can install the most recent version of autocleus from the PyPi repository:

pip3 install autocleus

Autocleus requirements:

  • Pydantic==1.7.3
  • typing==3.7.4.3
  • PyInquirer==1.0.3
  • virtualenv==20.4.4
  • art==5.1
  • jinja2==2.10.1
  • setuptools==45.2.0
  • pip==20.0.2
  • asciimatics==1.12.0
  • yaspin==1.5.0
  • yamldirs==1.1.8

Also need to install python3-venv (Ubuntu, apt-get install -y python3-venv)

Please note that this is still under development and has not been properly unit tested.

Once you've installed autocleus, the CLI will be accessible from your environment. Currently there is only 1 subcommand generate with two options:

  1. --custom_cli: Will launch the interactive form for starting an autocleus CLI project, which is contained within a virtual environment.
  2. --concretized_cli: Will launch the interactive form to package an autocleus CLI project into an installable .whl file and a .tar archive (if desired). This will also produce a CLI spec, which is an sqlite database that stores all information about your package, including all of the building blocks of your package. This is meant to be used in an upcoming feature to allow any number of autocleus CLI projects to be combined into a single "master" CLI.

Here we will go through the two options for the generate subcommand.

  1. autocleus generate --custom_cli

autocleus custom_cli demo Questions

  • Tasks: Use space bar or click to select what tasks you would like performed. While all are suggested, only those required are selected by default.
  1. autocleus generate --concretized_cli
    work in progress

autocleus concretized_cli demo

Questions

  • Tasks: Use space bar or click to select what tasks you would like performed. While all are suggested, only those required are selected by default.

Developing a CLI with Autocleus

TODOs

  • Finish README
  • The main parser help function does not work (i.e --help-all or --help)
  • Add feature to output responses to interactive form to YAML and allow autocleus to auto-detect such YAMLs or allow build from such YAMLs (i.e non-interactive mode).
  • Way to many redundant (lazy) imports across package - needs to be cleaned up.
  • More error catching needs to be added in many places (when creating files, directories, etc...).
  • Write real unit tests and setup GitHub actions for CI/CD - current codes in 'tests' directory are just me trying to get things to work :)

Known Issues

Autocleus depends on python-virtualenv library: On Unbuntu 20.04 sometimes it is required that you remove and re-install this.

sudo apt-get remove python3-venv
sudo apt-get install -y python3-venv

Release files for autocleus 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autocleus 0.1.1
File Size Uploaded
autocleus-0.1.1.tar.gz 25.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autocleus 0.1.1
File Interpreter ABI Platform
autocleus-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 63.0 kB

Release files / autocleus-0.1.1.tar.gz

Download URL autocleus-0.1.1.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
dd7e2bcd9e3681c56d796cd58cffdea107195f33e23c80cf7acc166a5e0e2f3e
BLAKE2b-256 checksum
How to use checksums
7c54ecb248d363a3bd26cdbbeffdb632b7243e08ad034e5451981bce51d95ec5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release files / autocleus-0.1.1-py3-none-any.whl

Download URL autocleus-0.1.1-py3-none-any.whl
Size 37.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd10ae2a3b5858dbe81a316a588baf531a89a3cccf4be2c6607c89a5096386da
BLAKE2b-256 checksum
How to use checksums
6fcc19de8365d8093b6db280211c58fa53f5b0e408b79aa586a4492f9aa8562d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page