{"id":13732038,"url":"https://github.com/giuseppeg/ffocus","last_synced_at":"2025-04-14T19:10:19.687Z","repository":{"id":57234985,"uuid":"76192934","full_name":"giuseppeg/ffocus","owner":"giuseppeg","description":"🔍 A CLI tool to temporarly disable distracting websites and boost your productivity","archived":false,"fork":false,"pushed_at":"2019-10-08T20:42:56.000Z","size":8,"stargazers_count":110,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T07:34:13.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/giuseppeg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"giuseppeg"}},"created_at":"2016-12-11T18:49:36.000Z","updated_at":"2024-01-09T10:25:47.000Z","dependencies_parsed_at":"2022-08-23T15:31:21.861Z","dependency_job_id":null,"html_url":"https://github.com/giuseppeg/ffocus","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppeg%2Fffocus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppeg%2Fffocus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppeg%2Fffocus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/giuseppeg%2Fffocus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/giuseppeg","download_url":"https://codeload.github.com/giuseppeg/ffocus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248943456,"owners_count":21186958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-03T02:01:44.477Z","updated_at":"2025-04-14T19:10:19.669Z","avatar_url":"https://github.com/giuseppeg.png","language":"JavaScript","funding_links":["https://github.com/sponsors/giuseppeg"],"categories":["JavaScript"],"sub_categories":[],"readme":"# 🔍 ffocus\n\nA CLI tool to temporarly disable distracting websites and boost your productivity 👌\n\n\u003cimg width=\"514\" alt=\"screen shot 2016-12-11 at 23 21 43\" src=\"https://cloud.githubusercontent.com/assets/711311/21083820/dc2beada-bff8-11e6-9846-334203e62e8a.png\"\u003e\n\n## install\n\n```bash\nnpm i ffocus -g\n```\n\n## usage\n\nffocus adds temporary rules to `/etc/hosts` to resolve distracting websites to `localhost`.\n\nBecause of that you need `sudo` rights to run it but don't worry it doesn't do anything nasty.\n\n```bash\n~ $ ffocus\n\nUsage: ffocus [minutes] [host1 host2 host3 ...]\n\nOptions:\n\n  -h, --help                output usage information\n  -a, --add \u003chost\u003e          adds a new host\n  -r, --remove \u003chost\u003e       removes an existing host\n  -t, --duration \u003cminutes\u003e  sets the duration for a preset\n  -p, --preset \u003cname\u003e       a preset\n  -l, --list                lists all the presets\n  -V, --version             output the version number\n```\n\n### basic usage\n\n```bash\nsudo ffocus 60 facebook.com twitter.com\n```\n\n### presets\n\nYou can create as many preset as you want.\n\nEach preset is stored in `~/ffocus.json`\nand has a name, minutes, and a list of hosts to block.\n\n```json\n{\n  \"presets\": {\n    \"work\": {\n      \"minutes\": 60,\n      \"sites\": [\n        \"facebook.com\",\n        \"twitter.com\"\n      ]\n    }\n  }\n}\n```\n\nWhen you `--add` a new preset ffocus creates an entry if it can't find an existing preset.\n\n```bash\nsudo ffocus -p work -a web.whatsapp.com\nsudo ffocus -p work -t 30\n```\n\nand then run it\n\n```bash\nsudo ffocus -p work\n```\n\n## troubleshooting\n\nIf ffocus doesn't work you:\n\n* are not on macos or unix\n* might need to flush your DNS cache\n* the browser caches too try to close it, go incognito or something\n* it is fucked up and buggy – very likely\n\n## license\n\nMIT\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuseppeg%2Fffocus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgiuseppeg%2Fffocus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgiuseppeg%2Fffocus/lists"}