{"id":20963828,"url":"https://github.com/mitjafelicijan/hosts","last_synced_at":"2025-05-14T09:31:40.737Z","repository":{"id":21772480,"uuid":"25094747","full_name":"mitjafelicijan/hosts","owner":"mitjafelicijan","description":"/etc/hosts CLI toggler","archived":false,"fork":false,"pushed_at":"2014-10-13T21:30:32.000Z","size":208,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2023-03-30T04:38:08.878Z","etag":null,"topics":["bash","hosts"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/mitjafelicijan.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}},"created_at":"2014-10-11T20:47:43.000Z","updated_at":"2019-08-13T15:52:42.000Z","dependencies_parsed_at":"2022-08-19T16:50:37.515Z","dependency_job_id":null,"html_url":"https://github.com/mitjafelicijan/hosts","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitjafelicijan%2Fhosts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitjafelicijan%2Fhosts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitjafelicijan%2Fhosts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitjafelicijan%2Fhosts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitjafelicijan","download_url":"https://codeload.github.com/mitjafelicijan/hosts/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225284588,"owners_count":17449931,"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":["bash","hosts"],"created_at":"2024-11-19T02:48:32.788Z","updated_at":"2024-11-19T02:48:33.683Z","avatar_url":"https://github.com/mitjafelicijan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI /etc/hosts easy toggler\n\n### Contact \u0026 Features\n\nYou can contact me via:\n\n  - Twitter @mitjafelicijan or #clihosts\n  - Email \u003cmitja.felicijan@gmail.com\u003e\n  - Github issues \u003chttps://github.com/mitjafelicijan/hosts/issues\u003e\n\n\n### Updates\n\n - (October 12, 2014) Added support for user input history. You can use up and down arrow\nto access previously entered host row id's.\n\n\n### Installation\n\nIf you have existing hosts defined please make sure that the ones commented have \nspace between # and host otherwise script will not work properly. It is on a todo to\nsupport this non-space comments.\n\t\n\tNot ok\n\t#127.0.0.1  admin.abcsearch.com\n\n\tOk\n\t# 127.0.0.1  admin.abcsearch.com\n\nInstallation \n\t\n\tcd /path-to-wherever-you-want-your-script/\n\twget -O hosts.py https://raw.githubusercontent.com/mitjafelicijan/hosts/master/hosts.py \u0026\u0026 chmod +x hosts.py\n\n\n### Usage\n\nBecause we are attempting to modify system files we need to execute script with root\nprivileges. So use it with sudo.\n\n\tsudo ./hosts.py --version\n\n\tsudo ./hosts.py --help\n\n\tsudo ./hosts.py path-to-your-hosts-file\n\t(by default /etc/hosts will be used)\n\n![alt text](screenshoots/window.png)\n\nDefault view when you launch application. Gray rows are disabled hosts. Green rows\nare enabled hosts. numbers in square brackets on the left side of row represents row\nnumber in hosts file. You address record you want to toggle by inserting row number in \nthe user input and pressing enter.\n\n![alt text](screenshoots/window-disabled.png)\n\n| User input  | Description                     |\n| ----------- | ------------------------------- |\n| 1 .. n      | Hosts row id you want to toggle |\n| q or Q      | Quit application                |\n| r or R      | Reload hosts list               |\n\n**Youtube video preview**\n\nClick on a thumbnail bellow.\n\n[![Youtube video](http://img.youtube.com/vi/03pb37Y-03g/3.jpg)](http://www.youtube.com/watch?v=03pb37Y-03g)\n\n### Warning\n\nPlease beware that this script updates /etc/hosts file so it is advised\nto make backup of the file before using it.\n\n### License\n\nThe MIT License (MIT)\n\nCopyright (c) 2014 Mitja Felicijan \u003cmitja.felicijan@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitjafelicijan%2Fhosts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitjafelicijan%2Fhosts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitjafelicijan%2Fhosts/lists"}