@kill-switch/cli 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -119,11 +119,47 @@ ks alerts remove "PagerDuty"
|
|
|
119
119
|
ks alerts test
|
|
120
120
|
```
|
|
121
121
|
|
|
122
|
+
## Agent Guard (`ks guard`)
|
|
123
|
+
|
|
124
|
+
Cap runaway **coding-agent** LLM spend (Claude Code, Cursor, Aider). Same engine as
|
|
125
|
+
[`@kill-switch/agent-guard`](https://www.npmjs.com/package/@kill-switch/agent-guard) — one
|
|
126
|
+
ledger, one budget.
|
|
127
|
+
|
|
128
|
+
```sh
|
|
129
|
+
# Wire the Claude Code hook (use --global for ~/.claude)
|
|
130
|
+
ks guard install
|
|
131
|
+
|
|
132
|
+
# Set caps (USD)
|
|
133
|
+
ks guard config --session-soft 5 --session-hard 20 --daily-soft 25 --daily-hard 100
|
|
134
|
+
|
|
135
|
+
# Check spend vs budget
|
|
136
|
+
ks guard status
|
|
137
|
+
|
|
138
|
+
# Hard 402 wall for non-Claude-Code agents (Cursor, Aider, scripts)
|
|
139
|
+
ks guard proxy --flavor openai --port 8787
|
|
140
|
+
|
|
141
|
+
# Escape hatch — enforcement off until resume
|
|
142
|
+
ks guard pause --minutes 30
|
|
143
|
+
ks guard resume
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Command | Description |
|
|
147
|
+
|---------|-------------|
|
|
148
|
+
| `ks guard install` | Wire agent-guard hook into Claude Code settings |
|
|
149
|
+
| `ks guard status` | Session + daily spend vs budget |
|
|
150
|
+
| `ks guard config` | View or set soft/hard caps |
|
|
151
|
+
| `ks guard proxy` | Start token-metering proxy (HTTP 402 at hard cap) |
|
|
152
|
+
| `ks guard pause` / `resume` | Temporarily disable / re-arm enforcement |
|
|
153
|
+
| `ks guard reset` | Clear the spend ledger |
|
|
154
|
+
|
|
155
|
+
Full docs: [kill-switch.net/docs/cli.html#guard](https://kill-switch.net/docs/cli.html#guard)
|
|
156
|
+
|
|
122
157
|
## Commands
|
|
123
158
|
|
|
124
159
|
| Command | Description |
|
|
125
160
|
|---------|-------------|
|
|
126
161
|
| `ks onboard` | One-command setup: connect + shields + alerts |
|
|
162
|
+
| `ks auth setup` | Authenticate via browser (device flow) |
|
|
127
163
|
| `ks auth login` | Authenticate with API key |
|
|
128
164
|
| `ks auth status` | Show auth status |
|
|
129
165
|
| `ks status` | Dashboard: accounts, alerts, 30-day spend summary |
|
|
@@ -138,6 +174,9 @@ ks alerts test
|
|
|
138
174
|
| `ks alerts remove <name>` | Remove an alert channel by name |
|
|
139
175
|
| `ks alerts test` | Send a test alert to all channels |
|
|
140
176
|
| `ks analytics` | Cost analytics: spend summary, 7-day table, per-account breakdown |
|
|
177
|
+
| `ks watch` | Continuously poll all accounts on an interval |
|
|
178
|
+
| `ks providers` | Provider info and credential validation |
|
|
179
|
+
| `ks guard` | Cap coding-agent LLM spend (hook + proxy) |
|
|
141
180
|
| `ks config list` | Show configuration |
|
|
142
181
|
|
|
143
182
|
## AI Agent Usage
|
|
@@ -180,6 +219,7 @@ Add this to your project's `CLAUDE.md` so your AI agent knows how to manage Kill
|
|
|
180
219
|
- Auth: KILL_SWITCH_API_KEY env var or `ks auth login --api-key KEY`
|
|
181
220
|
- Setup: `ks onboard --provider cloudflare --account-id ID --token TOKEN`
|
|
182
221
|
- Check: `ks check --json`
|
|
222
|
+
- Agent spend: `ks guard install` then `ks guard config --daily-hard 150`
|
|
183
223
|
- Docs: `ks onboard --help-provider cloudflare`
|
|
184
224
|
```
|
|
185
225
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kill-switch/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "Kill Switch CLI — monitor cloud spending, kill runaway services from the terminal",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@kill-switch/agent-guard": "^0.1.1",
|
|
17
|
-
"@kill-switch/sdk": "^0.1.
|
|
17
|
+
"@kill-switch/sdk": "^0.1.1",
|
|
18
18
|
"chalk": "^5.6.2",
|
|
19
19
|
"commander": "^12.1.0",
|
|
20
20
|
"ora": "^8.2.0"
|