rldr

Crates.iorldr
lib.rsrldr
version0.0.2
sourcesrc
created_at2024-11-12 02:17:26.22155
updated_at2024-11-14 21:21:27.329828
descriptionA simple command line utility to run and manage commands with keypress controls.
homepage
repositoryhttps://github.com/ammar-ahmed22/rldr
max_upload_size
id1444480
size22,767
Ammar Ahmed (ammar-ahmed22)

documentation

README

rldr

[ ree-loh-der ]

A simple command line utility to run and manage commands with keypress controls.

Features

  • Run any command: Start any command (e.g., python3 main.py, ping google.com, etc.).
  • Real-time output: Captures both stdout and stderr and displays them as they are generated.
  • Interactive controls:
    • Press r to restart the command.
    • Press c to close the command.
    • Press q to quit the reloader.

Installation

In order to install rldr, you need to have cargo installed. If you don't have Rust or cargo installed, you can find instructions here.

Cargo

cargo install rldr
rldr --help

Source

git clone https://github.com/ammar-ahmed22/rldr.git
cd rldr
cargo install --path .

Usage

To use rldr, you simply pass in the command you want to run. rldr will start the command and provide interactive controls.

rldr ping google.com

Example Session

Upon running rldr it will display:

[rldr] Enter `r` to reload, `c` to close, `q` to quit

You can then enter:

  • r to restart the command, which terminates the current instance and starts it again.
  • c to close the command, stopping it's execution (but still listening for input)
  • q to quit out of rldr

Limitations and Known Issues

  • Platform Compatibility: rldr relies on bash on Unix systems and cmd on Windows. Ensure these shells are available on your system
  • Non-blocking I/O: While rldr works well with real-time commands, some programs with heavy buffering may still delay output display. Commands that require user input will also not work due to the input handling from rldr
  • Output Thread Management: Each input creates new threads to handle input, so frequent restarts may consume system resources over time.

Contributing

Contributions, issues, and feature requests are welcome! Feel free to open an issue or pull request to help improve rldr.

License

This project is licensed under the MIT License.

Commit count: 14

cargo fmt