{"id":48629224,"url":"https://github.com/devmatteini/pihole-switch","last_synced_at":"2026-04-09T04:34:43.066Z","repository":{"id":37034162,"uuid":"305166668","full_name":"devmatteini/pihole-switch","owner":"devmatteini","description":"A command line tool to enable/disable your pihole","archived":false,"fork":false,"pushed_at":"2025-03-25T22:37:45.000Z","size":264,"stargazers_count":13,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T06:58:11.040Z","etag":null,"topics":["cli","pihole","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/devmatteini.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-18T18:13:43.000Z","updated_at":"2025-06-25T00:39:42.000Z","dependencies_parsed_at":"2023-02-09T19:46:12.311Z","dependency_job_id":null,"html_url":"https://github.com/devmatteini/pihole-switch","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/devmatteini/pihole-switch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fpihole-switch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fpihole-switch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fpihole-switch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fpihole-switch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devmatteini","download_url":"https://codeload.github.com/devmatteini/pihole-switch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devmatteini%2Fpihole-switch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31586405,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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":["cli","pihole","rust-lang"],"created_at":"2026-04-09T04:34:42.941Z","updated_at":"2026-04-09T04:34:43.045Z","avatar_url":"https://github.com/devmatteini.png","language":"Rust","readme":"# Pihole Switch\n\n![CI](https://github.com/devmatteini/pihole-switch/workflows/CI/badge.svg)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/devmatteini/pihole-switch)\n\nA command line tool to enable/disable your [pihole](https://pi-hole.net/)\n\n![Pihole Switch demo](./assets/phs_demo.gif)\n\nSometimes you just need to disable your pihole for some website to work.\n_**PiholeSwitch** makes this operation much easier_.\n\nJust open a terminal, and you can disable pihole in a moment and for as long as you want.\n\n## Table of contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [License](#license)\n\n## Installation\n\n### Recommended\n\n```bash\ncurl -s https://raw.githubusercontent.com/devmatteini/pihole-switch/main/install.sh | bash\n```\n\nDownload the [latest release](https://github.com/devmatteini/pihole-switch/releases/latest)\nand unzip the `phs.zip` file.\n\nAfter the archive is unzipped, move the `phs` binary in a folder included in your `$PATH` (it's commonly used\n`/usr/local/bin`).\n\n### From DRA\n\nUsing [`dra`](https://github.com/devmatteini/dra) you can download and install the latest release\n\n```bash\ndra download -s phs.zip --install devmatteini/pihole-switch\n./phs --version\n```\n\n### From source\n\n```bash\ngit clone https://github.com/devmatteini/pihole-switch \u0026\u0026 cd pihole-switch\ncargo build --release\n./target/release/phs\n```\n\n## Usage\n\nExport an environment variable `PIHOLE_TOKEN=\u003cpihole_api_token\u003e`.\n\nYou can find the api token here: http://pi.hole/admin/settings.php?tab=api, then under the section `Query log`, click on\nthe button `Show API token` and confirm.\n\n### Commands\n\nEnable pihole\n\n```bash\nphs enable\n```\n\nDisable pihole (indefinitely)\n\n```bash\nphs disable\n```\n\nDisable pihole for 20 seconds\n\n```bash\nphs disable --time 20\n```\n\nIf your device doesn't have pihole set as dns\n\n```bash\nphs --host 192.168.1.50 disable\n```\n\n(where `192.168.1.50` is the pihole ip address)\n\nEnable/disable by passing the api token as an option, instead of using the `PIHOLE_TOKEN` environment variable\n\n```bash\nphs --token \u003ctoken\u003e \u003cSUBCOMMAND\u003e\n```\n\n_**Note: the api token passed as an option will always have priority on the `PIHOLE_TOKEN` environment variable**_\n\n## License\n\n`pihole-switch` is made available under the terms of the MIT License.\n\nSee the [MIT License](LICENSE) file for license details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmatteini%2Fpihole-switch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevmatteini%2Fpihole-switch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevmatteini%2Fpihole-switch/lists"}