@keystrokehq/cli 0.1.50 → 0.1.51
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 +38 -3
- package/dist/index.mjs +282 -240
- package/dist/index.mjs.map +1 -1
- package/dist/skills-bundle/_AGENTS.mcp.md +19 -19
- package/dist/skills-bundle/_AGENTS.md +25 -25
- package/dist/templates/hello-world/README.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,41 @@ Keep the CLI small and boring.
|
|
|
17
17
|
|
|
18
18
|
Right now the CLI exposes `init`, `build`, `dev`, `start`, `lint`, `typecheck`, `test`, `deploy`, `health`, `auth`, `--help`, and `--version`.
|
|
19
19
|
|
|
20
|
+
## Command grammar
|
|
21
|
+
|
|
22
|
+
Stripe-style: plural REST collection, then a verb, then the primary slug. New commands **must** follow this shape.
|
|
23
|
+
|
|
24
|
+
```text
|
|
25
|
+
keystroke <collection> <verb> [<slug>] [<sub-id>] [--flags]
|
|
26
|
+
keystroke <collection> <sub-collection> <verb> [<slug>] [<sub-id>] [--flags]
|
|
27
|
+
keystroke <verb> # lifecycle only (init, build, dev, deploy, …)
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Rules:
|
|
31
|
+
|
|
32
|
+
- **Collections are plural** and match the HTTP API / SDK / `src/` dirs — `workflows`, `agents`, `triggers`, `projects`, `apps`, `channels`, `credentials`. Never singular.
|
|
33
|
+
- **The primary resource is positional**, not a flag. The collection already names the type, so `workflows run greeting` — never `workflows run --workflow greeting`.
|
|
34
|
+
- **Nested resources are sub-collections before the verb** — `workflows runs list <slug>`, `apps actions get <app> <tool>`. Not flat (`workflows-runs-list`) and not verb-first (`workflows list runs`).
|
|
35
|
+
- **A second positional is the child id** — `workflows runs cancel <workflow> <run-id>`, `agents sessions cancel <agent> <session-id>`.
|
|
36
|
+
- **Flags are for two things only:**
|
|
37
|
+
- **Payload / options** — `--input`, `--message`, `--include`, `--limit`.
|
|
38
|
+
- **Scope or a *different* resource type** — global `--project` / `--local`; cross-references like `triggers disable <trigger> --workflow <slug>` where the positional is the trigger and the flag narrows to one attachment. Do not add type-named flags (`--workflow`, `--agent`) to that type's own commands.
|
|
39
|
+
- **Verbs are consistent across collections** — `list`, `get`, `create`, `update`, `delete`, `run`/`execute`/`prompt`. Prefer `get` over `show`, `create` over `set`.
|
|
40
|
+
|
|
41
|
+
Example command tree:
|
|
42
|
+
|
|
43
|
+
```text
|
|
44
|
+
keystroke workflows run <slug> --input '{...}'
|
|
45
|
+
keystroke workflows runs list|get|cancel <slug> [<run-id>]
|
|
46
|
+
keystroke agents prompt <slug> --message "…"
|
|
47
|
+
keystroke agents sessions list|get|cancel <slug> [<session-id>]
|
|
48
|
+
keystroke triggers disable|enable <slug> [--workflow <s> | --agent <s>]
|
|
49
|
+
keystroke triggers runs list|get <slug> [--workflow <s> | --agent <s>]
|
|
50
|
+
keystroke apps actions list|get <app> [<tool>]
|
|
51
|
+
keystroke apps execute <app> <tool> --input '{...}'
|
|
52
|
+
keystroke credentials create|get|rotate|delete <key>
|
|
53
|
+
```
|
|
54
|
+
|
|
20
55
|
### `auth`
|
|
21
56
|
|
|
22
57
|
Authenticate with Keystroke via Better Auth device flow. Config lives in `~/.keystroke`; bearer tokens live in the OS keychain.
|
|
@@ -68,9 +103,9 @@ keystroke --project <slug> project settings update --description "Notes" --defau
|
|
|
68
103
|
List triggers and resolve webhook URLs after deploy (requires `keystroke auth login`):
|
|
69
104
|
|
|
70
105
|
```bash
|
|
71
|
-
keystroke
|
|
72
|
-
keystroke
|
|
73
|
-
keystroke
|
|
106
|
+
keystroke triggers list
|
|
107
|
+
keystroke triggers get incoming-message
|
|
108
|
+
keystroke triggers url incoming-message
|
|
74
109
|
```
|
|
75
110
|
|
|
76
111
|
`url` prints a single line suitable for piping into curl or pasting into external webhook config.
|