copilotkit 2.1.1 → 3.0.0

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.
Files changed (69) hide show
  1. package/README.md +151 -0
  2. package/index.js +91091 -87590
  3. package/package.json +1 -1
  4. package/src/commands/docs.d.ts +0 -17
  5. package/src/commands/docs.d.ts.map +0 -1
  6. package/src/commands/init.d.ts +0 -142
  7. package/src/commands/init.d.ts.map +0 -1
  8. package/src/commands/kite.d.ts +0 -8
  9. package/src/commands/kite.d.ts.map +0 -1
  10. package/src/commands/license.d.ts +0 -25
  11. package/src/commands/license.d.ts.map +0 -1
  12. package/src/commands/login.d.ts +0 -13
  13. package/src/commands/login.d.ts.map +0 -1
  14. package/src/commands/logs.d.ts +0 -32
  15. package/src/commands/logs.d.ts.map +0 -1
  16. package/src/commands/version.d.ts +0 -8
  17. package/src/commands/version.d.ts.map +0 -1
  18. package/src/config.d.ts +0 -46
  19. package/src/config.d.ts.map +0 -1
  20. package/src/index.d.ts +0 -21
  21. package/src/index.d.ts.map +0 -1
  22. package/src/services/agentcore-config.d.ts +0 -34
  23. package/src/services/agentcore-config.d.ts.map +0 -1
  24. package/src/services/api-client.d.ts +0 -99
  25. package/src/services/api-client.d.ts.map +0 -1
  26. package/src/services/auth.service.d.ts +0 -141
  27. package/src/services/auth.service.d.ts.map +0 -1
  28. package/src/services/cli-auth-diagnostics.d.ts +0 -71
  29. package/src/services/cli-auth-diagnostics.d.ts.map +0 -1
  30. package/src/services/cli-logs.d.ts +0 -45
  31. package/src/services/cli-logs.d.ts.map +0 -1
  32. package/src/services/cli-tips.d.ts +0 -45
  33. package/src/services/cli-tips.d.ts.map +0 -1
  34. package/src/services/config.service.d.ts +0 -53
  35. package/src/services/config.service.d.ts.map +0 -1
  36. package/src/services/kite-game-engine.d.ts +0 -99
  37. package/src/services/kite-game-engine.d.ts.map +0 -1
  38. package/src/services/kite-game-score.d.ts +0 -33
  39. package/src/services/kite-game-score.d.ts.map +0 -1
  40. package/src/services/project-scaffold.d.ts +0 -49
  41. package/src/services/project-scaffold.d.ts.map +0 -1
  42. package/src/services/showcase-config.d.ts +0 -19
  43. package/src/services/showcase-config.d.ts.map +0 -1
  44. package/src/services/telemetry/event-properties.d.ts +0 -102
  45. package/src/services/telemetry/event-properties.d.ts.map +0 -1
  46. package/src/services/telemetry/index.d.ts +0 -48
  47. package/src/services/telemetry/index.d.ts.map +0 -1
  48. package/src/services/telemetry/installation-id.d.ts +0 -22
  49. package/src/services/telemetry/installation-id.d.ts.map +0 -1
  50. package/src/services/telemetry/opt-out.d.ts +0 -24
  51. package/src/services/telemetry/opt-out.d.ts.map +0 -1
  52. package/src/services/telemetry/telemetry.service.d.ts +0 -74
  53. package/src/services/telemetry/telemetry.service.d.ts.map +0 -1
  54. package/src/types.d.ts +0 -227
  55. package/src/types.d.ts.map +0 -1
  56. package/src/ui/banner.d.ts +0 -3
  57. package/src/ui/banner.d.ts.map +0 -1
  58. package/src/ui/browser-login.d.ts +0 -75
  59. package/src/ui/browser-login.d.ts.map +0 -1
  60. package/src/ui/cli-tip.d.ts +0 -111
  61. package/src/ui/cli-tip.d.ts.map +0 -1
  62. package/src/ui/init-flow.d.ts +0 -28
  63. package/src/ui/init-flow.d.ts.map +0 -1
  64. package/src/ui/kite-game.d.ts +0 -26
  65. package/src/ui/kite-game.d.ts.map +0 -1
  66. package/src/ui/login-flow.d.ts +0 -22
  67. package/src/ui/login-flow.d.ts.map +0 -1
  68. package/src/ui/spinner.d.ts +0 -9
  69. package/src/ui/spinner.d.ts.map +0 -1
