A lightweight CLI wrapper that runs any shell command, tracks its execution time, and sends a desktop notification when it finishes.
- Run any shell command via a simple
--runflag - Displays start time, end time, and total duration after execution
- Sends a desktop notification when the task completes
- Prints a visual separator line scaled to your terminal width
- Python 3.x
plyerfor desktop notifications
Install dependencies:
pip install plyerNote: On Linux you may also need
libnotifyor a compatible notification daemon. On macOS and Windows,plyerworks out of the box.
python script.py --run "<your command>"# Run a Python script
python script.py --run "python train.py"
# Run a shell command
python script.py --run "sleep 5"
# Run a build command
python script.py --run "make build"After the command finishes, you'll see something like:
hi!:--------------------------------------------------------------
Start : 14:03:21
End : 14:07:45
Diff : 0:04:24.103412
A desktop notification will also pop up with the total elapsed time.
| Argument | Type | Description |
|---|---|---|
--run |
string | The shell command to execute |
| version | source |
|---|---|
| 1.0.0 | link |
- Commands are executed via
shell=True, so standard shell syntax (pipes, redirects, etc.) is supported. - If the desktop notification fails (e.g., unsupported platform or missing backend), the error is printed to stdout and execution continues normally.
- To use a custom app icon for the notification, set the
app_iconparameter in thenotification.notify()call inside the script.