https://github.com/giuseppeg/ffocus
🔍 A CLI tool to temporarly disable distracting websites and boost your productivity
https://github.com/giuseppeg/ffocus
Last synced: over 1 year ago
JSON representation
🔍 A CLI tool to temporarly disable distracting websites and boost your productivity
- Host: GitHub
- URL: https://github.com/giuseppeg/ffocus
- Owner: giuseppeg
- Created: 2016-12-11T18:49:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-10-08T20:42:56.000Z (almost 7 years ago)
- Last Synced: 2025-03-28T07:34:13.723Z (over 1 year ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 110
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# 🔍 ffocus
A CLI tool to temporarly disable distracting websites and boost your productivity 👌

## install
```bash
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.
```bash
~ $ ffocus
Usage: ffocus [minutes] [host1 host2 host3 ...]
Options:
-h, --help output usage information
-a, --add adds a new host
-r, --remove removes an existing host
-t, --duration sets the duration for a preset
-p, --preset a preset
-l, --list lists all the presets
-V, --version output the version number
```
### basic usage
```bash
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.
```json
{
"presets": {
"work": {
"minutes": 60,
"sites": [
"facebook.com",
"twitter.com"
]
}
}
}
```
When you `--add` a new preset ffocus creates an entry if it can't find an existing preset.
```bash
sudo ffocus -p work -a web.whatsapp.com
sudo ffocus -p work -t 30
```
and then run it
```bash
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