Blocker allows you to block your desired websites so that you can stay focused.
Browser extensions that are currently available surely do a great job, but what about when you have multiple browsers and multiple profiles? It can be a pain to install extensions over multiple browsers and multiple profiles. Similarly, you can easily bypass almost all extension blocks as soon as you open an incognito window. Furthermore, most of the extensions keep on notifying you to get a premium. Blocker helps you to solve this problem.
go install github.com/CoderParth/blocker@latest
Add your Go bin directory to your PATH so go installed tools can be run from anywhere.
Add this to your shell config (~/.bashrc, ~/.zshrc, etc.):
export PATH=$PATH:$(go env GOPATH)/binReload it:
source ~/.zshrc # or ~/.bashrcexport PATH=$PATH:$(go env GOPATH)/binThen reload it:
source ~/.zshrc # or ~/.bashrc, etc.Windows: Open Start Menu → search "Edit the system environment variables" → under User variables, edit Path and add:
C:\Users\<YourUsername>\go\bin
Enter only the name of the website (e.g.,
youtube, notyoutube.com).
macOS & Linux: sudo requires the full path because it doesn't inherit your user's PATH:
sudo ~/go/bin/blocker <command>Windows: Run your terminal (Command Prompt or PowerShell) as Administrator.
sudo ~/go/bin/blocker add <website-name>blocker add <website-name> # Windows
sudo ~/go/bin/blocker remove <website-name>blocker remove <website-name> # Windows
sudo ~/go/bin/blocker listblocker list # Windows