Temporarily block your machine from reaching LLM services, to curb AI dependency. Shamelessly written with AI.
npx killm for 1h --agents # no coding agents for an hour
npx killm 30m --web # no chat websites for 30 minutes
npx killm for 2h --all # cut everything off for two hoursnpx killm for 1h --agentsEditing the hosts file needs elevated privileges:
- macOS / Linux: prefix with
sudo→sudo npx killm for 1h --agents - Windows: run from an Administrator terminal
The whole point of killm is that an agentic coding tool and a chat website
talk to different hostnames, so you can cut one without losing the other:
| Tool | Hostname | Scope |
|---|---|---|
| Claude Code, Aider, raw API | api.anthropic.com |
--agents |
| Claude chat website | claude.ai |
--web |
| OpenAI API, Codex | api.openai.com |
--agents |
| ChatGPT website | chatgpt.com |
--web |
So:
--agentsblocks API endpoints and dedicated coding-assistant backends.--webblocks the consumer chat websites (claude.ai,chatgpt.com,gemini.google.com,perplexity.ai, etc).--allblocks both. This is the default if you don't pass a scope.
npx killm for <duration> [scope] [options]
npx killm <duration> [scope] [options]
The word for is optional sugar — killm for 1h --agents and
killm 1h --agents are identical.
Combine units d / h / m / s:
90s 30m 1h 1h30m 2d
A bare number is treated as minutes (45 = 45m).
| Flag | Blocks |
|---|---|
--agents |
Agentic coding tools + raw API endpoints |
--web |
Consumer chat websites |
--all |
Both (default) |
You can combine --agents and --web; that's the same as --all.
| Option | Effect |
|---|---|
--firewall |
Also block current IPs at the OS firewall |
--restore |
Lift any active block right now and exit |
--status |
Report whether a block is currently active |
--list |
Print the hostnames a given scope would block |
--dry-run |
Show what would change without touching anything |
-y, --yes |
Skip the confirmation prompt |
-h, --help |
Show help |
-v, --version |
Show version |
npx killm for 1h --agents # coding agents off for an hour
npx killm 30m --web # chat websites off for 30 minutes
npx killm for 2h --all # everything off for two hours
npx killm --list --agents # see exactly what --agents blocks
npx killm for 25m --web --dry-run # preview, change nothing
npx killm --restore # end an active block early
npx killm --status # is a block running right now?The hosts file only intercepts name resolution, so a browser with Secure DNS
enabled bypasses it. --firewall closes that hole: in addition to the
hosts entries, killm resolves each target hostname to its current IPs and
blocks those at the OS firewall:
sudo npx killm for 1h --web --firewall- Linux:
iptables/ip6tablesOUTPUT rules, tagged with akillmcomment - Windows: one outbound Windows Firewall rule named
killm(vianetsh) - macOS: a
pfanchor namedkillm
Rules are removed together with the hosts block (timer, Ctrl+C, or
killm --restore — which also sweeps up rules left behind by a crash, since
they're all tagged).
MIT © Aidan Neel