TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Shelgon: A Framework for Building Interactive REPL Shells in Rust

130 pointsby cat-whisperer2 months ago
I&#x27;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:&#x2F;&#x2F;github.com&#x2F;nishantjoshi00&#x2F;shelgon">https:&#x2F;&#x2F;github.com&#x2F;nishantjoshi00&#x2F;shelgon</a>

8 comments

bfLives2 months ago
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?
评论 #43285005 未加载
cmrdporcupine2 months ago
Neat. I&#x27;ll check it out.<p>One suggestions: the README advertises lovely TUIs. Show us a screenshot, or screencast, so we can see what you mean!
评论 #43285121 未加载
faizshah2 months ago
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:&#x2F;&#x2F;python-prompt-toolkit.readthedocs.io&#x2F;en&#x2F;master&#x2F;" rel="nofollow">https:&#x2F;&#x2F;python-prompt-toolkit.readthedocs.io&#x2F;en&#x2F;master&#x2F;</a>
serial_dev2 months ago
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.
评论 #43292592 未加载
hkalbasi2 months ago
How it compares to other libraries in this space, e.g. reedline or rustyline?
评论 #43286795 未加载
ilikegreen2 months ago
Please don&#x27;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.
评论 #43288801 未加载
hajimuz2 months ago
A quick demo or screenshot would be nice!
jiaaro2 months ago
Cool project! But, I wonder how long can a project like this use a Pokemon as their namesake and mascot before you hear from nintendo&#x27;s lawyers?
评论 #43285891 未加载
评论 #43285829 未加载
评论 #43285928 未加载