@keystrokehq/cli 0.1.49 → 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.
@@ -17,7 +17,7 @@ The **keystroke platform** is the hosted control plane and the shared web worksp
17
17
  | Workflows | `src/workflows/` | `@keystrokehq/keystroke/workflow` |
18
18
  | Triggers | `src/triggers/` | `@keystrokehq/keystroke/trigger` |
19
19
  | Apps | `src/apps/` | `@keystrokehq/keystroke/app` |
20
- | Integrations | npm packages + catalog | `@keystrokehq/exa`, `@keystrokehq/slack`, … — discover with `exec_command` + `keystroke app search` |
20
+ | Integrations | npm packages + catalog | `@keystrokehq/exa`, `@keystrokehq/slack`, … — discover with `exec_command` + `keystroke apps search` |
21
21
  | Skills / files | `src/skills/`, `src/files/` | attached on `defineAgent` |
22
22
 
23
23
  Default-export each module — the server discovers files under `src/`.
@@ -66,7 +66,7 @@ Workflows also render as an interactive **canvas** in the platform. Keep durable
66
66
  - **Research real APIs before mirroring them** — building actions for custom integrations is very common; web search and fetch the actual reference & explore relevant docs, don't guess endpoints or payload shapes.
67
67
  - **Run before you claim you are finished** — deploy with `deploy_project`, run it in the cloud via `exec_command`, and read the real output before activating live triggers or claiming you are finished. Chat with agents and run workflows to confirm they behave correctly.
68
68
  - **Cover obvious edge cases** and write simple tests as needed (null field, empty array, a step that throws).
69
- - **Verify integration prerequisites** — before composing a catalog action into a workflow, run it once with `keystroke app execute` (via `exec_command`) to confirm the IDs and fields exist in the connected account.
69
+ - **Verify integration prerequisites** — before composing a catalog action into a workflow, run it once with `keystroke apps execute` (via `exec_command`) to confirm the IDs and fields exist in the connected account.
70
70
  - **Connected apps aren't in `.env`** — deploy never uploads `.env`; use the `connect_app` tool to get a link for the user to connect integrations in the web app (a browser cannot open in this workspace).
71
71
  - **Filtered deploys** — determine if you should do a full vs filtered deploy, or use WIP ignore directives (`search_docs "filtered deploy"`).
72
72
  - **Dependencies** — use the project's existing package manager (`package.json` `packageManager` field or lockfile); default to npm only on a freshly created project with no lockfile. Deploy uploads only the built `dist/` artifact — a lockfile is not part of what ships to the platform.
@@ -78,22 +78,22 @@ Use `exec_command` with the keystroke CLI — credentials are injected automatic
78
78
 
79
79
  ```bash
80
80
  # Workflows
81
- keystroke workflow list # list deployed workflows
82
- keystroke workflow run <workflow-key> --input '{}' # invoke a workflow
83
- keystroke workflow runs list <workflow-key> # recent runs for a workflow
84
- keystroke workflow runs get <workflow-key> <run-id> --include steps,trace # one run in full: input, each step, execution trace
81
+ keystroke workflows list # list deployed workflows
82
+ keystroke workflows run <workflow-key> --input '{}' # invoke a workflow
83
+ keystroke workflows runs list <workflow-key> # recent runs for a workflow
84
+ keystroke workflows runs get <workflow-key> <run-id> --include steps,trace # one run in full: input, each step, execution trace
85
85
 
86
86
  # Agents
87
- keystroke agent list # list deployed agents
88
- keystroke agent prompt <agent-key> --message "Hi" # send a message (add --session-id to continue a session)
89
- keystroke agent sessions list <agent-key> # recent sessions for an agent
90
- keystroke agent sessions get <agent-key> <session-id> --include messages,trace # one session in full: messages, execution trace
87
+ keystroke agents list # list deployed agents
88
+ keystroke agents prompt <agent-key> --message "Hi" # send a message (add --session-id to continue a session)
89
+ keystroke agents sessions list <agent-key> # recent sessions for an agent
90
+ keystroke agents sessions get <agent-key> <session-id> --include messages,trace # one session in full: messages, execution trace
91
91
 
92
92
  # Triggers (attachment id is <trigger-key>:<workflow-key>)
93
- keystroke trigger list # list deployed triggers
94
- keystroke trigger url <trigger-key> # print a trigger's webhook URL
95
- keystroke trigger runs list <trigger-key>:<workflow-key> # recent runs for a trigger→workflow attachment
96
- keystroke trigger runs get <trigger-key>:<workflow-key> <run-id> --include workflows,trace # one run in full: workflows fired, execution trace
93
+ keystroke triggers list # list deployed triggers
94
+ keystroke triggers url <trigger-key> # print a trigger's webhook URL
95
+ keystroke triggers runs list <trigger-key>:<workflow-key> # recent runs for a trigger→workflow attachment
96
+ keystroke triggers runs get <trigger-key>:<workflow-key> <run-id> --include workflows,trace # one run in full: workflows fired, execution trace
97
97
  ```
