smartcliapp
Cross-platform library of tools for creating console applications
Based on the click library. Use a variety of out-of-the-box tools to create console applications.
smartcliapp — cross-platform library of tools for creating console applications based on the click library.
Supported platforms: Linux (all), Windows 7/8/10, Termux (Android).
Use Informer to display meta information. Use CliManager as a toolbox (Printer, InputMan, StatusMan, ActionMan, Launcher). Use Factory to create objects individually.
- Title & Footer — display at startup and shutdown in the center of the console
- Meta Information — name, description, copyright, site address
- Browser Launch — open URL from console
- Meta Storage — all app info in one place
- User Action — instant response without confirmation (yes/no/exit)
- Various Input — including hidden input for passwords
- Status Output — Ok!/Error!
- Display Methods — normal, centered with filling, pager
- Top-Level Classes — Informer, ClickMan, Factory
| Component | Description |
|---|---|
Informer | Display meta information (name, title, description, copyright, url, version) |
CliManager | Toolbox — Printer, InputMan, StatusMan, ActionMan, Launcher |
Factory | Create objects individually |
Printer | Various display methods (normal, centered, pager) |
InputMan | Various input methods including hidden input for passwords |
StatusMan | Operation status output (Ok!/Error!) |
ActionMan | User action request (yes/no/exit) with instant response |
Launcher | Launch default browser to specified URL |
pip install smartcliapp
from smartcliapp import Informer, CliManager
class CliMan(Informer):
tools = CliManager()
name = 'App Name'
title = 'App title'
description = 'App Description'
copyright = 'App copyright'
url = 'app url'
msg = ''
version = '0.0.0'
CliManager provides:
Printer— display methods (normal, centered with filling, pager)InputMan— various input methods including hidden input for passwordsStatusMan— operation status output (Ok!/Error!)ActionMan— user action request (yes/no/exit) with instant responseLauncher— launch default browser to specified URL
Informer displays:
- Name, Title, Description
- Copyright, URL, Version
- Title and footer at startup and shutdown
By using this software, you agree to the full disclaimer terms.
Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
License: BSD 3-Clause License