{"repo":"txn2/txeh","free":true,"listed":false,"github":"https://github.com/txn2/txeh","clone":"git clone https://github.com/txn2/txeh.git","description":"Go library and CLI utility for /etc/hosts management.","language":"Go","stars":340,"topics":["network","golang","hostsfile","library","utility","brew","homebrew","dns","devops","sysadmin"],"license":"Apache-2.0","category":"deployment-docker-iac","readme_excerpt":"Etc Hosts Management Utility & Go Library Documentation Go Reference Releases /etc/hosts Management It is easy to open your [/etc/hosts] file in text editor and add or remove entries. However, if you make heavy use of [/etc/hosts] for software development or DevOps purposes, it can sometimes be difficult to automate and validate large numbers of host entries. txeh was initially built as a golang library to support kubefwd, a Kubernetes port-forwarding utility utilizing [/etc/hosts] heavily, to associate custom hostnames with multiple local loopback IP addresses and remove these entries when it terminates. A computer's [/etc/hosts] file is a powerful utility for developers and system administrators to create localized, custom DNS entries. This small go library and utility were developed to encapsulate the complexity of working with [/etc/hosts] directly by providing a simple interface for adding and removing entries in a [/etc/hosts] file. Features: - Thread-safe operations (mutex-protected for concurrent use) - IPv4 and IPv6 support - CIDR range operations for bulk add/remove - Preserves comments and file formatting - Cross-platform (Linux, macOS, Windows) txeh Utility Install MacOS homebrew users can brew install txn2/tap/txeh , otherwise see releases for packages and binaries for a number of distros and architectures including Windows, Linux and Arm based systems. Install with go install When installing with Go please use the latest stable Go release. At least go1.24 or gre","default_branch":null,"files":null,"tree":[],"storefront":"/r/txn2","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/txn2/txeh/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}