98
98
 
99
99
  Read `src/` first — existing agents, workflows, actions, and triggers are your best map of how this project works.
@@ -103,11 +103,11 @@ Read `src/` first — existing agents, workflows, actions, and triggers are your
103
103
  To discover apps/integrations and their actions, query the live catalog with the CLI via `exec_command` (the docs integration index is unreliable):
104
104
 
105
105
  ```bash
106
- keystroke app list # apps registered/connectable in your org
107
- keystroke app search <query> # find an app and its slug in the full catalog
108
- keystroke app actions <app> --search <q> # actions an app exposes
109
- keystroke app action <app> <tool> # schema + how to run/import one action
110
- keystroke app execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
106
+ keystroke apps list # apps registered/connectable in your org
107
+ keystroke apps search <query> # find an app and its slug in the full catalog
108
+ keystroke apps actions <app> --search <q> # actions an app exposes
109
+ keystroke apps action <app> <tool> # schema + how to run/import one action
110
+ keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
111
111
  keystroke credentials list # what's already connected — check before asking the user to connect
112
112
  ```
113
113
 
@@ -67,20 +67,20 @@ pnpm test # same — package.json scripts call the CLI
67
67
  Keystroke is deploy-first: build, ship, then run and inspect what's live. Deploy often.
68
68
 
69
69
  1. **Auth once** — `keystroke auth login` (token is stored and reused).
70
- 2. **Verify prerequisites** — `keystroke app execute <app> <tool> --input '{...}'` runs any connected catalog action against the cloud with no deploy and no server. Before wiring an integration into a workflow, execute it once for real: confirm the IDs, custom fields, and labels you're about to hard-code actually exist in the *connected* account. Schema inspection and hand-rolled dry-run flags prove nothing about the mutating path.
70
+ 2. **Verify prerequisites** — `keystroke apps execute <app> <tool> --input '{...}'` runs any connected catalog action against the cloud with no deploy and no server. Before wiring an integration into a workflow, execute it once for real: confirm the IDs, custom fields, and labels you're about to hard-code actually exist in the *connected* account. Schema inspection and hand-rolled dry-run flags prove nothing about the mutating path.
71
71
  3. **Edit** primitives under `src/`. Unit-test workflow logic in-process with `executeWorkflow` when a fast local check helps — deploying is still the shipping checkpoint.
72
72
  4. **Deploy** — `keystroke deploy` (full) or `keystroke deploy --filter agents/support` (one module). Deploy runs lint and typecheck first — attempt it directly; do not pre-run lint, typecheck, or build.
