hostctl

command module
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2020 License: MIT Imports: 1 Imported by: 0

README

Tests GitHub Release Go Report Card License All Contributors

hostctl

Manage your /etc/hosts like a pro!

This tool gives you more control over the use of your hosts file. You can have multiple profiles and enable/disable as you need.

Why?

It is a tedious task to handle the hosts file by editing manually. With this tool you can automate some aspects to do it cleaner and quick.

Features

  • Manage groups of host names by profile.
  • Enable/disable complete profiles.
  • Add/remove groups of host names.
  • Add profiles directly from a .etchosts file that you can add to your git repo or any VCS.
  • Sync a profile with Docker or Docker Compose containers.

Documentation

Read the Getting started guide or check full documentation here.

Sample Usage

sample usage

Installation

Go to release page and download the binary you need.

Or read how to install on your system here

Linux/Mac/Windows and permissions

The tool recognize your system and use the right hosts file, it will use /etc/hosts on Linux/Mac and C:/Windows/System32/Drivers/etc/hosts on Windows.

SUDO/ADMIN: You will need permissions for any action that modify hosts file, add sudo to the commands below when needed. If you are on windows, make sure you run it as administrator.

WARNING: it should work on any system. It's tested on Ubuntu and Windows 10. If you can confirm it works on other system, please let me know here.

Contributing

Be sure to read CONTRIBUTING and CODE_OF_CONDUCT.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


George Kontridze

💻

Pacodes

⚠️ 💻

BarbUk

💻 🤔

Brett Mack

💻

Peter Thaleikis

💻 📖

simohamed

🤔

Fabian Grutschus

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

Author(s)

LICENSE

MIT license

Documentation

Overview

   __                    __           __     __
  / /_   ____    _____  / /_  _____  / /_   / /
 / __ \ / __ \  / ___/ / __/ / ___/ / __/  / /
/ / / // /_/ / (__  ) / /_  / /__  / /_   / /

/_/ /_/ \____/ /____/ \__/ \___/ \__/ /_/

hostctl is a CLI tool to manage your hosts file with ease.
You can have multiple profiles, enable/disable exactly what
you need each time with a simple interface.

Usage:
  hostctl [command]

Available Commands:
  add         Add content to a profile in your hosts file.
  backup      Creates a backup copy of your hosts file
  disable     Disable a profile from your hosts file.
  enable      Enable a profile on your hosts file.
  help        Help about any command
  list        Shows a detailed list of profiles on your hosts file.
  remove      Remove a profile from your hosts file.
  restore     Restore hosts file content from a backup file.
  set         Set content to a profile in your hosts file.

Flags:
  -h, --help               help for hostctl
      --host-file string   Hosts file path (default "/etc/hosts")
  -p, --profile string     Choose a profile

Use "hostctl [command] --help" for more information about a command.

Package main is a CLI tool to manage your hosts file.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL