Skip to main content

hostctl

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

Install

pip install hostctl-cli

Usage

# 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 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

Metadata

Release files for hostctl-cli 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hostctl-cli 0.1.0
File Size Uploaded Provenance Actions
hostctl_cli-0.1.0.tar.gz 5.3 kB Without provenance Details for hostctl_cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hostctl-cli 0.1.0
File Interpreter ABI Platform Actions
hostctl_cli-0.1.0-py3-none-any.whl Python 3 none any Details for hostctl_cli-0.1.0-py3-none-any.whl

Total release size: 11.5 kB

Release files / hostctl_cli-0.1.0.tar.gz

Download URL hostctl_cli-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
65ec77f6ba34c08e29a3d2414e68c83b886ca657105726dfe2a2d1bfa4caadee
BLAKE2b-256 checksum
How to use checksums
5b112649109f44edf86b4ed3ba6536ef573035535293c807a648b3f30e112a44
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / hostctl_cli-0.1.0-py3-none-any.whl

Download URL hostctl_cli-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b42e575d1a4483f63fd7cd2709c93cb260dfef555fca02deeef9fba1fda3bc24
BLAKE2b-256 checksum
How to use checksums
e95ca6eebc72159e53d1119e9531e840da7328def43cc9a64041e1ae31ec565d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Security for hostctl-cli 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page