A couple of months ago, I stumbled upon a fantastic Terminal User Interface (TUI) framework for Rust called Ratatui. As someone who enjoys building tools that simplify workflows, I decided to put Ratatui to the test by creating a Postman-like application for the terminal. And thus, Fetched was born.
Why Fetched?
The name Fetched is inspired by the Fetch API in JavaScript, which is widely used for making HTTP requests. The goal of Fetched is to bring that same simplicity and power to the terminal, allowing developers to interact with APIs without leaving their command-line environment. Whether you’re testing endpoints, debugging APIs, or just exploring, Fetched aims to be your go-to tool.
Why Ratatui?
Ratatui is a powerful TUI framework that makes it easy to build rich, interactive terminal applications in Rust. It provides a clean and intuitive API for creating layouts, handling user input, and rendering content. For someone like me who loves both Rust and TUI, Ratatui was the perfect choice for building a terminal-based application.
The Journey So Far
Fetched is still a work in progress. Like many side projects, it’s something I work on in my spare time after my 9-to-5 job. Despite the limited time, I’ve made steady progress, and I’m excited to share updates along the way. I’ll be documenting my journey through a series of blog posts, each tagged with #fetched. This way, you can easily filter out the noise and focus on the posts related to this project.
Current Features
While Fetched is still in development, here are some of the features I’ve implemented so far:
- Modes:
Normal
,Insert
,Control
modes inspired from vim. And another 3 sub modes which extendsInsert
mode (Search
,Command
,Prompt
). - Basic Layout: Basic layout consists of a request Collections pane on the left and Request and Response panes on the right side. And can be move between the tabs easliy using numbers like in lazygit.
- Command Pallete: Simple command pallete inspired from k9s. Can be accessed using
:
. - Collections: Collection creation is easy, pressing
a
in the collections pane will create a collecion, Once a collection created user can walk into the collection to see the requests created under the collection. pressingd
will delete files. Request are saved asjson
files. - TUI Interface: and yes, I also build the minimal TUI interface. Also support custom theming, but yet not completed.
What’s Next?
There’s still a lot to do! Some of the features I’m planning to add include:
- Complete Requests: Create, Delete, Modify and Sending requests
- Complete Response Visualization: Show basic infomation about responses
- Authentication: Support for various authentication methods like OAuth, API keys, etc.
- Environment Variables: Project base environment variables either using a
.env
ortoml
. - Text Suggestions and Auto Completion: A required feature in UI/UX aspect.
there is a lot more items in the checklist, but for now these are the items that i am going to take a look in the near future.
Get Involved
If you’re interested in following along or contributing to the project, you can find the code on GitHub. Feel free to open issues, suggest features, or even submit pull requests. I’d love to hear your feedback and ideas!
Final Thoughts
Building Fetched has been a rewarding experience so far. It’s a great way to dive deeper into Rust, explore the capabilities of Ratatui, and create something that I hope will be useful for other developers. I’ll be sharing regular updates on my blog, so stay tuned for more posts about the progress, challenges, and lessons learned along the way.
If you’re a Rust enthusiast or just someone who loves terminal tools, I encourage you to give Ratatui a try. And if you’re curious about Fetched, follow the #fetched tag for updates.
A small shout-out to Orhun, one of the maintainers of ratatui, for their great work!
Happy coding! 🔥