🔍 ffocus
A CLI tool to temporarly disable distracting websites and boost your productivity 👌

install
npm i ffocus -g
usage
ffocus adds temporary rules to /etc/hosts
to resolve distracting websites to localhost
.
Because of that you need sudo
rights to run it but don't worry it doesn't do anything nasty.
~ $ ffocus Usage: ffocus [minutes] [host1 host2 host3 ...] Options: -h, --help output usage information -a, --add <host> adds a new host -r, --remove <host> removes an existing host -t, --duration <minutes> sets the duration
basic usage
sudo ffocus 60 facebook.com twitter.com
presets
You can create as many preset as you want.
Each preset is stored in ~/ffocus.json
and has a name, minutes, and a list of hosts to block.
When you --add
a new preset ffocus creates an entry if it can't find an existing preset.
sudo ffocus -p work -a web.whatsapp.comsudo ffocus -p work -t 30
and then run it
sudo ffocus -p work
troubleshooting
If ffocus doesn't work you:
- are not on macos or unix
- might need to flush your DNS cache
- the browser caches too try to close it, go incognito or something
- it is fucked up and buggy – very likely
license
MIT