hostctl

command module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 1 Imported by: 0

README

Tests GitHub Release Go Report Card License

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.

Installation

Go to release page and download the binary you need.

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 vcs.

Usage

hostctl list +---------+--------+----------------+----------------------------+ | PROFILE | STATUS | IP | DOMAIN | +---------+--------+----------------+----------------------------+ | lite | on | 192.168.1.51 | jupyter.toolkit-lite.local | +---------+--------+----------------+----------------------------+ | toolkit | on | 192.168.99.119 | minio.toolkit.local | | toolkit | on | 192.168.99.119 | app.toolkit.local | | toolkit | on | 192.168.99.119 | gitea.toolkit.local | | toolkit | on | 192.168.99.119 | jupyter.toolkit.local | | toolkit | on | 192.168.99.119 | drone.toolkit.local | | toolkit | on | 192.168.99.119 | code.toolkit.local | +---------+--------+----------------+----------------------------+

hostctl from-file -f /path/to/.etchosts [-p profile] hostctl remove [-p profile] hostctl enable [-p profile] hostctl disable [-p profile] hostctl backup -f path_to_file hostctl restore -f path_to_file

TODO

hostctl from-k8s -n namespace hostctl from-minikube -n namespace

hostctl set ip IP [-p profile] hostctl set domains dom1,dom2,etc [-p profile] hostctl add domains dom1,dom2 [-p profile] hostctl rm domains dom1,dom2 [-p profile]

References
LICENSE

MIT license

Author(s)

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