A powerful Python CLI framework for building beautiful, developer-friendly command-line tools.
Project description
Table of Contents
About
useCli is a CLI framework for Python. It gives you:
- Prefix matching — Type
heinstead ofhelp - Interactive mode — Fuzzy finder for commands
- Auto-generated help — Clean, styled output
- Command scaffolding —
make:commandgenerates boilerplate - UI components — Prompts, menus, styled console output
Built on Typer and Click.
Quick Start
Install usecli:
uv add usecli
Initialize
usecli init
Create a command
usecli make:command hello
Your new command is ready in the commands directory:
class HelloCommand(BaseCommand):
def signature(self) -> str:
return "hello"
def description(self) -> str:
return "Say hello"
def handle(self, name: str = Argument(..., help="Your name")) -> None:
console.print(f"Hello, {name}!")
Run it:
usecli hello world
Usage
Prefix Matching
Type partial command names:
usecli he # help
usecli ma:co # make:command
Interactive Mode
usecli --interactive # Fuzzy finder for all commands
usecli -i hello # Run 'hello' command interactively
Command Groups
Colon-separated commands group automatically in help:
def signature(self) -> str:
return "db:migrate"
Displays as:
db:
migrate Run migrations
backup Backup database
Space-separated signatures create nested subcommands:
def signature(self) -> str:
return "spec show" # usecli spec show
UI Components
from usecli import console, Prompt, Confirm, Menu
console.print("[green]Done![/green]")
name = Prompt.ask("Enter name")
ok = Confirm.ask("Continue?")
choice = Menu(["A", "B", "C"]).show()
Available Commands
about Show app info
help Show help
init Initialize usecli
inspire Random quote
make:command Create new command
Hiding Built-in Commands
[tool.usecli]
hide_init = true
hide_inspire = true
Development
See the Development Guide for setup, testing, and architecture details.
Contributing
Read the Contributing Guide.
Quick workflow:
- Fork and branch:
git checkout -b feature/name - Make changes
- Run checks:
uv run poe clean-full - Commit and push
- Open a Pull Request
License
MIT. See LICENSE.
Built by thememium
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usecli-0.1.25.tar.gz.
File metadata
- Download URL: usecli-0.1.25.tar.gz
- Upload date:
- Size: 42.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d41f2a773bb0e3c5c0628bd666be6476b7a1f12823cdf0de10e39ac92a62bc3
|
|
| MD5 |
f3be063fb873cbe98ec681af38660f64
|
|
| BLAKE2b-256 |
e2388192d8039308ceb1fde59e2b6e9a91be6f195fe97ec31a3843d42249b761
|
File details
Details for the file usecli-0.1.25-py3-none-any.whl.
File metadata
- Download URL: usecli-0.1.25-py3-none-any.whl
- Upload date:
- Size: 67.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.4 {"installer":{"name":"uv","version":"0.10.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9857352fa659a3001bb2bbe91053d61725d84e14fa6c376322d3d78e85a3e03
|
|
| MD5 |
feede4248fb7f56e9f6bb39c5032c5d8
|
|
| BLAKE2b-256 |
2c55d039668387cadafcdc40af4ecae1161cfcb23db376f6bff32da18c9e642b
|