copilotkit 3.0.2 → 3.0.4
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 +119 -15
- package/index.js +1974 -895
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# CopilotKit CLI
|
|
2
2
|
|
|
3
|
-
The CopilotKit CLI scaffolds starter apps
|
|
3
|
+
The CopilotKit CLI scaffolds starter apps, connects project creation to a
|
|
4
|
+
CopilotKit workspace through the Ops/Clerk platform, and manages local CLI
|
|
5
|
+
authentication for CopilotKit Intelligence onboarding.
|
|
4
6
|
|
|
5
7
|
## Install
|
|
6
8
|
|
|
@@ -30,6 +32,11 @@ copilotkit whoami
|
|
|
30
32
|
|
|
31
33
|
Use `copilotkit docs` to open <https://docs.copilotkit.ai> in your browser. In CI, or when the browser cannot be opened, the CLI prints the URL instead.
|
|
32
34
|
|
|
35
|
+
Use `copilotkit login` when you want to sign in before running workspace-gated
|
|
36
|
+
commands. It stores the local CLI session used by `whoami`, `license`, and the
|
|
37
|
+
`init`/`create` workspace connection; it does not scaffold a project or issue a
|
|
38
|
+
license key by itself.
|
|
39
|
+
|
|
33
40
|
The onboarding commands are:
|
|
34
41
|
|
|
35
42
|
- `copilotkit init`
|
|
@@ -47,7 +54,13 @@ persistence, insights), and `init` provisions a free license automatically —
|
|
|
47
54
|
you sign in with your browser during scaffolding. The `-i`/`--intelligence`
|
|
48
55
|
flag is retained as a deprecated no-op for backward compatibility.
|
|
49
56
|
|
|
50
|
-
Supported framework values include `langgraph-py`, `langgraph-js`, `mastra`, `pydantic-ai`, `aws-strands-py`, `adk`, `a2a`, `microsoft-agent-framework-dotnet`, `microsoft-agent-framework-py`, `flows`, `llamaindex`, and `
|
|
57
|
+
Supported framework values include `langgraph-py`, `langgraph-js`, `mastra`, `pydantic-ai`, `aws-strands-py`, `adk`, `a2a`, `microsoft-agent-framework-dotnet`, `microsoft-agent-framework-py`, `flows`, `llamaindex`, `agno`, `ag2`, `mcp-apps`, `agentcore-langgraph`, `agentcore-strands`, `a2ui`, and `opengenui`.
|
|
58
|
+
|
|
59
|
+
`init` and `create` collect your starter choices, then connect project creation
|
|
60
|
+
to your CopilotKit workspace through Ops/Clerk before scaffolding. If you
|
|
61
|
+
already have a valid CLI session, the CLI reuses that workspace connection;
|
|
62
|
+
otherwise it opens browser sign-in. This workspace connection is required for
|
|
63
|
+
project creation and is separate from license issuance.
|
|
51
64
|
|
|
52
65
|
## Skills And Agent-Assisted Onboarding
|
|
53
66
|
|
|
@@ -56,13 +69,34 @@ when you already have an app and want your coding agent to add CopilotKit for yo
|
|
|
56
69
|
|
|
57
70
|
```bash
|
|
58
71
|
copilotkit skills install
|
|
72
|
+
copilotkit skills install -y
|
|
73
|
+
copilotkit skills install --skill react-core,runtime --agent claude-code
|
|
74
|
+
copilotkit skills install --list
|
|
59
75
|
copilotkit skills onboard
|
|
60
76
|
copilotkit skills onboard --no-clipboard
|
|
61
77
|
```
|
|
62
78
|
|
|
63
|
-
`copilotkit skills install` installs
|
|
79
|
+
`copilotkit skills install` installs CopilotKit agent skills for your coding
|
|
64
80
|
agent (Claude Code, Codex, Cursor, Gemini, and others) by running the standalone
|
|
65
|
-
`skills` installer under the hood.
|
|
81
|
+
`skills` installer under the hood.
|
|
82
|
+
|
|
83
|
+
By default it installs every skill and prompts you to choose which coding agents
|
|
84
|
+
to install them to. Narrow or automate the install with these flags (they work
|
|
85
|
+
on both `install` and `onboard`):
|
|
86
|
+
|
|
87
|
+
- `-s, --skill <names>` — comma-separated skills to install (default: all),
|
|
88
|
+
e.g. `--skill react-core,runtime`.
|
|
89
|
+
- `-a, --agent <names>` — comma-separated coding agents to install to
|
|
90
|
+
(default: choose interactively), e.g. `--agent claude-code,cursor`.
|
|
91
|
+
- `-y, --yes` — install everything (all skills to all agents) non-interactively.
|
|
92
|
+
- `--global` — install at the user level instead of the current project.
|
|
93
|
+
- `--list` — list the available skills and exit without installing (`install`
|
|
94
|
+
only).
|
|
95
|
+
|
|
96
|
+
Choosing which coding agents to install to is interactive, so a non-interactive
|
|
97
|
+
environment (CI, scripts) must make the choice deterministic: pass `-y` to
|
|
98
|
+
install everything, or `--agent <name>` to target specific agents. Otherwise the
|
|
99
|
+
command exits with guidance instead of hanging.
|
|
66
100
|
|
|
67
101
|
`copilotkit skills onboard` is a superset of `install`. It also:
|
|
68
102
|
|
|
@@ -76,7 +110,8 @@ agent (Claude Code, Codex, Cursor, Gemini, and others) by running the standalone
|
|
|
76
110
|
Pass `--no-clipboard` to always print the prompt instead of copying it. This is
|
|
77
111
|
useful in headless or remote shells where clipboard access is unavailable.
|
|
78
112
|
`onboard` requires an interactive terminal because it opens a browser to sign
|
|
79
|
-
in; use `skills install` for non-interactive
|
|
113
|
+
in; use `skills install -y` (or `--agent <name>`) for non-interactive
|
|
114
|
+
environments.
|
|
80
115
|
|
|
81
116
|
When to use which:
|
|
82
117
|
|
|
@@ -94,11 +129,18 @@ The CLI expects:
|
|
|
94
129
|
- Python 3.10+ for the A2A template.
|
|
95
130
|
- The .NET SDK for the Microsoft Agent Framework .NET template.
|
|
96
131
|
|
|
97
|
-
|
|
132
|
+
Project creation requires a CopilotKit workspace connection through Ops/Clerk
|
|
133
|
+
(browser sign-in when no session exists). Standard framework templates use that
|
|
134
|
+
connection only to authorize creation; they do not request or write a license
|
|
135
|
+
key. Threads-framework templates additionally issue a CopilotKit license key and
|
|
136
|
+
write it into the generated project.
|
|
98
137
|
|
|
99
138
|
## Environment Files
|
|
100
139
|
|
|
101
|
-
The scaffold step copies `.env.example` to `.env` when a template provides one.
|
|
140
|
+
The scaffold step copies `.env.example` to `.env` when a template provides one.
|
|
141
|
+
If the selected starter requires a license, the CLI also ensures
|
|
142
|
+
`COPILOTKIT_LICENSE_TOKEN` is present in `.env`. Standard starters do not receive
|
|
143
|
+
a license token.
|
|
102
144
|
|
|
103
145
|
After creation, add any provider secrets required by the template. Most templates use OpenAI:
|
|
104
146
|
|
|
@@ -106,7 +148,19 @@ After creation, add any provider secrets required by the template. Most template
|
|
|
106
148
|
OPENAI_API_KEY=your-key-here
|
|
107
149
|
```
|
|
108
150
|
|
|
109
|
-
|
|
151
|
+
(Replace `your-key-here` with your real key — placeholder-shaped values are
|
|
152
|
+
rejected by the dev preflight described below.)
|
|
153
|
+
|
|
154
|
+
The ADK template uses `GOOGLE_API_KEY`. The A2A template uses both `OPENAI_API_KEY` and `GOOGLE_API_KEY`.
|
|
155
|
+
|
|
156
|
+
For threads-enabled scaffolds, `npm run dev` verifies the required key(s)
|
|
157
|
+
before starting anything: if a key is unset, empty, or still an obvious
|
|
158
|
+
placeholder (wrapped in `<...>`, starting with `your-`/`your_`, or ending in
|
|
159
|
+
`...` like the printed examples), the run exits with instructions naming the
|
|
160
|
+
key, the vendor console URL to create one, and the exact `.env` line to add.
|
|
161
|
+
A real key exported in your shell environment satisfies the check too. An
|
|
162
|
+
exported empty or whitespace value falls back to the `.env` value, while an
|
|
163
|
+
exported placeholder-shaped value fails the gate outright.
|
|
110
164
|
|
|
111
165
|
The Microsoft Agent Framework .NET template uses GitHub Models. Set its C# agent token with `dotnet user-secrets set GitHubToken "<your-token>"` from the generated `agent/` directory.
|
|
112
166
|
|
|
@@ -114,11 +168,28 @@ Do not commit generated `.env` files or personal secrets.
|
|
|
114
168
|
|
|
115
169
|
## Run A Generated Project
|
|
116
170
|
|
|
117
|
-
After scaffolding:
|
|
171
|
+
After scaffolding, the CLI prompts you to install dependencies:
|
|
172
|
+
|
|
173
|
+
```
|
|
174
|
+
Install dependencies now? (npm install) [Y/n]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Press Enter (or `y`) to let the CLI run the install command for you. Press `n` to skip and run it yourself later. Either way, the CLI then prints the exact next steps.
|
|
178
|
+
|
|
179
|
+
When a required LLM vendor API key is missing from `.env` — unset, empty, or still a placeholder — the next-step block names the key, links to the vendor console, and shows the exact `.env` line to add before you run the dev server:
|
|
180
|
+
|
|
181
|
+
```
|
|
182
|
+
Set OPENAI_API_KEY before running: Required by the agent runtime.
|
|
183
|
+
Get a key: https://platform.openai.com/api-keys
|
|
184
|
+
Add to .env: OPENAI_API_KEY=sk-...
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
This is the same key the `npm run dev` preflight gate enforces (see [Environment Files](#environment-files)), so the two are always in agreement.
|
|
188
|
+
|
|
189
|
+
The CLI also prints `cd <project>` because it cannot change your shell's working directory. `npm run dev` is always left for you to run:
|
|
118
190
|
|
|
119
191
|
```bash
|
|
120
192
|
cd my-agent
|
|
121
|
-
npm install
|
|
122
193
|
npm run dev
|
|
123
194
|
```
|
|
124
195
|
|
|
@@ -131,7 +202,7 @@ python3 -m venv agents/.venv
|
|
|
131
202
|
agents/.venv/bin/pip install -r agents/requirements.txt
|
|
132
203
|
```
|
|
133
204
|
|
|
134
|
-
For the Intelligence threads template, keep Docker Desktop running before `npm run dev`. The root dev script starts the required Docker Compose services automatically, so a separate `docker compose up` step is only needed when you intentionally want to manage infrastructure by hand.
|
|
205
|
+
For the Intelligence threads template, keep Docker Desktop running before `npm run dev`. The root dev script starts the required Docker Compose services automatically when a license token is present in `.env` (without one it prints a "threads locked" hint and skips Docker), so a separate `docker compose up` step is only needed when you intentionally want to manage infrastructure by hand.
|
|
135
206
|
|
|
136
207
|
## Diagnostics
|
|
137
208
|
|
|
@@ -145,10 +216,11 @@ copilotkit logs --tail --lines 100
|
|
|
145
216
|
|
|
146
217
|
With no flags, `copilotkit logs` prints the log file path. `--tail` prints recent structured log lines. Add `--verbose` to a CLI command when you need high-signal diagnostics mirrored to stderr during the run.
|
|
147
218
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
219
|
+
Project creation (`init`/`create`) connects to and revalidates the live Clerk
|
|
220
|
+
workspace before scaffolding. License commands, including `license list`,
|
|
221
|
+
revalidate the live Clerk organization before using local auth as needed. If a
|
|
222
|
+
workspace or organization check fails because the cached session is stale, the
|
|
223
|
+
CLI may clear local auth and rerun browser login before continuing.
|
|
152
224
|
|
|
153
225
|
## Telemetry
|
|
154
226
|
|
|
@@ -177,3 +249,35 @@ first-run prompt) is always respected; no events are sent until telemetry is
|
|
|
177
249
|
explicitly re-enabled. `copilotkit telemetry reset` restores the full
|
|
178
250
|
fresh-install state: the decision is forgotten and the one-time notice shows
|
|
179
251
|
again on the next interactive run.
|
|
252
|
+
|
|
253
|
+
## Prerelease builds
|
|
254
|
+
|
|
255
|
+
Tester-facing prerelease builds are produced by CI via `workflow_dispatch` on
|
|
256
|
+
the `pkg-pr-new (cli)` workflow — never built locally (the repo root `.env`
|
|
257
|
+
targets local services, and CI is the reproducible path).
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
gh workflow run "pkg-pr-new (cli)" --ref <feature-branch> \
|
|
261
|
+
-f cli_env=production \
|
|
262
|
+
-f template_ref=<copilotkit-branch> # optional; omit to use main
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
- `cli_env` — endpoint set baked into the binary (`local`, `dev`, `staging`,
|
|
266
|
+
`production`; defaults to `production`).
|
|
267
|
+
- `template_ref` — `CopilotKit/CopilotKit` branch or tag that `init` templates
|
|
268
|
+
and the `_intelligence` overlay are pinned to (the workflow validates it
|
|
269
|
+
exists before building). Empty means `main`. The `ag2`
|
|
270
|
+
template comes from the third-party `ag2ai/ag2-copilotkit-starter` repo and
|
|
271
|
+
is never repinned.
|
|
272
|
+
|
|
273
|
+
Open the workflow run and copy the `npx https://pkg.pr.new/...` command from
|
|
274
|
+
the **job summary**; hand that one-liner to testers. Prerelease binaries
|
|
275
|
+
report `<version>-pre.<shortsha>` from `copilotkit --version`, so a tester's
|
|
276
|
+
build is always identifiable.
|
|
277
|
+
|
|
278
|
+
Pushes and PRs continue to publish `CLI_ENV=local` builds automatically, as
|
|
279
|
+
before.
|
|
280
|
+
|
|
281
|
+
Note: `workflow_dispatch` only works against refs that contain the dispatch
|
|
282
|
+
trigger — branches cut before this workflow landed need a merge from `main`
|
|
283
|
+
first.
|