@cursor/july 0.1.5 → 0.1.7
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/dist/ab.d.ts +8 -95
- package/dist/ab.d.ts.map +1 -1
- package/dist/ab.js +9 -150
- package/dist/bin/agent-serve.js +41 -8
- package/dist/channels/slack/post-update-delivery.d.ts +85 -0
- package/dist/channels/slack/post-update-delivery.d.ts.map +1 -0
- package/dist/docs/404.html +2 -2
- package/dist/docs/ab.html +4 -4
- package/dist/docs/assets/{app.DabPG-io.js → app.COTN7wgo.js} +1 -1
- package/dist/docs/assets/chunks/@localSearchIndexroot.B7UcKvIn.js +1 -0
- package/dist/docs/assets/chunks/{VPLocalSearchBox.jmyr0bU0.js → VPLocalSearchBox.BW3TBdT0.js} +1 -1
- package/dist/docs/assets/chunks/{theme.DysN9-VN.js → theme.BEJW0vE7.js} +2 -2
- package/dist/docs/assets/deployment.md.BtfEsc9S.js +55 -0
- package/dist/docs/assets/deployment.md.BtfEsc9S.lean.js +1 -0
- package/dist/docs/assets/example-agents_approval-buddy.md.8R5phXb5.js +10 -0
- package/dist/docs/assets/example-agents_approval-buddy.md.8R5phXb5.lean.js +1 -0
- package/dist/docs/assets/example-agents_benny.md.B0gjhI-p.js +7 -0
- package/dist/docs/assets/example-agents_benny.md.B0gjhI-p.lean.js +1 -0
- package/dist/docs/assets/example-agents_bugbot.md.DelIdhxB.js +11 -0
- package/dist/docs/assets/example-agents_bugbot.md.DelIdhxB.lean.js +1 -0
- package/dist/docs/assets/example-agents_codebase-wiki.md.DC6sgwn0.js +8 -0
- package/dist/docs/assets/example-agents_codebase-wiki.md.DC6sgwn0.lean.js +1 -0
- package/dist/docs/assets/example-agents_codeowners-review.md.Ku_tG2RY.js +8 -0
- package/dist/docs/assets/example-agents_codeowners-review.md.Ku_tG2RY.lean.js +1 -0
- package/dist/docs/assets/example-agents_concierge.md.4rQTSMXt.js +23 -0
- package/dist/docs/assets/example-agents_concierge.md.4rQTSMXt.lean.js +1 -0
- package/dist/docs/assets/example-agents_fsd.md.CzgUrDfi.js +15 -0
- package/dist/docs/assets/example-agents_fsd.md.CzgUrDfi.lean.js +1 -0
- package/dist/docs/assets/example-agents_index.md.CRqJlnIf.js +2 -0
- package/dist/docs/assets/example-agents_index.md.CRqJlnIf.lean.js +1 -0
- package/dist/docs/assets/example-agents_knowledge-base.md.BPJiVueF.js +11 -0
- package/dist/docs/assets/example-agents_knowledge-base.md.BPJiVueF.lean.js +1 -0
- package/dist/docs/assets/example-agents_security-reviewer.md.D2rtwDTO.js +19 -0
- package/dist/docs/assets/example-agents_security-reviewer.md.D2rtwDTO.lean.js +1 -0
- package/dist/docs/assets/example-agents_slack-agent.md.buLbgvBf.js +5 -0
- package/dist/docs/assets/example-agents_slack-agent.md.buLbgvBf.lean.js +1 -0
- package/dist/docs/assets/example-agents_weather-agent.md.C9Qv-W0o.js +24 -0
- package/dist/docs/assets/example-agents_weather-agent.md.C9Qv-W0o.lean.js +1 -0
- package/dist/docs/assets/index.md.COiu-1jL.js +20 -0
- package/dist/docs/assets/{index.md.Cylk70gg.lean.js → index.md.COiu-1jL.lean.js} +1 -1
- package/dist/docs/assets/reference_cli.md.D189RBCH.js +60 -0
- package/dist/docs/assets/reference_cli.md.D189RBCH.lean.js +1 -0
- package/dist/docs/building-with-agents.html +4 -4
- package/dist/docs/concepts.html +4 -4
- package/dist/docs/deployment.html +58 -17
- package/dist/docs/evals.html +4 -4
- package/dist/docs/example-agents/approval-buddy.html +34 -0
- package/dist/docs/example-agents/benny.html +31 -0
- package/dist/docs/example-agents/bugbot.html +35 -0
- package/dist/docs/example-agents/codebase-wiki.html +32 -0
- package/dist/docs/example-agents/codeowners-review.html +32 -0
- package/dist/docs/example-agents/concierge.html +47 -0
- package/dist/docs/example-agents/fsd.html +39 -0
- package/dist/docs/example-agents/index.html +26 -0
- package/dist/docs/example-agents/knowledge-base.html +35 -0
- package/dist/docs/example-agents/security-reviewer.html +43 -0
- package/dist/docs/example-agents/slack-agent.html +29 -0
- package/dist/docs/example-agents/weather-agent.html +48 -0
- package/dist/docs/guides/agent-to-agent.html +4 -4
- package/dist/docs/guides/cloud-runtime.html +5 -5
- package/dist/docs/guides/github.html +4 -4
- package/dist/docs/guides/human-in-the-loop.html +4 -4
- package/dist/docs/guides/slack.html +4 -4
- package/dist/docs/guides/webhooks.html +4 -4
- package/dist/docs/hashmap.json +1 -1
- package/dist/docs/hillclimbing.html +4 -4
- package/dist/docs/index.html +7 -7
- package/dist/docs/quickstart.html +4 -4
- package/dist/docs/reference/agent-config.html +4 -4
- package/dist/docs/reference/channels.html +4 -4
- package/dist/docs/reference/cli.html +52 -30
- package/dist/docs/reference/connections.html +4 -4
- package/dist/docs/reference/hooks.html +4 -4
- package/dist/docs/reference/http-api.html +4 -4
- package/dist/docs/reference/instructions.html +4 -4
- package/dist/docs/reference/playground.html +4 -4
- package/dist/docs/reference/project-layout.html +4 -4
- package/dist/docs/reference/schedules.html +4 -4
- package/dist/docs/reference/sessions.html +4 -4
- package/dist/docs/reference/skills.html +4 -4
- package/dist/docs/reference/subagents.html +4 -4
- package/dist/docs/reference/tools.html +4 -4
- package/dist/docs/scaffolding-agents.html +4 -4
- package/dist/docs/storage.html +4 -4
- package/dist/docs/troubleshooting.html +4 -4
- package/dist/evals.d.ts +5 -62
- package/dist/evals.d.ts.map +1 -1
- package/dist/evals.js +3 -66
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/internal/ab-collector.d.ts +7 -5
- package/dist/internal/ab-collector.d.ts.map +1 -1
- package/dist/internal/ab-collector.js +3 -14
- package/dist/internal/ab-snapshot.d.ts +2 -4
- package/dist/internal/ab-snapshot.d.ts.map +1 -1
- package/dist/internal/cli-ax.d.ts +33 -5
- package/dist/internal/cli-ax.d.ts.map +1 -1
- package/dist/internal/cli-ax.js +428 -87
- package/dist/internal/cli-deploy.js +1 -1
- package/dist/internal/discovery.js +3 -3
- package/dist/internal/eval-run-store.d.ts +35 -30
- package/dist/internal/eval-run-store.d.ts.map +1 -1
- package/dist/internal/eval-run-store.js +88 -100
- package/dist/internal/evals-client.d.ts +96 -0
- package/dist/internal/evals-client.d.ts.map +1 -0
- package/dist/internal/evals-client.js +262 -0
- package/dist/internal/init-project.d.ts.map +1 -1
- package/dist/internal/init-project.js +1 -0
- package/dist/internal/persistence-coordinator.d.ts +127 -0
- package/dist/internal/persistence-coordinator.d.ts.map +1 -0
- package/dist/internal/playground-proxy.d.ts +5 -5
- package/dist/internal/playground-proxy.js +3 -3
- package/dist/internal/resolve-prod-target.d.ts +30 -0
- package/dist/internal/resolve-prod-target.d.ts.map +1 -1
- package/dist/internal/resolve-prod-target.js +74 -2
- package/dist/internal/server.d.ts.map +1 -1
- package/dist/internal/server.js +16 -5
- package/dist/internal/session-engine.d.ts +1 -2
- package/dist/internal/session-engine.d.ts.map +1 -1
- package/dist/internal/session-engine.js +14 -31
- package/dist/internal/storage-coordinator.d.ts +16 -15
- package/dist/internal/storage-coordinator.d.ts.map +1 -1
- package/dist/internal/storage-coordinator.js +73 -80
- package/dist/persistence.d.ts +184 -0
- package/dist/persistence.d.ts.map +1 -0
- package/dist/playground/assets/cursor-icons-16-CQ50JpfO.woff2 +0 -0
- package/dist/playground/assets/index-72vCOBWO.js +86 -0
- package/dist/playground/assets/index-BjnMwYoR.css +1 -0
- package/dist/playground/index.html +2 -2
- package/dist/storage.d.ts +51 -10
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +27 -10
- package/docs/README.md +34 -5
- package/docs/deployment.md +352 -149
- package/docs/example-agents/approval-buddy.md +270 -0
- package/docs/example-agents/benny.md +186 -0
- package/docs/example-agents/bugbot.md +231 -0
- package/docs/example-agents/codebase-wiki.md +174 -0
- package/docs/example-agents/codeowners-review.md +195 -0
- package/docs/example-agents/concierge.md +205 -0
- package/docs/example-agents/fsd.md +330 -0
- package/docs/example-agents/index.md +102 -0
- package/docs/example-agents/knowledge-base.md +171 -0
- package/docs/example-agents/security-reviewer.md +296 -0
- package/docs/example-agents/slack-agent.md +146 -0
- package/docs/example-agents/weather-agent.md +302 -0
- package/docs/reference/cli.md +546 -147
- package/package.json +1 -1
- package/src/ab.ts +9 -261
- package/src/bin/agent-serve.ts +46 -7
- package/src/evals.ts +5 -119
- package/src/index.ts +2 -0
- package/src/internal/ab-collector.ts +12 -22
- package/src/internal/ab-snapshot.ts +2 -4
- package/src/internal/cli-ax.ts +551 -104
- package/src/internal/cli-deploy.ts +1 -1
- package/src/internal/discovery.ts +2 -2
- package/src/internal/eval-run-store.ts +91 -100
- package/src/internal/evals-client.ts +431 -0
- package/src/internal/init-project.ts +1 -0
- package/src/internal/playground-proxy.ts +5 -5
- package/src/internal/resolve-prod-target.ts +101 -3
- package/src/internal/server.ts +17 -3
- package/src/internal/session-engine.ts +9 -29
- package/src/internal/storage-coordinator.ts +109 -101
- package/src/storage.ts +79 -14
- package/dist/docs/assets/chunks/@localSearchIndexroot.QwK5BtEH.js +0 -1
- package/dist/docs/assets/deployment.md.DTKwE15Z.js +0 -14
- package/dist/docs/assets/deployment.md.DTKwE15Z.lean.js +0 -1
- package/dist/docs/assets/index.md.Cylk70gg.js +0 -20
- package/dist/docs/assets/reference_cli.md.Bv6pOxcF.js +0 -38
- package/dist/docs/assets/reference_cli.md.Bv6pOxcF.lean.js +0 -1
- package/dist/internal/json-dir-store.js +0 -100
- package/dist/playground/assets/cursor-icons-outline-BxTT_FVJ.woff2 +0 -0
- package/dist/playground/assets/index-BEauYlII.css +0 -1
- package/dist/playground/assets/index-BtM0wEGg.js +0 -319
- package/src/internal/json-dir-store.ts +0 -109
package/docs/reference/cli.md
CHANGED
|
@@ -1,68 +1,123 @@
|
|
|
1
1
|
---
|
|
2
2
|
title: "CLI"
|
|
3
|
-
description: "
|
|
3
|
+
description: "Commands and common flags for local development, running servers, and Cursor-managed hosting."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# CLI reference
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
| [`
|
|
23
|
-
| [`
|
|
24
|
-
| [`
|
|
25
|
-
| [`
|
|
26
|
-
| [`
|
|
27
|
-
| [`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
8
|
+
`@cursor/july` installs `agentkit` and the legacy `agent-serve` alias.
|
|
9
|
+
The examples on this page use `agentkit`. Run the CLI with Node 22.13
|
|
10
|
+
or newer. Don't run it with Bun; Bun corrupts tool-result streams from
|
|
11
|
+
the Cursor SDK.
|
|
12
|
+
|
|
13
|
+
The current release still uses `.agent-serve` for on-disk state. See the
|
|
14
|
+
[rename table](../README.md#run-the-cli) for identifiers still moving to
|
|
15
|
+
agentkit names.
|
|
16
|
+
|
|
17
|
+
`agentkit help` prints the built-in summary. The Slack and GitHub packs
|
|
18
|
+
also provide `agentkit slack help` and `agentkit github help`.
|
|
19
|
+
|
|
20
|
+
| Command | Description |
|
|
21
|
+
| ------------------------------------------------------- | -------------------------------------------------------------- |
|
|
22
|
+
| [`serve`](#serve) | Serve agents over HTTP |
|
|
23
|
+
| [`dev`](#dev) | Start local development with `serve --dev` |
|
|
24
|
+
| [`chat`](#chat) | Talk to a running agent |
|
|
25
|
+
| [`resume`](#resume) | Reattach chat to a previous session |
|
|
26
|
+
| [`logs`](#logs) | Follow local or hosted logs |
|
|
27
|
+
| [`sessions`](#sessions) | List sessions on a running agent |
|
|
28
|
+
| [`session`](#session) | Inspect one session |
|
|
29
|
+
| [`playground`](#playground) | Open the local or hosted playground |
|
|
30
|
+
| [`run`](#run) | Run one or more turns locally, remotely, or on a hosted agent |
|
|
31
|
+
| [`call`](#call) | Call a server tool without a model turn |
|
|
32
|
+
| [`eval`](#eval) | Run filesystem evals |
|
|
33
|
+
| [`trajectory`](#trajectory) | Summarize a saved `events.ndjson` file |
|
|
34
|
+
| [`init`](#init) | Scaffold a project, or print the setup guide |
|
|
35
|
+
| [`info`](#info) | Print the discovered agent surface |
|
|
36
|
+
| [`validate`](#validate) | Check a project and fail on errors |
|
|
37
|
+
| [`login` / `logout` / `whoami`](#login--logout--whoami) | Manage the host's Cursor credential |
|
|
38
|
+
| [`update`](#update) | Upgrade the installed CLI |
|
|
39
|
+
| [`deploy`](#deploy) | Deploy one or more agents to Cursor managed hosting |
|
|
40
|
+
| [`deployments`](#deployments) | List hosted deployments |
|
|
41
|
+
| [`deployment`](#deployment) | Inspect one hosted deployment |
|
|
42
|
+
| [`stop`](#stop) | Stop a hosted deployment |
|
|
43
|
+
| [`rotate-token`](#rotate-token) | Replace a deployment's alias token |
|
|
44
|
+
| [`rotate-pod-credential`](#rotate-pod-credential) | Replace a deployment's pod credential |
|
|
45
|
+
| [`secrets`](#secrets) | Manage deployment secrets |
|
|
46
|
+
| [`slack ...`](#slack) | Set up and check Slack channels |
|
|
47
|
+
| [`github ...`](#github) | Forward, replay, and inspect GitHub webhook channels |
|
|
48
|
+
|
|
49
|
+
## Choose a target
|
|
50
|
+
|
|
51
|
+
Request-sending commands support three target types.
|
|
52
|
+
|
|
53
|
+
| Target | How to select it | Commands |
|
|
54
|
+
| --- | --- | --- |
|
|
55
|
+
| Ephemeral local server | Omit `--url` and `--prod` | `run`, `call`, `eval` |
|
|
56
|
+
| Running server | Pass `--url <baseUrl>`, unless the command uses the localhost default described next | `chat`, `resume`, `logs`, `sessions`, `session`, `playground`, `run`, `call`, `eval` |
|
|
57
|
+
| Cursor managed hosting | Pass `--prod` | `chat`, `resume`, `logs`, `sessions`, `session`, `playground`, `run`, `call`, `eval` |
|
|
58
|
+
|
|
59
|
+
`chat`, `logs`, `sessions`, `session`, and `playground` default to
|
|
60
|
+
`http://127.0.0.1:3000`. A `--url` must include the agent slug for a
|
|
61
|
+
multi-agent server, such as `http://127.0.0.1:3000/pr-approver`.
|
|
62
|
+
`--slug` doesn't change an explicit URL.
|
|
63
|
+
|
|
64
|
+
With `--prod`, `--slug` selects the deployment and `--team` selects the
|
|
65
|
+
Cursor team. The slug defaults to the `--dir` basename. The team
|
|
66
|
+
defaults to the signed-in account's team. `--url` and `--prod` are
|
|
67
|
+
mutually exclusive.
|
|
68
|
+
|
|
69
|
+
Use `--bearer-token <token>` when a running server requires bearer
|
|
70
|
+
authentication. Hosted commands use your Cursor credential to request
|
|
71
|
+
short-lived engine access. `--api-key` overrides the Cursor credential
|
|
72
|
+
for `login`, `serve`, hosted targets, and managed-hosting commands.
|
|
73
|
+
`--state-root` applies to `serve` and ephemeral `run`, `call`, and
|
|
74
|
+
`eval` servers. Running and hosted targets ignore it.
|
|
75
|
+
|
|
76
|
+
For ephemeral `run`, `call`, and `eval` commands, omitting `--slug`
|
|
77
|
+
selects an unslugged root mount when one exists. Otherwise, agentkit
|
|
78
|
+
selects the first discovered agent.
|
|
35
79
|
|
|
36
80
|
## serve
|
|
37
81
|
|
|
38
|
-
`serve` hosts every agent under
|
|
82
|
+
`serve` hosts every agent under `--dir` in multi-agent mode by default.
|
|
39
83
|
|
|
40
84
|
```bash
|
|
41
85
|
agentkit serve [--dir <path>] [--port 3000] [--host 127.0.0.1] [--dev]
|
|
42
86
|
[--mode multi|single] [--api-key <key>]
|
|
43
87
|
[--state-root <path>] [--bearer-token <secret> | --allow-anonymous]
|
|
88
|
+
[--allow-anonymous-cursor-github]
|
|
44
89
|
[--public-url <url>] [--no-schedules] [--no-playground]
|
|
45
|
-
[--no-docs] [--cursor-events --repo owner/name]
|
|
90
|
+
[--no-docs] [--cursor-events --repo owner/name]...
|
|
46
91
|
```
|
|
47
92
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
`/<slug>/playground`. On a TTY, press Enter to
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
| `--
|
|
59
|
-
| `--
|
|
60
|
-
| `--
|
|
61
|
-
| `--
|
|
62
|
-
| `--
|
|
63
|
-
| `--
|
|
64
|
-
| `--
|
|
65
|
-
| `--
|
|
93
|
+
If `--dir` is an agent project, it mounts under its directory name. If
|
|
94
|
+
it contains agent projects, each child mounts separately. The index
|
|
95
|
+
lives at `/`. Each agent is available at `/<slug>/v1/*` and
|
|
96
|
+
`/<slug>/playground`. On a TTY, press Enter to reload agent code.
|
|
97
|
+
Unless `--state-root` is set, each mount uses
|
|
98
|
+
`<agent-project>/.agent-serve`; slugged mounts use
|
|
99
|
+
`<agent-project>/.agent-serve/<slug>`.
|
|
100
|
+
|
|
101
|
+
| Flag | Meaning |
|
|
102
|
+
| --- | --- |
|
|
103
|
+
| `--port` | Listen on this port. `0` selects an available port. The default is `3000`. |
|
|
104
|
+
| `--host` | Bind this host. The default is loopback-only `127.0.0.1`. |
|
|
105
|
+
| `--dev` | Disable automatic schedule and reminder firing, admit unsigned loopback GitHub deliveries, widen playground session access on loopback, and start Vite HMR when available. |
|
|
106
|
+
| `--mode` | Use `multi` for slugged routes and an index, or `single` for one agent at the unslugged `/v1/*`. The default is `multi`. |
|
|
107
|
+
| `--api-key` | Use this Cursor API key. The command falls back to `CURSOR_API_KEY`, then the stored login. |
|
|
108
|
+
| `--state-root` | Store sessions, streams, workspaces, and channel state here. Keep durable production state outside the agent repository. |
|
|
109
|
+
| `--bearer-token` | Require this bearer token on routes without authored auth. Mutually exclusive with `--allow-anonymous`. |
|
|
110
|
+
| `--allow-anonymous` | Admit every caller as one `anonymous` principal. Use only behind a trusted network boundary. |
|
|
111
|
+
| `--allow-anonymous-cursor-github` | Allow anonymous callers to drive sessions holding a Cursor account's repo-scoped GitHub credential. Use only behind an authenticating proxy. |
|
|
112
|
+
| `--public-url` | Set the externally reachable host URL. Cloud-runtime peer connections need it to call back into this server. |
|
|
113
|
+
| `--no-schedules` | Disable the cron runner outside dev mode. |
|
|
114
|
+
| `--no-playground` | Skip the web playground and its build or HMR process. |
|
|
115
|
+
| `--no-docs` | Skip the documentation site at `/docs` and its build. |
|
|
116
|
+
| `--cursor-events` | Pull SCM events from Cursor's `/v0/scm-events` in addition to authored webhook routes. Requires a signed-in host. Pass repeatable `--repo owner/name` values; repos declared by `githubChannel({ cursorAccount })` also enable the relay. State lives under `<state-root>/cursor-events/`. |
|
|
117
|
+
|
|
118
|
+
Multi-agent slugs must start with a letter or digit, then contain only
|
|
119
|
+
letters, digits, `_`, or `-`. The reserved slugs are `v1`, `playground`,
|
|
120
|
+
and `docs`.
|
|
66
121
|
|
|
67
122
|
## dev
|
|
68
123
|
|
|
@@ -75,69 +130,154 @@ agentkit dev ./pr-approver
|
|
|
75
130
|
agentkit dev ./pr-approver --port 3000
|
|
76
131
|
```
|
|
77
132
|
|
|
78
|
-
|
|
133
|
+
`dev` accepts the same flags as [`serve`](#serve). You can use `--dir`
|
|
134
|
+
instead of the positional path.
|
|
79
135
|
Dev mode is always on: schedules and reminders wait for manual dispatch,
|
|
80
136
|
GitHub accepts unsigned loopback deliveries, and Vite HMR starts when
|
|
81
137
|
the toolchain is present. Prefer this over `serve --dev` while
|
|
82
|
-
iterating.
|
|
138
|
+
iterating. Pass at most one positional path. Don't combine a positional
|
|
139
|
+
path with a different `--dir`.
|
|
83
140
|
|
|
84
141
|
## chat
|
|
85
142
|
|
|
86
|
-
`chat` talks to a running
|
|
143
|
+
`chat` talks to a running agent from the terminal. It never starts a
|
|
144
|
+
server.
|
|
87
145
|
|
|
88
146
|
```bash
|
|
89
|
-
agentkit chat --url http://127.0.0.1:3000
|
|
90
|
-
agentkit chat --
|
|
91
|
-
agentkit chat --
|
|
92
|
-
agentkit chat --
|
|
147
|
+
agentkit chat --url http://127.0.0.1:3000/pr-approver
|
|
148
|
+
agentkit chat --message "Is the PR ready to approve?"
|
|
149
|
+
agentkit chat --message "Inspect PR 42" --json
|
|
150
|
+
agentkit chat --prod --slug pr-approver --team 123
|
|
93
151
|
```
|
|
94
152
|
|
|
95
|
-
|
|
96
|
-
|
|
153
|
+
`chat` streams text, tool calls, and a per-turn usage footer.
|
|
154
|
+
On a TTY, `--message` seeds the interactive REPL. With non-TTY input,
|
|
155
|
+
`--message` runs one turn and exits; without it, `chat` reads
|
|
156
|
+
newline-delimited messages until EOF. `--json` requires `--message`,
|
|
157
|
+
runs one turn, and prints
|
|
97
158
|
`{ ok, sessionId, continuationToken, trajectory }`. `--text` prints a
|
|
98
|
-
compact
|
|
159
|
+
compact trajectory when combined with `--json`. `--no-color` forces
|
|
160
|
+
plain interactive output.
|
|
161
|
+
|
|
162
|
+
Use `--session <id>` to reattach a stored session. The command looks up
|
|
163
|
+
its continuation token when you omit `--continuation-token`. Use
|
|
164
|
+
`--resume` to select the most recently updated session with a
|
|
165
|
+
continuation token.
|
|
99
166
|
|
|
100
167
|
## resume
|
|
101
168
|
|
|
102
|
-
`resume`
|
|
169
|
+
`resume` is the direct way to reattach the chat REPL.
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
agentkit resume ses_123 --url http://127.0.0.1:3000/pr-approver
|
|
173
|
+
agentkit resume --url http://127.0.0.1:3000/pr-approver
|
|
174
|
+
agentkit resume ses_123 --prod --team 123 --slug pr-approver
|
|
175
|
+
agentkit resume ses_123 --message "Continue the review" --json
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Pass a session ID to select it. Omit the ID to select the most recently
|
|
179
|
+
updated followable session from `/v1/sessions`. The command looks up a
|
|
180
|
+
missing continuation token, replays the transcript, and accepts
|
|
181
|
+
follow-ups. `resume --json` requires `--message`. The same operation is
|
|
182
|
+
available as `chat --session <id>` or `chat --resume`.
|
|
183
|
+
|
|
184
|
+
## logs
|
|
185
|
+
|
|
186
|
+
`logs` follows the local or hosted log buffer.
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
agentkit logs [--url http://127.0.0.1:3000] [--once] [--json]
|
|
190
|
+
agentkit logs --prod [--slug <slug>] [--team <id>] [--once] [--json]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Local mode reads `/v1/logs` from the running server. Hosted mode reports
|
|
194
|
+
deploy progress until the deployment is running or degraded, then
|
|
195
|
+
follows reachable runtime logs.
|
|
196
|
+
The command follows until Ctrl-C by default. `--once` prints the current
|
|
197
|
+
buffer and exits. `--json` emits newline-delimited JSON events.
|
|
198
|
+
|
|
199
|
+
## sessions
|
|
200
|
+
|
|
201
|
+
`sessions` lists sessions on a running or hosted agent.
|
|
103
202
|
|
|
104
203
|
```bash
|
|
105
|
-
agentkit
|
|
106
|
-
|
|
107
|
-
agentkit resume ses_… --prod --message "continue from here"
|
|
204
|
+
agentkit sessions [--url <baseUrl> | --prod] [--slug <slug>]
|
|
205
|
+
[--team <id>] [--bearer-token <token>] [--json]
|
|
108
206
|
```
|
|
109
207
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
208
|
+
Text output shows session ID, channel, mode, turn count, running status,
|
|
209
|
+
and update time. `--json` prints full session summaries in
|
|
210
|
+
`{ sessions }`, including continuation tokens.
|
|
211
|
+
|
|
212
|
+
## session
|
|
213
|
+
|
|
214
|
+
`session` inspects the event stream for one session.
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
agentkit session <sessionId> [--url <baseUrl> | --prod]
|
|
218
|
+
[--slug <slug>] [--team <id>]
|
|
219
|
+
[--json | --text | --events]
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
By default, `session` prints a compact trajectory. `--text` selects the
|
|
223
|
+
same format. `--json` prints the trajectory object. `--events` prints
|
|
224
|
+
`{ sessionId, events }` with the raw event list. You can't combine
|
|
225
|
+
`--events` and `--json`. Use
|
|
226
|
+
[`resume`](#resume) to continue the conversation.
|
|
227
|
+
|
|
228
|
+
## playground
|
|
229
|
+
|
|
230
|
+
`playground` opens an agent's web playground.
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
agentkit playground [--url <baseUrl> | --prod] [--session <id>]
|
|
234
|
+
[--slug <slug>] [--team <id>]
|
|
235
|
+
[--bearer-token <token>] [--print]
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
`--session` opens a deep link to one session. `--print` prints the URL
|
|
239
|
+
without opening a browser.
|
|
240
|
+
|
|
241
|
+
For an unauthenticated local URL, `playground` opens the browser and
|
|
242
|
+
exits. `--prod` and `--bearer-token` start a loopback proxy to inject
|
|
243
|
+
browser-inaccessible credentials. The proxy stays open until Ctrl-C,
|
|
244
|
+
including when you pass `--print`.
|
|
114
245
|
|
|
115
246
|
## run
|
|
116
247
|
|
|
117
|
-
`run`
|
|
248
|
+
`run` sends one or more turns and prints a JSON result.
|
|
118
249
|
|
|
119
250
|
```bash
|
|
120
251
|
agentkit run --dir . --message "Is https://github.com/acme/checkout/pull/42 ready?"
|
|
121
|
-
agentkit run --dir . --message "
|
|
122
|
-
agentkit run --url http://127.0.0.1:3000
|
|
123
|
-
agentkit run --
|
|
252
|
+
agentkit run --dir . --message "Inspect PR 42" --message "Summarize the risks"
|
|
253
|
+
agentkit run --url http://127.0.0.1:3000/pr-approver --message "Inspect PR 42"
|
|
254
|
+
agentkit run --prod --slug pr-approver --team 123 --message "Inspect PR 42"
|
|
255
|
+
agentkit run --dir . --messages-file ./prompts.json
|
|
124
256
|
```
|
|
125
257
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
|
133
|
-
|
|
|
134
|
-
| `--
|
|
135
|
-
| `--session
|
|
136
|
-
| `--
|
|
137
|
-
| `--
|
|
138
|
-
| `--
|
|
139
|
-
| `--
|
|
140
|
-
| `--
|
|
258
|
+
Without `--url` or `--prod`, the command starts an ephemeral server on
|
|
259
|
+
an available port. Its state root is a temporary directory outside the
|
|
260
|
+
project unless you pass `--state-root`. The command closes the server
|
|
261
|
+
after the turns finish.
|
|
262
|
+
|
|
263
|
+
| Flag | Meaning |
|
|
264
|
+
| --- | --- |
|
|
265
|
+
| `--message <text>` | Send a user message. Repeat the flag for a multi-turn run. |
|
|
266
|
+
| `--messages-file <path>` | Read a JSON array of strings. File messages run before repeated `--message` values. |
|
|
267
|
+
| `--session <id>` | Follow up an existing session. Unlike `chat`, `run` doesn't look up a missing continuation token. |
|
|
268
|
+
| `--continuation-token <token>` | Continue the existing session selected by `--session`. |
|
|
269
|
+
| `--events <file>` | Write the raw NDJSON event stream to this path. |
|
|
270
|
+
| `--no-events` | Don't write an event stream. |
|
|
271
|
+
| `--text` | Print a compact trajectory instead of the JSON result. |
|
|
272
|
+
| `--timeout-ms <n>` | Abort the turn after a positive number of milliseconds. There is no default timeout. |
|
|
273
|
+
| `--no-stream` | Hide live tool and reply progress on stderr. Progress is on by default when stderr is a TTY. |
|
|
274
|
+
| `--slug <slug>` | Pick one agent when local discovery mounts several agents. With `--prod`, select the hosted deployment. |
|
|
275
|
+
|
|
276
|
+
The default trace path is
|
|
277
|
+
`<dir>/.agent-serve/traces/<sessionId>.ndjson`. JSON output contains
|
|
278
|
+
`ok`, `sessionId`, `continuationToken`, `trace`, `playgroundUrl`,
|
|
279
|
+
`playgroundHint`, `visualize`, and `trajectory`. The command exits
|
|
280
|
+
non-zero when the trajectory fails.
|
|
141
281
|
|
|
142
282
|
## call
|
|
143
283
|
|
|
@@ -146,14 +286,24 @@ stderr on a TTY.
|
|
|
146
286
|
```bash
|
|
147
287
|
agentkit call inspect_pr --dir . \
|
|
148
288
|
--input '{"prUrl":"https://github.com/acme/checkout/pull/42"}'
|
|
149
|
-
agentkit call inspect_pr --url http://127.0.0.1:3000
|
|
150
|
-
|
|
289
|
+
agentkit call inspect_pr --url http://127.0.0.1:3000/pr-approver \
|
|
290
|
+
--input '{"prUrl":"https://github.com/acme/checkout/pull/42"}'
|
|
291
|
+
agentkit call refresh_cache --url http://127.0.0.1:3000/pr-approver \
|
|
292
|
+
--session ses_123
|
|
293
|
+
agentkit call inspect_pr --prod --slug pr-approver --team 123 --input '{}'
|
|
151
294
|
```
|
|
152
295
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
296
|
+
`call` sends `POST /v1/tools/:toolName` and runs the tool in the serving
|
|
297
|
+
process without a model turn. `--input` accepts any valid JSON and
|
|
298
|
+
defaults to `{}`. Tools with a Zod input schema validate and transform
|
|
299
|
+
the value before execution. A local call needs no inference credential.
|
|
300
|
+
A hosted call still needs Cursor credentials to reach the deployment.
|
|
301
|
+
|
|
302
|
+
`--session` runs the tool inside an existing session and records it on
|
|
303
|
+
the event stream. If a model turn is active or pending, the server
|
|
304
|
+
returns `session_busy`; retry after the turn finishes. The command
|
|
305
|
+
prints the server's JSON response and exits non-zero unless the HTTP
|
|
306
|
+
response succeeds with `ok: true`. See
|
|
157
307
|
[Tools](./tools.md#call-a-tool-without-a-model-turn).
|
|
158
308
|
|
|
159
309
|
## eval
|
|
@@ -168,11 +318,22 @@ agentkit eval --dir . builds # every datapoint in the file
|
|
|
168
318
|
agentkit eval --dir . --tag smoke # by tag (repeatable)
|
|
169
319
|
agentkit eval --dir . --json # machine-readable results
|
|
170
320
|
agentkit eval --dir . --verbose # stream t.log lines + reply snippets
|
|
321
|
+
agentkit eval --prod --slug pr-approver --team 123
|
|
171
322
|
```
|
|
172
323
|
|
|
173
|
-
|
|
174
|
-
Select
|
|
175
|
-
|
|
324
|
+
`eval` runs `evals/**/*.eval.{ts,js}` on an ephemeral server or against
|
|
325
|
+
`--url`. Select one or more exact case IDs, file ID prefixes, or tags.
|
|
326
|
+
Omit selectors to run all cases. Repeated `--tag` flags use OR matching.
|
|
327
|
+
|
|
328
|
+
An eval run requires `evals/evals.config.{ts,js}` with `maxConcurrency`
|
|
329
|
+
between 1 and 200. Timeout priority is the case's `timeoutMs`, the CLI's
|
|
330
|
+
`--timeout-ms`, the config's `timeoutMs`, then 180 seconds. Use
|
|
331
|
+
`--no-stream` to hide live progress or `--verbose` to include `t.log`
|
|
332
|
+
lines and reply snippets.
|
|
333
|
+
|
|
334
|
+
`--list --json` prints an array of discovered cases. A run with `--json`
|
|
335
|
+
prints `{ ok, passed, failed, results }`. Failed cases exit `1`; no
|
|
336
|
+
matching cases exit `2`. See [Evals](../evals.md).
|
|
176
337
|
|
|
177
338
|
## trajectory
|
|
178
339
|
|
|
@@ -182,8 +343,9 @@ nothing for all. See [Evals](../evals.md).
|
|
|
182
343
|
agentkit trajectory --events /tmp/run.ndjson [--text]
|
|
183
344
|
```
|
|
184
345
|
|
|
185
|
-
|
|
186
|
-
prints.
|
|
346
|
+
`trajectory` converts a saved NDJSON stream into the trajectory JSON
|
|
347
|
+
returned by `run`. `--text` prints the compact view. The command exits
|
|
348
|
+
non-zero when the reconstructed trajectory failed.
|
|
187
349
|
|
|
188
350
|
## init
|
|
189
351
|
|
|
@@ -195,18 +357,21 @@ agentkit init ./my-agent --json # machine-readable summary for tooling
|
|
|
195
357
|
agentkit init # no directory: print the setup guide
|
|
196
358
|
```
|
|
197
359
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
360
|
+
`init` leaves existing files unchanged and labels each one `create` or
|
|
361
|
+
`exist`. It prints the project path, then runs `npm install` so
|
|
362
|
+
`@cursor/july` resolves for `dev` and `run`.
|
|
363
|
+
|
|
364
|
+
On a TTY, `init` asks whether to install or update the coding-agent
|
|
365
|
+
skills in `~/.cursor/skills/agentkit/`. If accepted, it overwrites them
|
|
366
|
+
with the version bundled in the installed package. The prompt is skipped
|
|
367
|
+
for `--json` and non-interactive hosts.
|
|
368
|
+
|
|
369
|
+
If the host isn't signed in, `init` runs `agentkit login` and waits for
|
|
370
|
+
the browser flow. It then prints the `cd`, `agentkit login`, and
|
|
371
|
+
`agentkit dev` steps still needed.
|
|
372
|
+
|
|
373
|
+
With `--json`, `init` still installs dependencies but never blocks on
|
|
374
|
+
login or skill installation. It prints
|
|
210
375
|
`{ ok, directory, created, skipped, installed, installError, next }`
|
|
211
376
|
(with `login` in `next` when unsigned).
|
|
212
377
|
|
|
@@ -218,10 +383,12 @@ it prints
|
|
|
218
383
|
agentkit info --dir . [--json]
|
|
219
384
|
```
|
|
220
385
|
|
|
221
|
-
|
|
222
|
-
connections, subagents,
|
|
223
|
-
diagnostics.
|
|
224
|
-
|
|
386
|
+
`info` reports the model, instruction size, tools, skills, MCP
|
|
387
|
+
connections, subagents, channel routes, schedules, hooks, and
|
|
388
|
+
diagnostics. Text output summarizes each mounted agent. `--json` prints
|
|
389
|
+
`{ agents: [{ slug, ...projectInfo }] }`, with one entry per mounted
|
|
390
|
+
slug. Use `validate`, not `info --json`, when a script needs an error
|
|
391
|
+
exit status.
|
|
225
392
|
|
|
226
393
|
## validate
|
|
227
394
|
|
|
@@ -231,10 +398,9 @@ prints one entry per slug.
|
|
|
231
398
|
agentkit validate --dir .
|
|
232
399
|
```
|
|
233
400
|
|
|
234
|
-
|
|
235
|
-
error
|
|
236
|
-
|
|
237
|
-
without failing it.
|
|
401
|
+
`validate` prints diagnostics for each agent and exits non-zero when any
|
|
402
|
+
diagnostic has error severity. `serve` also refuses to start when errors
|
|
403
|
+
are present. Warnings don't change the exit status.
|
|
238
404
|
|
|
239
405
|
## login / logout / whoami
|
|
240
406
|
|
|
@@ -248,58 +414,291 @@ agentkit logout
|
|
|
248
414
|
|
|
249
415
|
`login` signs the host in to Cursor: browser sign-in mints a named,
|
|
250
416
|
dashboard-revocable API key, and only the key is stored (the default
|
|
251
|
-
name is
|
|
252
|
-
runtime, and Cursor account MCP connections. `
|
|
253
|
-
|
|
254
|
-
|
|
417
|
+
name is `<invoked command> (<hostname>)`). It powers inference, the cloud
|
|
418
|
+
runtime, and Cursor account MCP connections. `--key-name` changes the
|
|
419
|
+
name of a browser-minted key. `login --api-key` validates and stores a
|
|
420
|
+
key you already created.
|
|
421
|
+
|
|
422
|
+
`whoami` shows which credential is active and why. `CURSOR_API_KEY`
|
|
423
|
+
takes precedence over the stored login. `logout` removes the local
|
|
424
|
+
credential file but doesn't revoke the API key. Revoke it in the Cursor
|
|
425
|
+
dashboard when it should stop working.
|
|
255
426
|
|
|
256
427
|
Non-production backends: login and account RPCs honor
|
|
257
428
|
`CURSOR_API_BASE_URL` while the SDK harness honors `CURSOR_BACKEND_URL`.
|
|
258
429
|
Set both to the same URL, or keys minted on one backend are rejected by
|
|
259
430
|
the other.
|
|
260
431
|
|
|
432
|
+
## update
|
|
433
|
+
|
|
434
|
+
`update` upgrades an installed copy to the latest published version.
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
agentkit update
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
The command checks npm's `latest` tag, detects how agentkit was installed,
|
|
441
|
+
and runs the matching npm, pnpm, Yarn, or Bun upgrade command. It handles
|
|
442
|
+
global installs and project dependencies. It doesn't prompt before
|
|
443
|
+
running the package-manager command.
|
|
444
|
+
|
|
445
|
+
Source checkouts, `npx` or `pnpm dlx` caches, and unknown install layouts
|
|
446
|
+
aren't changed. The command prints a manual upgrade hint instead.
|
|
447
|
+
|
|
448
|
+
Published installs also check for a newer version at most once every 24
|
|
449
|
+
hours and print an update warning on stderr. Source checkouts, CI, and
|
|
450
|
+
commands with an explicit `--json` flag skip this automatic check.
|
|
451
|
+
|
|
452
|
+
## deploy
|
|
453
|
+
|
|
454
|
+
`deploy` sends one or more agents to Cursor managed hosting.
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
agentkit deploy [--dir <path>] [--slug <slug> | --all] [--team <id>]
|
|
458
|
+
[--repo <https-url>] [--ref <git-ref>] [--path <agent-path>]
|
|
459
|
+
[--cursor-events-repo owner/name]...
|
|
460
|
+
[--allow-domain <domain>]... [--no-wait] [--json]
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
Managed hosting requires team-admin permission and the team's
|
|
464
|
+
cloud-agent entitlement. `--team` defaults to the signed-in account's
|
|
465
|
+
team.
|
|
466
|
+
|
|
467
|
+
For a single project, the slug defaults to a normalized version of the
|
|
468
|
+
directory name. Deployment slugs contain lowercase letters, digits, `_`,
|
|
469
|
+
or `-`, with a maximum of 64 characters. For a directory with several
|
|
470
|
+
agents, select one with `--slug`, deploy all with `--all`, or choose from
|
|
471
|
+
the TTY prompt. Non-interactive callers must pass `--slug` or `--all`.
|
|
472
|
+
If `--dir` contains no agent project or child agents, `deploy` creates a
|
|
473
|
+
static placeholder using `--slug` or a slug derived from the directory
|
|
474
|
+
name. In this case, `--all` fails.
|
|
475
|
+
|
|
476
|
+
The command infers `--repo`, `--ref`, and `--path` from the current Git
|
|
477
|
+
checkout when possible. Explicit flags take precedence. `--repo` must
|
|
478
|
+
use HTTPS. Repeat `--cursor-events-repo` to select SCM event sources.
|
|
479
|
+
Repeat `--allow-domain` to add engine egress domains; these values are
|
|
480
|
+
combined with `hosting.egressDomains` from the agent config. Egress
|
|
481
|
+
domains apply only to repository-backed deployments. Each domain must
|
|
482
|
+
be a lowercase hostname with at least two labels and an alphabetic
|
|
483
|
+
top-level domain. One leading `*.` wildcard is allowed. A deployment
|
|
484
|
+
can declare at most 20 domains.
|
|
485
|
+
|
|
486
|
+
By default, the command polls every three seconds for up to ten minutes
|
|
487
|
+
and succeeds only when the deployment reaches `running`. `--no-wait`
|
|
488
|
+
returns after the deployment request is accepted. Multi-agent deploys
|
|
489
|
+
run sequentially. When several agents are selected, `--path` is ignored
|
|
490
|
+
and each project infers its own path. A single-target `--json` run
|
|
491
|
+
prints one object; a multi-target run prints an array.
|
|
492
|
+
|
|
493
|
+
The first deployment can return an alias token. It appears once in text
|
|
494
|
+
or JSON output and can't be retrieved later. Store it as a secret. Send
|
|
495
|
+
it as `X-Agent-Alias-Token` when calling the stable alias URL, or use it
|
|
496
|
+
to sign in to the hosted playground.
|
|
497
|
+
|
|
498
|
+
See [Deployment](../deployment.md) for the hosting security model and
|
|
499
|
+
state layout.
|
|
500
|
+
|
|
501
|
+
## deployments
|
|
502
|
+
|
|
503
|
+
`deployments` lists the selected team's deployments.
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
agentkit deployments [--team <id>] [--json]
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
Text output shows each slug, status, generation, deployment kind, and
|
|
510
|
+
update time. `--json` prints `{ deployments }`.
|
|
511
|
+
|
|
512
|
+
## deployment
|
|
513
|
+
|
|
514
|
+
`deployment` prints the full status of one deployment.
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
agentkit deployment <slug> [--team <id>] [--json]
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
Text output includes status, generation, kind, alias, source, egress
|
|
521
|
+
domains, secret names, engine state, and the last error when present.
|
|
522
|
+
`--json` returns the full API response. It can include short-lived
|
|
523
|
+
`engineAccess.headers`, so handle JSON output as a credential.
|
|
524
|
+
|
|
525
|
+
## stop
|
|
526
|
+
|
|
527
|
+
`stop` shuts down a deployment.
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
agentkit stop <slug> [--team <id>] [--no-wait] [--json]
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
The command polls for up to ten minutes until the status reaches
|
|
534
|
+
`stopped`. `--no-wait` returns after the stop request is accepted.
|
|
535
|
+
|
|
536
|
+
## rotate-token
|
|
537
|
+
|
|
538
|
+
`rotate-token` replaces the alias token used by callers and the hosted
|
|
539
|
+
playground.
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
agentkit rotate-token <slug> [--team <id>] [--json]
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
The old token stops working immediately. The replacement is shown once.
|
|
546
|
+
`--json` prints `{ aliasToken }`.
|
|
547
|
+
|
|
548
|
+
## rotate-pod-credential
|
|
549
|
+
|
|
550
|
+
`rotate-pod-credential` replaces the credential used by the running
|
|
551
|
+
engine pod.
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
agentkit rotate-pod-credential <slug> [--team <id>] [--json]
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
The command returns only the masked key and revokes the old credential
|
|
558
|
+
immediately. Redeploy at once to inject the replacement; the current
|
|
559
|
+
pod can't authenticate to Cursor in between.
|
|
560
|
+
|
|
561
|
+
## secrets
|
|
562
|
+
|
|
563
|
+
`secrets` manages environment secrets for a deployment.
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
agentkit secrets set <slug> NAME[=VALUE]... [--team <id>] [--json]
|
|
567
|
+
agentkit secrets list <slug> [--team <id>] [--json]
|
|
568
|
+
agentkit secrets unset <slug> NAME [--team <id>] [--json]
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
Omit `=VALUE` from `secrets set` to enter the value at a hidden TTY
|
|
572
|
+
prompt. With piped stdin, provide one line for each missing value. Avoid
|
|
573
|
+
values in command arguments because shells can record them in history.
|
|
574
|
+
|
|
575
|
+
Secret names use `UPPER_SNAKE_CASE`, start with a letter, and contain at
|
|
576
|
+
most 64 characters. Names beginning with `CURSOR_` are reserved. Values
|
|
577
|
+
can contain at most 4096 bytes, and one deployment can hold 32 secrets.
|
|
578
|
+
|
|
579
|
+
`secrets list` returns names and creation times, never values. Secret
|
|
580
|
+
changes reach the engine on its next deploy. `secrets set` upserts the
|
|
581
|
+
named secrets without deleting others.
|
|
582
|
+
|
|
583
|
+
JSON output is `{ secretNames }` for `set`, `{ secrets }` for `list`,
|
|
584
|
+
and `{ removed }` for `unset`.
|
|
585
|
+
|
|
261
586
|
## slack
|
|
262
587
|
|
|
263
|
-
The `slack`
|
|
588
|
+
The `slack` pack generates and checks Socket Mode channel setup.
|
|
264
589
|
|
|
265
590
|
```bash
|
|
266
|
-
agentkit slack setup
|
|
267
|
-
agentkit slack init --dir
|
|
268
|
-
|
|
269
|
-
agentkit slack
|
|
270
|
-
|
|
271
|
-
agentkit slack doctor --prefix
|
|
591
|
+
agentkit slack setup
|
|
592
|
+
agentkit slack init [--dir <path>] [--name <name>]
|
|
593
|
+
[--prefix <prefix> | --no-prefix] [--channel-posts]
|
|
594
|
+
agentkit slack manifest [--dir <path>] [--name <name>]
|
|
595
|
+
[--env dev|prod|both] [--channel-posts] [--print]
|
|
596
|
+
agentkit slack doctor [--prefix <prefix>] [--json]
|
|
272
597
|
```
|
|
273
598
|
|
|
599
|
+
`slack setup` prints a guided checklist and doesn't change files.
|
|
600
|
+
|
|
601
|
+
`slack init` creates the channel file, development and production
|
|
602
|
+
manifests, `env.example`, and setup status under the project. It refuses
|
|
603
|
+
to overwrite a target file. If a collision occurs, it exits non-zero;
|
|
604
|
+
files created earlier in the run remain. The token prefix defaults to
|
|
605
|
+
the directory basename normalized to uppercase snake case. Explicit
|
|
606
|
+
`--prefix` values use the same normalization when agentkit builds token
|
|
607
|
+
variable names. For example, `pr-approver` becomes
|
|
608
|
+
`PR_APPROVER_SLACK_BOT_TOKEN`. `--no-prefix` uses shared
|
|
609
|
+
`SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN`. `--channel-posts` subscribes
|
|
610
|
+
the manifests to channel-post events. The command always prints a JSON
|
|
611
|
+
summary.
|
|
612
|
+
|
|
613
|
+
`slack manifest` regenerates selected manifest files. `--env` defaults
|
|
614
|
+
to `both`, and `--name` defaults to the directory name. `--print` writes
|
|
615
|
+
the manifest JSON to stdout instead of changing files. With the default
|
|
616
|
+
`--env both`, it prints development JSON, a `--- prod ---` separator,
|
|
617
|
+
then production JSON.
|
|
618
|
+
|
|
619
|
+
`slack doctor` checks both tokens, Socket Mode connectivity, and
|
|
620
|
+
Slack's `auth.test`. It exits non-zero when any check fails.
|
|
621
|
+
|
|
274
622
|
See the [Slack guide](../guides/slack.md).
|
|
275
623
|
|
|
276
624
|
## github
|
|
277
625
|
|
|
278
|
-
The `github`
|
|
626
|
+
The `github` pack discovers `githubChannel()` definitions and sends live
|
|
627
|
+
or synthesized deliveries to them.
|
|
279
628
|
|
|
280
629
|
```bash
|
|
281
|
-
agentkit github doctor [--install]
|
|
282
|
-
agentkit github events --dir
|
|
283
|
-
agentkit github forward --dir
|
|
630
|
+
agentkit github doctor [--install] [--json]
|
|
631
|
+
agentkit github events [--dir <path>] [--host <host>] [--port <n>] [--json]
|
|
632
|
+
agentkit github forward [--dir <path>] [--slug <slug>] [--channel <id>]
|
|
633
|
+
[--repo owner/repo | --org <org>] [--events a,b,c] [--url <url>]
|
|
634
|
+
[--host <host>] [--port <n>] [--secret <secret>] [--install]
|
|
284
635
|
agentkit github replay <pr-url|owner/repo#N> --dir .
|
|
285
|
-
[--events a,b,c|'*'] [--action
|
|
286
|
-
[--
|
|
636
|
+
[--events a,b,c|'*'] [--action <action>] [--conclusion <result>]
|
|
637
|
+
[--comment <body>] [--context <name>] [--slug <slug>] [--channel <id>]
|
|
638
|
+
[--host <host>] [--port <n>] [--url <url>] [--secret <secret>]
|
|
639
|
+
[--dry-run] [--out <dir>] [--json]
|
|
287
640
|
```
|
|
288
641
|
|
|
289
|
-
`
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
642
|
+
`github events` prints each discovered channel's delivery URL and event
|
|
643
|
+
set. When it finds no channels, it returns an empty result and exits
|
|
644
|
+
successfully.
|
|
645
|
+
|
|
646
|
+
`github forward` wraps `gh webhook forward`. It infers the repository
|
|
647
|
+
from the Git remote when you omit `--repo` and `--org`. URLs and events
|
|
648
|
+
come from the discovered channels; `--events` overrides the event set.
|
|
649
|
+
Use `--slug` or `--channel` to narrow discovery when several channels
|
|
650
|
+
match. Otherwise, one local proxy fans deliveries out to every match.
|
|
651
|
+
`--url` targets one channel. For `forward`, pass `--events` when no
|
|
652
|
+
matched channel can supply the event set.
|
|
653
|
+
|
|
654
|
+
Repository forwarding needs repo-admin access. Organization forwarding
|
|
655
|
+
needs org-owner access. The relay authenticates with the GitHub CLI's
|
|
656
|
+
stored login. A `GITHUB_TOKEN` or `GH_TOKEN` environment override can
|
|
657
|
+
make delivery requests return `401`, even when hook creation succeeds.
|
|
658
|
+
Unset those variables before forwarding.
|
|
659
|
+
|
|
660
|
+
Pass `--secret` or set `GITHUB_WEBHOOK_SECRET` to sign deliveries.
|
|
661
|
+
`serve --dev` accepts unsigned loopback deliveries. A non-dev target
|
|
662
|
+
requires the same secret on both sides.
|
|
663
|
+
|
|
664
|
+
`github replay` needs read access, not admin access. It reads the pull
|
|
665
|
+
request through `gh api`, builds GitHub webhook payloads, and posts them
|
|
666
|
+
to the selected channels. Supported events are `pull_request`,
|
|
667
|
+
`issue_comment`, `pull_request_review_comment`, `check_run`,
|
|
668
|
+
`check_suite`, `workflow_run`, and `status`. The default is
|
|
669
|
+
`pull_request` with action `synchronize`. Comment events need
|
|
670
|
+
`--comment`.
|
|
671
|
+
|
|
672
|
+
Use `--events '*'` to replay every supported event declared by the
|
|
673
|
+
channel. `--dry-run` prints payloads without posting them. `--out`
|
|
674
|
+
writes fixture files but still posts unless you also pass `--dry-run`.
|
|
675
|
+
|
|
676
|
+
`github doctor` checks `gh`, its login, and the pinned
|
|
677
|
+
`cli/gh-webhook` extension. `--install` installs or repairs the
|
|
678
|
+
extension. An environment-token override is a warning and doesn't make
|
|
679
|
+
`github doctor` fail.
|
|
680
|
+
|
|
681
|
+
See the [GitHub guide](../guides/github.md).
|
|
294
682
|
|
|
295
683
|
## Environment variables
|
|
296
684
|
|
|
297
|
-
These
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
|
301
|
-
|
|
|
302
|
-
| `
|
|
303
|
-
| `
|
|
304
|
-
| `
|
|
305
|
-
| `
|
|
685
|
+
These environment variables affect the CLI and its channel packs.
|
|
686
|
+
|
|
687
|
+
| Variable | Meaning |
|
|
688
|
+
| --- | --- |
|
|
689
|
+
| `CURSOR_API_KEY` | Cursor credential. It takes precedence over the stored login. |
|
|
690
|
+
| `CURSOR_API_BASE_URL` | Backend used by login, account, deployment, and event-relay RPCs in non-production environments. |
|
|
691
|
+
| `CURSOR_BACKEND_URL` | Backend used by the Cursor SDK harness in non-production environments. |
|
|
692
|
+
| `AGENT_SERVE_CONFIG_DIR` | Directory for stored credentials and update-check state. The default is `~/.config/agent-serve`. |
|
|
693
|
+
| `AGENT_SERVE_NO_UPDATE_CHECK` / `NO_UPDATE_NOTIFIER` | Disable the automatic published-version check when set to a non-empty value other than `0`. |
|
|
694
|
+
| `CI` | Disable the automatic published-version check when set. |
|
|
695
|
+
| `GITHUB_WEBHOOK_SECRET` | Default signing secret for GitHub forwarding and replay. |
|
|
696
|
+
| `GITHUB_APP_ID` / `GITHUB_APP_PRIVATE_KEY` / `GITHUB_APP_INSTALLATION_ID` | GitHub App authentication for outbound API calls. |
|
|
697
|
+
| `GITHUB_TOKEN` / `GH_TOKEN` | Token authentication for outbound API calls. Unset both for `github forward`. |
|
|
698
|
+
| `SLACK_BOT_TOKEN` / `SLACK_APP_TOKEN` | Slack tokens for one agent. Use `<PREFIX>_SLACK_BOT_TOKEN` and `<PREFIX>_SLACK_APP_TOKEN` for each agent on a multi-agent host. |
|
|
699
|
+
|
|
700
|
+
## What's next
|
|
701
|
+
|
|
702
|
+
- [Project layout](./project-layout.md): files the CLI discovers
|
|
703
|
+
- [HTTP API](./http-api.md): routes used by `chat`, `call`, and other clients
|
|
704
|
+
- [Deployment](../deployment.md): production auth, state, and operations
|