@keystrokehq/cli 0.1.111 → 0.1.113

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.
@@ -118,17 +118,26 @@ To discover apps/integrations and their actions, query the live catalog with the
118
118
  ```bash
119
119
  keystroke apps search "{query}" # find an app and its slug in the full catalog — start here
120
120
  keystroke apps list # apps registered/connectable in your org
121
- keystroke apps actions list <app> --search <q> # actions an app exposes
122
- keystroke apps actions get <app> <tool> # schema + how to run/import one action
121
+ keystroke apps get <slug> # catalog toolkit OR custom org template (see kind)
122
+ keystroke apps actions list <app> --search <q> # catalog toolkit actions (custom org apps → kind:custom guidance)
123
+ keystroke apps actions get <app> <tool> # schema + how to run/import one catalog action
123
124
  keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
124
125
  keystroke credentials list # what's already connected — check before asking the user to connect
125
126
  ```
126
127
 
128
+ Custom org apps (`{org}/{name}`) do not have catalog toolkit actions — use `apps get` / `apps sync` / `defineApp(...).action(...)` instead.
129
+
127
130
  To connect an app's credentials, use the `connect_app` tool to get a link for the user — a browser cannot open in this workspace, so do not use `keystroke connect`. See `search_docs "use credentials"` for binding credentials to workflow steps and agent tools.
128
131
 
129
132
  Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. Keystroke projects don't use `.env`.
130
133
 
131
- If an integration or a required action isn't supported, it is *extremely* easy to build a custom oneconnections to any HTTP API or MCP server, including internal or private ones. Research the system's docs/spec first, then let `keystroke apps create --mcp|--openapi|--graphql <url>` scaffold it from the source, or hand-write it. `search_docs "custom integration"`.
134
+ If a **credentialed** integration isn't supported, build a proper custom appdo not invent standalone `defineCredential` + a lone action. Research the system's docs/spec first, then:
135
+
136
+ 1. Register a connectable org app with `keystroke apps create --mcp|--openapi|--graphql <url>` (or manual `--name` / `--description` / `--field`) when the user should enter secrets in the Apps UI — URL create is catalog registration, not only code scaffolding.
137
+ 2. Author with `defineApp` in `src/apps/` + `app.action(...)`.
138
+ 3. Have the user connect (`connect_app` link), then deploy.
139
+
140
+ Use `defineMcp` for MCP servers on agents. Credential-free project actions stay as plain `defineAction`. `search_docs "custom integration"`.
132
141
 
133
142
  ## Docs
134
143
 
@@ -253,15 +253,16 @@ run: async ({ state, setState }) => {
253
253
 
254
254
  Keystroke has 1,000+ built-in integrations, and it's easy to build a custom one for any HTTP API or MCP server (including private/internal). **Research first, then build:** search the catalog thoroughly before assuming an app is missing; for anything custom or unfamiliar, web-fetch/search the system's real docs — `llms.txt`, OpenAPI/GraphQL specs, API reference — before writing code. Never guess endpoints or payloads.
255
255
 
256
- Discover apps and actions with the CLI — the docs integration index is **not** reliable for discovery. 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.
256
+ Discover apps and actions with the CLI — the docs integration index is **not** reliable for discovery. One `<app> <tool>` shape flows through discovery → inspect → run for **catalog** apps; `apps actions get` / `apps actions list` print the next step after their output. Custom org apps (`{org}/{name}` from `apps create`) are different: `apps get` returns `kind:"custom"` (credential template); `apps actions list` returns guidance, not toolkit tools — actions live in project code via `defineApp(...).action(...)`.
257
257
 
258
258
  Think about testing as you build. Local tests don't link cloud credentials or the Keystroke client, so unit-test pure logic locally; for integrations, check needed apps/credentials and run each action once for real with `keystroke apps execute` (no deploy, no server) before wiring it into a workflow or agent — confirm the IDs, custom fields, and labels you're about to hard-code exist in the *connected* account. Schema inspection and dry-run flags prove nothing about the mutating path.
259
259
 
260
260
  ```bash
261
261
  keystroke apps list # all registered apps
262
262
  keystroke apps search "{query}" # find an app + slug in the full catalog
263
- keystroke apps actions list <app> --search <q> # actions an app exposes
264
- keystroke apps actions get <app> <tool> # schema + how to run/import one action
263
+ keystroke apps get <slug> # catalog toolkit OR custom credential template (kind)
264
+ keystroke apps actions list <app> --search <q> # catalog toolkit actions (custom kind:custom guidance)
265
+ keystroke apps actions get <app> <tool> # schema + how to run/import one catalog action
265
266
  keystroke apps execute <app> <tool> --input '{...}' # run a connected catalog action (no server)
266
267
  keystroke credentials list # what's already connected
267
268
  keystroke connect <slug> # connect an app credential (opens web OAuth/api key flow for the user)
@@ -270,7 +271,15 @@ keystroke credentials create <key> --set apiKey=@env:MY_KEY # static API key
270
271
 
271
272
  `keystroke credentials list` is the **only** reliable connection check (`apps actions get` doesn't show status) — check it before connecting anything; the credential often already exists.
272
273
 
273
- Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. Keystroke projects don't use `.env`. Missing a built-in integration? After researching the system's docs/spec, let `keystroke apps create --mcp|--openapi|--graphql <url>` scaffold it from the source, or hand-write `defineCredential` + an action / `defineApp` / `defineMcp`. See `/learn/credentials/custom-integrations`.
274
+ Credentials are for secrets. Non-secret config — spreadsheet IDs, channel names, base URLs — belongs in code as a literal constant or a workflow input. Keystroke projects don't use `.env`.
275
+
276
+ Missing a built-in **credentialed** integration? After researching the system's docs/spec:
277
+
278
+ 1. **Catalog registration** (when the user should connect via Apps / `connect`) — `keystroke apps create --mcp|--openapi|--graphql <url>`, or manual `apps create --name … --description … --field …`. URL-based create registers a connectable org app; it is not only local code scaffolding.
279
+ 2. **Code authoring** — always `defineApp` in `src/apps/` + `app.action(...)`. Do **not** invent `src/credentials/foo.ts` + a lone `defineAction` for a new API.
280
+ 3. **Connect** — `keystroke connect <slug>` (or `credentials create` when you already have the secret), then deploy.
281
+
282
+ Use `defineMcp` for MCP servers attached to agents. Plain `defineAction` (no credentials) does not need an app. See `/learn/credentials/custom-integrations`.
274
283
 
275
284
  ## Skills & files
276
285
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keystrokehq/cli",
3
- "version": "0.1.111",
3
+ "version": "0.1.113",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/keystrokehq/keystroke.git",
@@ -43,9 +43,9 @@
43
43
  "tsdown": "^0.22.0",
44
44
  "tsx": "^4.22.3",
45
45
  "@keystrokehq/oxlint-config": "0.0.4",
46
+ "@keystrokehq/tsconfig": "0.0.3",
46
47
  "@keystrokehq/tsdown-config": "0.0.5",
47
- "@keystrokehq/vitest-config": "0.0.7",
48
- "@keystrokehq/tsconfig": "0.0.3"
48
+ "@keystrokehq/vitest-config": "0.0.7"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsdown && node scripts/copy-templates.mjs && node scripts/copy-skills-bundle.mjs && node scripts/copy-configs.mjs",