Metadata-Version: 2.4
Name: hostctl-cli
Version: 0.1.0
Summary: Manage /etc/hosts entries from the command line
Author-email: Marcus <marcus.builds.things@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/marcusbuildsthings-droid/hostctl
Project-URL: Issues, https://github.com/marcusbuildsthings-droid/hostctl/issues
Keywords: hosts,dns,cli,devtools,networking
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: System :: Networking
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: click>=8.0
Dynamic: license-file

# hostctl

Manage `/etc/hosts` entries from the command line. Add, remove, enable, disable, and look up host entries with ease.

## Install

```bash
pip install hostctl-cli
```

## Usage

```bash
# List all entries
hostctl list
hostctl list --all          # Include disabled

# Look up a hostname
hostctl lookup myapp.local

# Add an entry (requires sudo for /etc/hosts)
sudo hostctl add 127.0.0.1 myapp.local api.local -c "dev environment"

# Remove entries
sudo hostctl remove myapp.local

# Disable (comment out) without removing
sudo hostctl disable myapp.local

# Re-enable
sudo hostctl enable myapp.local

# Use a custom hosts file
hostctl -f ./hosts.test list

# JSON output
hostctl --json list
```

## For AI Agents

See [SKILL.md](SKILL.md) for agent-optimized documentation.

## Features

- List, add, remove, enable, disable host entries
- Look up hostnames
- JSON output (`--json`) for automation
- Custom hosts file support (`-f`)
- Dry-run mode for add/remove
- Automatic backup before writes
- Preserves comments and formatting

## License

MIT
