lionscliapp
A framework for building small command-line tools that remember things.
lionscliapp is a humane CLI application framework for Python. It makes it easy to build stateful developer tools quickly — tools that have persistent configuration, multiple sub-commands, and native support for paths and JSON files, without any argument-parsing boilerplate.
What It Provides
- Persistence — Each project gets a hidden directory (e.g.
.mytool/) with aconfig.json. Users set values once; the tool remembers them. - Automatic CLI parsing — Declare keys; the framework parses, persists, and merges values into
app.ctx. No argparser to write. - Multiple commands — Bind as many sub-commands as you like, or declare a default handler for bare invocations.
- Paths are native — Any key prefixed with
path.becomes apathlib.Path, expanded and resolved automatically. - JSON is native —
read_json()andwrite_json()handle path resolution and formatting. Reading or writing a named JSON file is a one-liner. - Built-in commands —
set,get,keys, andhelpare always available for free.
What It Doesn't Do
lionscliapp is deliberately simple. Configuration values are strings (except path.* keys, which become pathlib.Path). There is no built-in type system for integers, booleans, or enums — coerce from app.ctx yourself if you need them. This is a trade-off in favour of a smaller mental model.
Installation
Requires Python 3.10+.
pip install -e .
Quick Start
import lionscliapp as app
app.declare_app("mytool", "1.0")
app.describe_app("A tool that does useful things")
app.declare_projectdir(".mytool")
app.declare_key("path.output", "~/output")
app.declare_key("path.input", "~/input")
def cmd_run():
output = app.ctx["path.output"] # pathlib.Path, fully resolved
print(f"Output will go to: {output}")
app.declare_cmd("run", cmd_run)
app.describe_cmd("run", "Run the main process")
app.main()
mytool run # uses defaults
mytool set path.output ~/my-output # persist a value
mytool --path.output /tmp run # override for this invocation only
mytool help
mytool keys
Status
Version: 0.1.2 (v0 specification)
Core framework is complete: lifecycle management, command dispatch, built-in commands, configuration layering and persistence, path coercion, JSON I/O utilities.
License
See LICENSE file for details.
Metadata
Release files for lionscliapp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lionscliapp-0.1.2.tar.gz | 43.5 kB | Without provenance | Details for lionscliapp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lionscliapp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for lionscliapp-0.1.2-py3-none-any.whl |
Total release size: 73.7 kB
Release files / lionscliapp-0.1.2.tar.gz
| Download URL | lionscliapp-0.1.2.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c0739e3b89a07724c8258b3844b4aeb003e9ae24a50fb712c40d216ec4d9c802
|
|
BLAKE2b-256 checksum How to use checksums |
ed480e974948e8b2fa9e63b9a6cc288dfd35110df15bda35c5865bfe7c17a85f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Release files / lionscliapp-0.1.2-py3-none-any.whl
| Download URL | lionscliapp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 30.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
696d0b548a550aaf1d42a20365475e5c4fb8ee1f7999e257044c9446e1da9488
|
|
BLAKE2b-256 checksum How to use checksums |
3faba7f93964697d86dc807cc71312e46318993c7df4bccd6b2988cf3c55255b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.7
|
Security for lionscliapp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.