@spatz/cli 0.1.1 → 0.1.3
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 +71 -25
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -103,41 +103,87 @@ See [How it works](docs/how-it-works.md) and [Recommendation rules](docs/recomme
|
|
|
103
103
|
|
|
104
104
|
| Integration | What it does | Setup |
|
|
105
105
|
| --- | --- | --- |
|
|
106
|
-
| Claude Code `spatz
|
|
107
|
-
| Codex `spatz
|
|
108
|
-
| Claude Code `spatz` plugin (mod) | Show recommendations or apply model and effort choices. | [Mod guide](docs/claude-mod.md) |
|
|
109
|
-
| Other agents | Request recommendations and report outcomes through the CLI. | [
|
|
106
|
+
| Claude Code `spatz` plugin | Record task signals and model usage. | [Hooks guide](docs/hooks.md) |
|
|
107
|
+
| Codex `spatz` plugin | Record shell results and model usage. | [Hooks guide](docs/hooks.md) |
|
|
108
|
+
| Claude Code `spatz-mod` plugin (mod) | Show recommendations or apply model and effort choices. | [Mod guide](docs/claude-mod.md) |
|
|
109
|
+
| Other agents | Request recommendations and report outcomes through the CLI. | [Installation](docs/installation.md) | CLI and plugin setup, runtime requirements, and release-specific installs. |
|
|
110
|
+
| [CLI reference](docs/cli.md) |
|
|
110
111
|
|
|
111
112
|
The Claude Code mod supports `step`, `turn`, `subagent`, `session`, and `escalate` routing scopes.
|
|
112
|
-
Hooks and the mod can run together. The mod's `record: auto` avoids duplicate usage recording with the `spatz
|
|
113
|
+
Hooks and the mod can run together. The mod's `record: auto` avoids duplicate usage recording with the `spatz` hooks plugin.
|
|
113
114
|
|
|
114
|
-
### Install
|
|
115
|
+
### Install for Claude Code
|
|
115
116
|
|
|
116
|
-
|
|
117
|
+
Use macOS or Linux with a POSIX shell. The plugins do not support native Windows.
|
|
118
|
+
The plugins run the CLI through a bundled launcher: an installed `spatz` on `PATH` wins, otherwise it uses Bun or npx from the `PATH` Claude Code starts with.
|
|
119
|
+
The mod needs Claude Code 2.1.287 or newer.
|
|
117
120
|
|
|
118
|
-
|
|
119
|
-
/plugin marketplace add lorenzh/spatz
|
|
120
|
-
/plugin install spatz-hooks@spatz
|
|
121
|
-
/plugin install spatz@spatz
|
|
122
|
-
```
|
|
121
|
+
1. Start Claude Code. Add the marketplace and install the hooks:
|
|
123
122
|
|
|
124
|
-
|
|
123
|
+
```text
|
|
124
|
+
/plugin marketplace add lorenzh/spatz
|
|
125
|
+
/plugin install spatz@spatz
|
|
126
|
+
```
|
|
125
127
|
|
|
126
|
-
|
|
128
|
+
The hooks record test/build results and model usage. They do not switch models.
|
|
127
129
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
2. Optional: install the mod for automatic recommendations:
|
|
131
|
+
|
|
132
|
+
```text
|
|
133
|
+
/plugin install spatz-mod@spatz
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
The mod defaults to `show` mode. To apply recommendations to subagents, run:
|
|
137
|
+
|
|
138
|
+
```text
|
|
139
|
+
/spatz mode apply
|
|
140
|
+
/spatz status
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
When you install both plugins, keep `record: auto`. The hooks then handle recording.
|
|
144
|
+
To apply recommendations to the main session too, enable `/spatz main on`.
|
|
145
|
+
|
|
146
|
+
3. Remove any manual `spatz hook` entries from `~/.claude/settings.json` and project settings.
|
|
147
|
+
Keep unrelated hooks. This avoids duplicate records.
|
|
148
|
+
|
|
149
|
+
See the [Claude Code mod guide](docs/claude-mod.md) for routing scopes and persistent configuration.
|
|
150
|
+
|
|
151
|
+
### Install for Codex CLI
|
|
152
|
+
|
|
153
|
+
Use macOS or Linux with a POSIX shell and a Codex CLI version with plugin support.
|
|
154
|
+
Install the [spatz CLI](#quickstart) first and check `spatz --version` in your terminal.
|
|
155
|
+
|
|
156
|
+
1. Add the marketplace and install the hooks from your terminal:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
codex plugin marketplace add lorenzh/spatz
|
|
160
|
+
codex plugin add spatz@spatz
|
|
161
|
+
codex plugin list
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
2. Start Codex. Run `/hooks` to review and trust the spatz hooks.
|
|
165
|
+
Codex skips plugin hooks until you trust them. See [OpenAI's hook documentation](https://learn.chatgpt.com/docs/hooks#review-and-trust-hooks).
|
|
166
|
+
|
|
167
|
+
3. Remove any manual `spatz hook … --agent codex` entries from `~/.codex/hooks.json`.
|
|
168
|
+
Keep unrelated hooks. This avoids duplicate records.
|
|
169
|
+
|
|
170
|
+
The plugin records shell results and model usage. Its routing skill guides the agent through recommendations and outcome reports.
|
|
171
|
+
It does not automatically switch the Codex model.
|
|
172
|
+
See the [Codex hooks guide](docs/hooks.md#codex-cli) for recorded events and limits.
|
|
173
|
+
|
|
174
|
+
### Check your setup
|
|
132
175
|
|
|
133
|
-
|
|
176
|
+
If you use Jev, set `TYPESAFE_AI_API_KEY` in the terminal before starting your coding agent.
|
|
177
|
+
Ask your agent to request a recommendation for a real task using its available model and effort pairs.
|
|
178
|
+
Keep the suggestion output unfiltered so the hooks can read its ID.
|
|
179
|
+
After the task, ask the agent to report the actual pair and result with `spatz report`.
|
|
180
|
+
Run `spatz stats` to see recorded outcomes.
|
|
134
181
|
|
|
135
|
-
Every plugin ships the `
|
|
136
|
-
|
|
137
|
-
Codex hooks time out after 10 seconds
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
See [Installation](docs/installation.md) for details.
|
|
182
|
+
Every plugin ships the `routing` skill (`/spatz:routing`, `/spatz-mod:routing`, or `spatz:routing` in Codex). The mod's `/spatz` command checks status and changes mode or scope. You do not need to edit your agent instructions.
|
|
183
|
+
Every plugin can run without a global CLI through its bundled launcher using Bun or npx.
|
|
184
|
+
The first run downloads about 60 MB. Codex hooks time out after 10 seconds.
|
|
185
|
+
For this setup, warm the launcher before the first session with `"<plugin root>/bin/spatz" --version`.
|
|
186
|
+
See [Installation](docs/installation.md) for launcher paths and setup without a global CLI.
|
|
141
187
|
|
|
142
188
|
## Privacy
|
|
143
189
|
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spatz/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Model and effort recommendations for coding agents",
|
|
5
5
|
"bin": {
|
|
6
6
|
"spatz": "bin/spatz.js"
|
|
7
7
|
},
|
|
8
8
|
"optionalDependencies": {
|
|
9
|
-
"@spatz/cli-linux-x64": "0.1.
|
|
10
|
-
"@spatz/cli-linux-arm64": "0.1.
|
|
11
|
-
"@spatz/cli-darwin-arm64": "0.1.
|
|
12
|
-
"@spatz/cli-darwin-x64": "0.1.
|
|
13
|
-
"@spatz/cli-win32-x64": "0.1.
|
|
9
|
+
"@spatz/cli-linux-x64": "0.1.3",
|
|
10
|
+
"@spatz/cli-linux-arm64": "0.1.3",
|
|
11
|
+
"@spatz/cli-darwin-arm64": "0.1.3",
|
|
12
|
+
"@spatz/cli-darwin-x64": "0.1.3",
|
|
13
|
+
"@spatz/cli-win32-x64": "0.1.3"
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=18"
|