I've been working on Shelgon, a framework that lets you build your own custom REPL shells and interactive CLI applications in Rust.<p>You can use Shelgon to:<p>- Create a custom shell with only a few lines of code
- Build interactive debugging tools with persistent state between commands
- Develop domain-specific language interpreters with shell-like interfaces
- Add REPL capabilities to existing applications<p>Getting started is straightforward - implement a single trait that handles your command execution logic, and Shelgon takes care of the terminal UI, input handling, and async runtime integration.<p>For example, a simple echo shell takes less than 50 lines of code, including a full implementation of command history, cursor movement, and tab completion.<p>Repository: <a href="https://github.com/nishantjoshi00/shelgon">https://github.com/nishantjoshi00/shelgon</a>
Looks really interesting. I like the approach of writing pure functions that return descriptions of IO tasks to perform. A couple of questions:<p>1. Why async?<p>2. Why couple to anyhow instead of using an associated error type?
This is awesome, there’s a really nice one in python called prompt toolkit that has some a nice api as well: <a href="https://python-prompt-toolkit.readthedocs.io/en/master/" rel="nofollow">https://python-prompt-toolkit.readthedocs.io/en/master/</a>
Interesting stuff!<p>Video or gif would be nice! It’s like a UI library need at least a screenshot, this thing needs a video demo of sorts.<p>Q: why write that the docs is by LLM? In my opinion if it’s correct, and it makes sense, I don’t care even if an alien gave it to you.
Please don't mind my possibly simplistic question — but is this something that would bring Rust development closer to a Lisp environment? Seems like an interesting project.