package/README.md ADDED
@@ -0,0 +1,151 @@
1
+ # CopilotKit CLI
2
+
3
+ The CopilotKit CLI scaffolds starter apps and manages local CLI authentication for CopilotKit Intelligence onboarding.
4
+
5
+ ## Install
6
+
7
+ Use the published package for normal onboarding:
8
+
9
+ ```bash
10
+ npx copilotkit@latest init
11
+ ```
12
+
13
+ For this workspace, build and run the local CLI with Nx:
14
+
15
+ ```bash
16
+ pnpm nx build cli
17
+ node dist/apps/cli/index.js --help
18
+ ```
19
+
20
+ ## Discover Commands
21
+
22
+ Run help first when exploring the CLI:
23
+
24
+ ```bash
25
+ copilotkit --help
26
+ copilotkit docs
27
+ copilotkit version
28
+ copilotkit whoami
29
+ ```
30
+
31
+ 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
+
33
+ The onboarding commands are:
34
+
35
+ - `copilotkit init`
36
+ - `copilotkit create`
37
+
38
+ `create` is an alias for `init`. Both commands accept the same flags:
39
+
40
+ ```bash
41
+ copilotkit init --name my-agent
42
+ copilotkit create --name my-agent --framework langgraph-py
43
+ ```
44
+
45
+ Every supported framework ships with CopilotKit Intelligence (durable threads,
46
+ persistence, insights), and `init` provisions a free license automatically —
47
+ you sign in with your browser during scaffolding. The `-i`/`--intelligence`
48
+ flag is retained as a deprecated no-op for backward compatibility.
49
+
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 `agno`.
51
+
52
+ ## Skills And Agent-Assisted Onboarding
53
+
54
+ Use `copilotkit create` to start a **new** project. Use `copilotkit skills onboard`
55
+ when you already have an app and want your coding agent to add CopilotKit for you.
56
+
57
+ ```bash
58
+ copilotkit skills install
59
+ copilotkit skills onboard
60
+ copilotkit skills onboard --no-clipboard
61
+ ```
62
+
63
+ `copilotkit skills install` installs all CopilotKit agent skills for your coding
64
+ agent (Claude Code, Codex, Cursor, Gemini, and others) by running the standalone
65
+ `skills` installer under the hood. It runs without a TTY, so it is safe in CI.
66
+
67
+ `copilotkit skills onboard` is a superset of `install`. It also:
68
+
69
+ - signs you in with your CopilotKit account, reusing your existing session and
70
+ opening a browser sign-in only when you are not already signed in;
71
+ - stops before any repo-specific file changes — your coding agent performs the
72
+ actual integration using the installed skills;
73
+ - copies a ready-to-paste agent prompt to your clipboard, and prints it instead
74
+ when the clipboard is unavailable.
75
+
76
+ Pass `--no-clipboard` to always print the prompt instead of copying it. This is
77
+ useful in headless or remote shells where clipboard access is unavailable.
78
+ `onboard` requires an interactive terminal because it opens a browser to sign
79
+ in; use `skills install` for non-interactive environments.
80
+
81
+ When to use which:
82
+
83
+ - `copilotkit create` — scaffold a brand-new CopilotKit project.
84
+ - `copilotkit skills onboard` — add CopilotKit to an existing project with help
85
+ from your coding agent.
86
+
87
+ ## Prerequisites
88
+
89
+ The CLI expects:
90
+
91
+ - Node.js and the package manager required by the selected template.
92
+ - `git` on `PATH`, because templates are downloaded with git sparse checkout and initialized as a new repository.
93
+ - `uv` for Python templates and the Intelligence sample app. Install it before running Python starters so their dependencies can sync cleanly.
94
+ - Python 3.10+ for the A2A template.
95
+ - The .NET SDK for the Microsoft Agent Framework .NET template.
96
+
97
+ Every `init` authenticates with your CopilotKit account before scaffolding (browser sign-in when no session exists). Threads-framework templates additionally issue a CopilotKit license key and write it into the generated project.
98
+
99
+ ## Environment Files
100
+
101
+ The scaffold step copies `.env.example` to `.env` when a template provides one. If the selected template requires a license, the CLI also ensures `COPILOTKIT_LICENSE_TOKEN` is present in `.env`.
102
+
103
+ After creation, add any provider secrets required by the template. Most templates use OpenAI:
104
+
105
+ ```bash
106
+ OPENAI_API_KEY=your-key-here
107
+ ```
108
+
109
+ The ADK template uses `GOOGLE_API_KEY`. The A2A template uses both `GOOGLE_API_KEY` and `OPENAI_API_KEY`.
110
+
111
+ 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
+
113
+ Do not commit generated `.env` files or personal secrets.
114
+
115
+ ## Run A Generated Project
116
+
117
+ After scaffolding:
118
+
119
+ ```bash
120
+ cd my-agent
121
+ npm install
122
+ npm run dev
123
+ ```
124
+
125
+ For Python-based templates, install `uv` first. Current Python, .NET, and threads templates are still installed and run from the scaffold root with `npm install` and `npm run dev`; their package scripts handle framework setup as needed.
126
+
127
+ For the A2A template, create the Python agent environment before starting dev:
128
+
129
+ ```bash
130
+ python3 -m venv agents/.venv
131
+ agents/.venv/bin/pip install -r agents/requirements.txt
132
+ ```
133
+
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.
135
+
136
+ ## Diagnostics
137
+
138
+ Use `copilotkit logs` when onboarding fails or support needs local CLI diagnostics:
139
+
140
+ ```bash
141
+ copilotkit logs
142
+ copilotkit logs --tail
143
+ copilotkit logs --tail --lines 100
144
+ ```
145
+
146
+ 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
+
148
+ License, license list, and Intelligence init flows revalidate the live Clerk
149
+ organization before using local auth. If that check fails because the cached
150
+ session is stale, the CLI may clear local auth and rerun browser login before
151
+ continuing.