NanoCLI
A cli framework with the simplicity of argparse, the colors of rich, the config handling of Hydra, and without the complexity.
Installation
pip install nanocli
Quick Start
from dataclasses import dataclass
from nanocli import group
@dataclass
class TrainConfig:
epochs: int = 100
lr: float = 0.001
app = group()
@app.command()
def train(cfg: TrainConfig):
print(f"Training for {cfg.epochs} epochs")
if __name__ == "__main__":
app()
Usage
# Run command
python app.py train
python app.py train epochs=200
# Hydra-style overrides at root level
python app.py train.epochs=200 -p
# Print config: -p (local), -g (global from root)
python app.py train -p
# Load YAML config
python app.py -c examples/train_config.yml train
# Help
python app.py -h
python app.py train -h
Nested Groups
app = group()
@app.command()
def train(cfg: TrainConfig):
...
data = app.group("data", help="Data commands")
@data.command()
def download(cfg: DownloadConfig):
...
python app.py data download
python app.py data download path=/data -p
python app.py data download -g # prints full tree from root
Flags
| Flag | Meaning |
|---|---|
-p |
Print config from current node |
-g |
Print config from root (global) |
-h |
Show help |
-c PATH |
Load base config from YAML |
Development
make dev # Install with dev deps
make test # Run tests
make pre-commit # Run all checks
License
MIT
Metadata
Release files for nanocli 0.1.1
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 |
|---|---|---|---|---|
| nanocli-0.1.1.tar.gz | 324.1 kB | With provenance | Details for nanocli-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nanocli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for nanocli-0.1.1-py3-none-any.whl |
Total release size: 335.7 kB
Release files / nanocli-0.1.1.tar.gz
| Download URL | nanocli-0.1.1.tar.gz |
|---|---|
| Size | 324.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0c2a47aaf06c538dfbf54eb865435cbf6a58ebad73d2c78d8f71e2f4e250eacb
|
|
BLAKE2b-256 checksum How to use checksums |
766f6c6d16f82f55af6029a7fe1c310522e7249f7cbd933328eaf218f2b57032
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2025.
Transparency logRelease files / nanocli-0.1.1-py3-none-any.whl
| Download URL | nanocli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 11.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
205b0d3fe8e72d26a96957667da74bd769d53e14795342c2c83b4ab36ab1200b
|
|
BLAKE2b-256 checksum How to use checksums |
8aef498a1907f838e9888a7145b7a0a61e9ed27891b5c0b2aa6a79f286118013
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2025.
Transparency logSecurity for nanocli 0.1.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for nanocli-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 19, 2025.
Transparency logA 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.