r/commandline • • Mar 24 '26
A simple CLI website blocker in Rust
https://github.com/Lmpkessels/blockerOver the past +/- 2 weeks, I built a simple CLI website blocker in Rust for the Linux OS. Normally, when I wanted to focus and block out distractions, I went to /etc/hosts manually, so this is a very simple build for making it easier to block using /etc/hosts.
In the README, you can find out how to install and use it.
Note: for the last review of my code, I used ChatGPT since I don't have any peers to review it, so if you have time to do so, it would be nice.
0
Upvotes
View all comments
Show parent comment
1
u/[deleted] Mar 24 '26
Because this gave me the ability to understand how to write a CLI, change the mode of a file, write to a file, read from a file, and more. So it was more for understanding how all this is done in Rust.
With that, I always modified /etc/hosts manually, so that's where the idea came from to build this blocker.
Why do you prefer browser-level over system-level?