Cut out distractions with tsurugi! Easily block distracting websites.
Ever wanted to block websites that are making you idle? With tsurugi you can, right from your terminal!
- Configure easily
- Set blocks in a
tsurugi.toml
using the CLI - Support plain text blocks locally and remotely
- Create block lists and choose which you want to use
- Set blocks in a
- Run
tsurugi
and you're free of distractions - Interface tailored for better experience and usability
- Prebuilt binaries for Linux and Darwin platforms
Important
Work in progress...
Go to the latest release page and download the prebuilt binary for your platform.
Create a plain text file with your blocks
bsky.app
youtube.com
www.youtube.com
instagram.com
twitch.tv
www.twitch.tv
And run
sudo ./tsurugi blocklist.txt
If you want to unblock those websites, just run
sudo ./tsurugi stop
Alternatively, you can create a gist and pass url (raw)
sudo ./tsurugi https://gist.githubusercontent.com/kauefraga/433dc03487e71f8df477e5584d2d2c23/raw/c7c9310ed790e481dbd9b5cd79b96a7ac3f711f9/blocklist.txt
Feel free to contribute opening an issue to report a bug or suggesting a CLI change, an improvement or a feature.
- Fork this project
- Clone your fork on your machine
- Setup the dev environment
- Make your changes and commit them following conventional commits
- Run
git push
to sync the changes - Open a pull request specifying what you did
Tsurugi is a Japanese term for a straight, double-edged sword used in antiquity.
I was watching Tsue to Tsurugi no Wistoria (Wistoria: Wand and Sword) and thinking about this project to block distractions, then suddenly I thought of "cutting" the distractions...
The key idea of tsurugi is to use the /etc/hosts
file to block websites.
/etc/hosts
is being bypassed by your browser or your browser extensions- Your system is using IPv6
- You are using a VPN
- Browser cache or DNS cache is bypassing
/etc/hosts
new entries
The best solution would be to block websites directly in the network with a proxy server. However, in the first version I want to keep it as simple as possible.
Install the dependencies
go mod download
Or just run the project
go run cmd/main.go
With Go installed, building tsurugi should be as easy as running the following command
go build cmd/main.go -o tsurugi
However, running the command below should generate a more lightweight binary
CGO_ENABLED=0 go build -ldflags='-w -s' cmd/main.go -o tsurugi
This project is licensed under the MIT License - See the LICENSE for more information.
Se você gostou do projeto e ele te ajudou, considere me apoiar um café ☕💙🇧🇷