73
- 5. **Run** — `keystroke workflow run <slug> --input '{...}'` / `keystroke agent prompt <slug> --message "..."`.
73
+ 5. **Run** — `keystroke workflows run <slug> --input '{...}'` / `keystroke agents prompt <slug> --message "..."`.
74
74
  6. **Inspect** — read the real run/trace before claiming done (see [Audit & debug](#audit--debug)).
75
75
  7. Repeat.
76
76
 
77
77
  ```bash
78
78
  keystroke auth status # current user + org
79
- keystroke project list # your platform projects
79
+ keystroke projects list # your platform projects
80
80
  keystroke deploy # lint + typecheck + build + ship dist/ (first deploy must be full)
81
- keystroke workflow run greeting --input '{"name":"Ada"}' # run a workflow
82
- keystroke agent prompt hello --message "Hi" # prompt an agent
83
- keystroke app execute github github_get_the_authenticated_user # run a connected catalog action
81
+ keystroke workflows run greeting --input '{"name":"Ada"}' # run a workflow
82
+ keystroke agents prompt hello --message "Hi" # prompt an agent
83
+ keystroke apps execute github github_get_the_authenticated_user # run a connected catalog action
84
84
  ```
85
85
 
86
86
  New project: `keystroke init my-app --yes`, then deploy. Join an existing cloud project: `keystroke pull --project <slug>`.
@@ -216,7 +216,7 @@ export default defineWebhookSource({
216
216
 
217
217
  Filters live on the source; `transform` lives on the workflow attachment. Agents use `.attach({ agent, prompt })` (not `transform`). Attachment id: `{sourceSlug}:{targetSlug}`.
218
218
 
219
- **Deploy timing** — webhooks are passive and safe to deploy any time. A poll fires immediately on deploy; a cron waits for its next scheduled slot, then runs unattended. Until the workflow is verified, pause with `keystroke trigger attachment disable` — the disabled state survives redeploys.
219
+ **Deploy timing** — webhooks are passive and safe to deploy any time. A poll fires immediately on deploy; a cron waits for its next scheduled slot, then runs unattended. Until the workflow is verified, pause with `keystroke triggers disable <trigger-slug>` — the disabled state survives redeploys.
220
220
 
221
221
  ## Integrations & credentials
222
222
 
@@ -224,20 +224,20 @@ Keystroke has 1,000+ built-in integrations, and it's easy to build a custom one
224
224
 
225
225
  Discover apps and actions with the CLI — the docs integration index is **not** reliable for discovery:
226
226
 
227
- One `<app> <tool>` shape flows through discovery → inspect → run. `app action`/`app actions` print the next step (run, import, connect) after their output.
227
+ One `<app> <tool>` shape flows through discovery → inspect → run. `apps actions get` / `apps actions list` print the next step (run, import, connect) after their output.
228
228
 
229
229
  ```bash
230
- keystroke app list # all registered apps
231
- keystroke app search <query> # find an app + slug in the full catalog
232
- keystroke app actions <app> --search <q> # actions an app exposes
233
- keystroke app action <app> <tool> # schema + how to run/import one action
234
- keystroke app execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
230
+ keystroke apps list # all registered apps
231
+ keystroke apps search <query> # find an app + slug in the full catalog
232
+ keystroke apps actions list <app> --search <q> # actions an app exposes
233
+ keystroke apps actions get <app> <tool> # schema + how to run/import one action
234
+ keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
235
235
  keystroke credentials list # what's already connected — check before asking the user to connect
236
236
  keystroke connect <slug> # connect an app credential (opens web OAuth/api key flow for the user)
237
- keystroke credentials set <key> --set apiKey=@env:MY_KEY # static API key
237
+ keystroke credentials create <key> --set apiKey=@env:MY_KEY # static API key
238
238
  ```
239
239
 
240
- Check `keystroke credentials list` before telling the user to connect anything — the credential often already exists (each row shows the app and scope; `app action` output does *not* show connection status, so the list is the only reliable check).
240
+ Check `keystroke credentials list` before telling the user to connect anything — the credential often already exists (each row shows the app and scope; `apps actions get` output does *not* show connection status, so the list is the only reliable check).
241
241
 
242
242
  Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. There is no platform variable store and `keystroke deploy` **never uploads `.env`**, so a constant in source is the correct home, not a workaround. Missing a built-in integration? Use `defineCredential` + an action, `defineApp`, or `defineMcp`. See `/learn/credentials/custom-integrations`.
243
243
 
@@ -259,16 +259,16 @@ Both materialize into the agent's `/workspace/agent/...` environment before each
259
259
  Inspect deployed runs with `--include` to see full traces:
260
260
 
261
261
  ```bash
262
- keystroke workflow runs list <workflow-slug>
263
- keystroke workflow runs get <workflow-slug> <run-id> --include steps,trace
262
+ keystroke workflows runs list <workflow-slug>
263
+ keystroke workflows runs get <workflow-slug> <run-id> --include steps,trace
264
264
 
265
- keystroke agent sessions list <agent-slug>
266
- keystroke agent sessions get <agent-slug> <session-id> --include messages,trace
265
+ keystroke agents sessions list <agent-slug>
266
+ keystroke agents sessions get <agent-slug> <session-id> --include messages,trace
267
267
 
268
- keystroke trigger list
269
- keystroke trigger url <trigger-slug> # webhook URL (+ ?token= on platform)
270
- keystroke trigger runs get <trigger-slug>:<workflow-slug> <run-id> --include workflows,trace
271
- keystroke trigger attachment disable <trigger-slug> <trigger-slug>:<workflow-slug> # pause without redeploy (takes both the trigger slug and the attachment id)
268
+ keystroke triggers list
269
+ keystroke triggers url <trigger-slug> # webhook URL (+ ?token= on platform)
270
+ keystroke triggers runs get <trigger-slug> <run-id> --workflow <workflow-slug> --include workflows,trace
271
+ keystroke triggers disable <trigger-slug> # pause without redeploy; --workflow/--agent narrows to one attachment
272
272
 
273
273
  keystroke history list --kind workflow --status failed
274
274
  ```
@@ -280,10 +280,10 @@ Invoke/inspect commands print JSON to stdout (exit 0 on success, 1 on failure)
280
280
  - [ ] Deployed the change and read the real run output/trace — not just "it should work".
281
281
  - [ ] Prompted agents / ran workflows with realistic input and verified behavior.
282
282
  - [ ] Researched real APIs before mirroring them in custom integration actions — no guessed endpoints or payloads.
283
- - [ ] Executed each mutating integration action once via `keystroke app execute` before composing it — a passing dry-run flag doesn't count.
283
+ - [ ] Executed each mutating integration action once via `keystroke apps execute` before composing it — a passing dry-run flag doesn't count.
284
284
  - [ ] Covered obvious edge cases (null field, empty array, a step that throws) with a simple test where warranted.
285
285
  - [ ] Checked `keystroke credentials list` before connecting; connected any new apps with `keystroke connect` (not `.env`).
286
- - [ ] Tested manually before deploying attached cron/polling triggers, or used `trigger attachment disable` to pause until ready.
286
+ - [ ] Tested manually before deploying attached cron/polling triggers, or used `triggers disable` to pause until ready.
287
287
 
288
288
  ## Common gotchas
289
289
 
@@ -7,7 +7,7 @@ Lint, typecheck, and test configs live in the CLI; this project only adds the pa
7
7
  ```bash
8
8
  pnpm install
9
9
  keystroke auth login # once
10
- keystroke project link --project <slug> # keystroke project list
10
+ keystroke projects link --project <slug> # keystroke projects list
11
11
  keystroke deploy # lint + typecheck + build + ship dist/ (no pre-steps needed)
12
12
  ```
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/cli",
3
- "version": "0.1.49",
3
+ "version": "0.1.51",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/keystrokehq/keystroke.git",