https://github.com/aweirddev/presented
CLI builder.
https://github.com/aweirddev/presented
Last synced: 4 months ago
JSON representation
CLI builder.
- Host: GitHub
- URL: https://github.com/aweirddev/presented
- Owner: AWeirdDev
- License: mit
- Created: 2023-02-09T05:00:28.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-09T06:44:29.000Z (over 3 years ago)
- Last Synced: 2025-03-18T05:45:26.436Z (about 1 year ago)
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# presented
Simple CLI for developers from starter to advanced.
```py
from presented import CLI
cli = CLI()
@cli.command(
name="hello"
)
def greet(session):
session.echo("Hello!")
if __name__ == "__main__":
cli() # start the CLI
```
## Advanced
```py
import time
from presented import CLI
cli = CLI()
@cli.command(
name="install",
help="Install a project."
)
def installation(session):
with session.Progress() as progress:
@progress.tab(
name="🚀 Launching Request"
)
def step1(status):
status >> "Installing..."
... # your code
status >> "Installation completed!"
@progress.tab(
name="✨ Wasting Your Time"
)
def step2(status):
time.sleep(10)
session.echo("Installation complete!")
if __name__ == "__main__:
cli()
```