A little tool for automatically blocking websites and urls from the command line.
It assumes there's a hostfile at /etc/hosts
. If you're on macOS or most linux
distros, then this should likely be the case for you already.
Block is more/less meant to be a one-way tool. If you want to remove something from your block list, you'll need to open up your /etc/hosts
file and remove the line at the the end of the file yourself. There is no unblock xyz.com
.
$ block distractingsite.com
git clone https://github.com/Flaque/block.git;
cd ./block;
make;
sudo mv ./block /usr/local/bin/block;
- Fork it ( https://github.com/flaque/block/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
- Flaque Flaque - creator, maintainer