# `Hostile`

Pack it in - re-use Crate name for something else.



# OLD

A tool for manipulating Hosts files.

# WORK IN PROGRESS

## PLANNED FUNCTIONALITY

### Add
Add host

### Delete
Delete host by IP, Host or both.

### Block
Block a host by routing to localhost.

### Unblock
Remove block to host.

### Check
Check for existing host by IP, host or both.

Return proper exit codes.

### Search
* list by regex
* list by IP

### Format
Remove duplicates, sort alphabetically.

### Sync
Copy external hosts file.

Test using https://github.com/StevenBlack/hosts

* option to --overwrite / --merge
* can schedule to run every day

### Backup
Backup hosts file to local dir, git repo or S3.

### Restore
Restore from old backup.

### Edit
Open hosts file in preferred ${EDITOR}

### Show
Cat out hosts file with nice highlighting/formatting.

### Update
Self update Hostile CLI.

(probably not needed)

### Config
Set/unset/show config values.

* path: path to hosts file
* backup_path: where to store backups

### Stats
* Percentage of hosts which are ipv4/ipv6
* Number of hosts
* Number of unique hosts/IPs

### Validate
Ensure all entries are valid, no duplicates, file has been formatted etc.

### Help
Spit out help for commands.

## FLAGS

### -v / --verbose
More logging.

### -q / --quiet
No logging.

### -d / --dry-run
No action.

### -h / --help
Help per command.

## SUPPORT
* Empty hosts file
* Existing top level comment in file
* IPv6
* Unix & Windows
