{"id":16184382,"url":"https://github.com/mattmezza/bloc","last_synced_at":"2025-04-07T12:46:25.046Z","repository":{"id":79953706,"uuid":"567729741","full_name":"mattmezza/bloc","owner":"mattmezza","description":"🚫 block a website from the terminal","archived":false,"fork":false,"pushed_at":"2022-11-18T13:10:45.000Z","size":134,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T15:36:35.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattmezza.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-18T12:48:32.000Z","updated_at":"2023-05-02T20:28:24.000Z","dependencies_parsed_at":"2023-06-25T22:59:52.680Z","dependency_job_id":null,"html_url":"https://github.com/mattmezza/bloc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Fbloc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Fbloc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Fbloc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattmezza%2Fbloc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattmezza","download_url":"https://codeload.github.com/mattmezza/bloc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247656076,"owners_count":20974292,"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-10-10T07:10:00.437Z","updated_at":"2025-04-07T12:46:25.027Z","avatar_url":"https://github.com/mattmezza.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"bloc\n===\n\n`bloc` is a macOS utility for quickly blocking a website without leaving the comfort of your terminal.\n\n![](bloc.gif)\n\n`bloc` edits the `/etc/hosts` file, so it needs `sudo` privileges to run.\n\nInstallation\n===\n\nInstalling `bloc` is very easy: you just need to clone this very same repo at the latest release and then source the `bloc` file in your bash profile. Here's how I do it in my [dotfiles](https://github.com/mattmezza/dotfiles) (see plugins.sh and plugins.txt).\n\n```bash\ngit clone git@github.com:mattmezza/bloc.git \u0026\u0026 cd $_\n./bloc twitter.com\n```\n\nUsage\n===\n\nSome examples:\n\n- block twitter for 20 min: `bloc twitter.com \u0026\u0026 sleep 1200 \u0026\u0026 bloc -u twitter.com`\n- block work websites: `cat work.txt | xargs -n1 bloc` where `work.txt` contains a multi-line list of domains\n- block socials: `cat social.txt | while read -r i;do bloc $i; done`\n\nWhat follows is the output of `bloc`, accessible at any time.\n\n```\nUsage:\n    bloc [OPT] ARGS\nOPT:\n    -u|--unblock\n    -h|--help\n    -v|--version\nARGS:\n    sub.domain.tld (e.g. twitter.com, or www.facebook.com)\nExamples:\n    $ bloc twitter.com        # blocks twitter.com\n    $ bloc -u twitter.com     # unblocks twitter.com\n```\n\nDevelopment\n===\n\nDeveloping `bloc` is quite easy. Clone the repo and start editing the `bloc` file.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattmezza%2Fbloc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattmezza%2Fbloc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattmezza%2Fbloc/lists"}