Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sslivkoff/toolcli
https://github.com/sslivkoff/toolcli
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sslivkoff/toolcli
- Owner: sslivkoff
- License: mit
- Created: 2022-02-06T01:25:48.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-07-16T17:58:41.000Z (over 1 year ago)
- Last Synced: 2024-04-24T05:01:06.003Z (7 months ago)
- Language: Python
- Size: 140 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# toolcli
`toolcli` makes it simple to create modular command line interfaces
the main usecase for `toolcli` is allowing many cli subcommands to be defined across many files in a performant way
`toolcli` uses `argparse` under the hood, making it easy to transition from `argparse` to `toolcli` when a project is ready to scale to multiple subcommands or multiple files
## Features
- lazy loading of files for fast startup times
- is agnostic to synchronous functions or `async` functions
- uses `rich` for colorized help output
- uses `argparse` under the hood for parsing arguments
- no user-facing objects, just simple functions
- built-in support for common subcommands like `help`, `cd`, and `version`
- can use middleware before and/or after main command execution (e.g. for logging or additional context injection)