{"id":51214790,"url":"https://github.com/bdcdo/open-turkey","last_synced_at":"2026-06-28T03:31:14.555Z","repository":{"id":365760865,"uuid":"1261479253","full_name":"bdcdo/open-turkey","owner":"bdcdo","description":"Open-source, Linux-native website \u0026 app blocker (Cold Turkey alternative). CLI + systemd, 4 enforcement layers.","archived":false,"fork":false,"pushed_at":"2026-06-18T18:05:32.000Z","size":76,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-18T20:09:10.097Z","etag":null,"topics":["app-blocker","cli","cold-turkey-alternative","digital-wellbeing","distraction-blocker","focus","go","golang","iptables","linux","productivity","screen-time","self-control","systemd","website-blocker"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/bdcdo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-06T18:37:03.000Z","updated_at":"2026-06-18T18:04:56.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/bdcdo/open-turkey","commit_stats":null,"previous_names":["bdcdo/open-turkey"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/bdcdo/open-turkey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fopen-turkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fopen-turkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fopen-turkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fopen-turkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bdcdo","download_url":"https://codeload.github.com/bdcdo/open-turkey/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bdcdo%2Fopen-turkey/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34876271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["app-blocker","cli","cold-turkey-alternative","digital-wellbeing","distraction-blocker","focus","go","golang","iptables","linux","productivity","screen-time","self-control","systemd","website-blocker"],"created_at":"2026-06-28T03:31:12.606Z","updated_at":"2026-06-28T03:31:14.535Z","avatar_url":"https://github.com/bdcdo.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Open Turkey\n\nA command-line productivity blocker for Linux, backed by a `systemd` service.\n\nOpen Turkey is an open-source, Linux-native alternative to [Cold Turkey](https://getcoldturkey.com/): it blocks distracting websites and applications and keeps them blocked, even against your own attempts to undo it on impulse. Where Cold Turkey is paid and centered on Windows/macOS, Open Turkey is free, built in Go, and designed around the way Linux actually enforces policy.\n\nIt organizes blocking into **blocks** — named groups of:\n\n- **Sites** (domains, e.g. `youtube.com`)\n- **Apps** (process names, e.g. `discord`, `telegram-desktop`)\n\nWhen you **activate** a block, a daemon continuously ensures the blocking layers stay applied.\n\n## How it works — 4 enforcement layers\n\nOpen Turkey doesn't rely on a single, easily-bypassed mechanism. Each active block is enforced on four independent layers, and a `systemd` daemon re-applies them every 5 seconds if anything is tampered with:\n\n1. **`/etc/hosts`** — resolves blocked domains to `0.0.0.0` (affects every program, not just browsers).\n2. **Firewall (iptables)** — blocks network connections to the blocked sites.\n3. **Browser enterprise policies** — managed `URLBlocklist`/`WebsiteFilter` policies for Firefox, Chromium, Google Chrome and Brave. The user cannot disable these from inside the browser, not even in private/incognito mode.\n4. **Process kill** — terminates blocked apps that are running (SIGKILL).\n\nBecause the hosts and firewall layers act below the browser, blocking works even for browsers installed via Snap or Flatpak (where the system-wide browser policy file may not be read).\n\n## Installation\n\nPrerequisites:\n\n- Linux with `systemd`\n- `iptables` available\n- Go (to build), at `/usr/local/go/bin` or otherwise on your `PATH`\n\nRecommended:\n\n```bash\nsudo ./install.sh\n```\n\nThis:\n\n- compiles the binary (`CGO_ENABLED=0`, pure-Go SQLite via `modernc.org/sqlite`)\n- installs `open-turkey` (a wrapper) and `open-turkey-bin` (the real binary) into `/usr/local/bin`\n- adds a rule in `/etc/sudoers.d/open-turkey` so it runs without a password prompt\n- installs and starts the `systemd` service `open-turkey.service`\n- creates the database at `/var/lib/open-turkey/open-turkey.db`\n\nThe installed program is independent of the source directory — once installed, you can remove the project folder and it keeps working.\n\n## Concepts\n\n- **Block**: a set of sites/apps you want to block together.\n- **Active**: a block that is currently in effect (the system is enforcing it).\n- **Lock (`--lock`)**: when enabled, prevents deactivation via `stop`. The only way to deactivate a locked block is `unlock`, which requires completing a typing challenge — deliberate friction to outlast an impulse.\n\n## Commands\n\n### 1) Create and configure a block\n\n```bash\nopen-turkey block create social-media\nopen-turkey block add-site social-media instagram.com x.com facebook.com\nopen-turkey block add-app  social-media discord telegram\n```\n\nShow details:\n\n```bash\nopen-turkey block info social-media\n```\n\nList all blocks:\n\n```bash\nopen-turkey block list\n```\n\n### 2) Activate / deactivate\n\nActivate:\n\n```bash\nopen-turkey start social-media\n```\n\nActivate with a lock:\n\n```bash\nopen-turkey start social-media --lock\n```\n\nShow status:\n\n```bash\nopen-turkey status\n```\n\nDeactivate (only if not locked):\n\n```bash\nopen-turkey stop social-media\n```\n\nUnlock a locked block (this also **deactivates** it):\n\n```bash\nopen-turkey unlock social-media\n```\n\n### 3) Editing a block's lists\n\nRemove a domain from a block:\n\n```bash\nopen-turkey block remove-site social-media instagram.com\n```\n\nNotes:\n\n- If the block is **active**, Open Turkey re-applies the layers so the change takes effect immediately.\n- If the block is **active and locked**, you **cannot** edit its sites/apps. Run `open-turkey unlock \u003cblock\u003e` first (which deactivates it), make your changes, then activate again.\n\nRemove an app (process) from a block:\n\n```bash\nopen-turkey block remove-app social-media discord\n```\n\nRemove an entire block (must be inactive):\n\n```bash\nopen-turkey block remove social-media\n```\n\n## Service (daemon) and logs\n\nThe daemon is managed by `systemd`:\n\n```bash\nsystemctl status open-turkey\nsystemctl restart open-turkey\njournalctl -u open-turkey -f\n```\n\n## Uninstall\n\n```bash\nsudo make uninstall\n```\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdcdo%2Fopen-turkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbdcdo%2Fopen-turkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbdcdo%2Fopen-turkey/lists"}