@kitnai/cli 0.1.13 → 0.1.14
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 +93 -23
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @kitnai/cli
|
|
2
2
|
|
|
3
|
-
CLI for installing AI agent components from
|
|
3
|
+
CLI for installing AI agent components from kitn registries.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ After answering, the CLI automatically installs the core engine and HTTP routes
|
|
|
38
38
|
|
|
39
39
|
### `kitn add [components...]`
|
|
40
40
|
|
|
41
|
-
Add components from
|
|
41
|
+
Add components from a registry. Resolves `registryDependencies` transitively.
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
# Add a single component
|
|
@@ -47,6 +47,12 @@ kitn add weather-agent
|
|
|
47
47
|
# Add multiple components
|
|
48
48
|
kitn add weather-agent hackernews-tool eli5
|
|
49
49
|
|
|
50
|
+
# Add from a third-party registry
|
|
51
|
+
kitn add @acme/custom-agent
|
|
52
|
+
|
|
53
|
+
# Add a specific version
|
|
54
|
+
kitn add weather-agent@1.2.0
|
|
55
|
+
|
|
50
56
|
# Overwrite existing files without prompting
|
|
51
57
|
kitn add weather-agent --overwrite
|
|
52
58
|
|
|
@@ -54,6 +60,10 @@ kitn add weather-agent --overwrite
|
|
|
54
60
|
kitn add --type agent
|
|
55
61
|
```
|
|
56
62
|
|
|
63
|
+
Components from the default `@kitn` registry don't need a namespace prefix. Components from other registries use `@namespace/name` format.
|
|
64
|
+
|
|
65
|
+
Third-party components install into a namespace subdirectory (e.g. `src/ai/agents/acme/custom-agent.ts`).
|
|
66
|
+
|
|
57
67
|
**Flags:**
|
|
58
68
|
|
|
59
69
|
| Flag | Description |
|
|
@@ -70,20 +80,24 @@ After installation, the CLI:
|
|
|
70
80
|
|
|
71
81
|
### `kitn list`
|
|
72
82
|
|
|
73
|
-
List available and installed components from
|
|
83
|
+
List available and installed components from configured registries.
|
|
74
84
|
|
|
75
85
|
```bash
|
|
76
86
|
# List all components from all registries
|
|
77
87
|
kitn list
|
|
78
88
|
|
|
79
|
-
# Only show installed components
|
|
80
|
-
kitn list --installed
|
|
81
|
-
|
|
82
89
|
# Filter by type
|
|
90
|
+
kitn list agents
|
|
83
91
|
kitn list --type tool
|
|
84
92
|
|
|
93
|
+
# Only show installed components
|
|
94
|
+
kitn list --installed
|
|
95
|
+
|
|
85
96
|
# Filter by registry
|
|
86
|
-
kitn list --registry @
|
|
97
|
+
kitn list --registry @acme
|
|
98
|
+
|
|
99
|
+
# Show version numbers
|
|
100
|
+
kitn list --verbose
|
|
87
101
|
```
|
|
88
102
|
|
|
89
103
|
**Flags:**
|
|
@@ -91,10 +105,9 @@ kitn list --registry @myteam
|
|
|
91
105
|
| Flag | Description |
|
|
92
106
|
|------|-------------|
|
|
93
107
|
| `-i, --installed` | Only show installed components |
|
|
94
|
-
| `-t, --type <type>` | Filter by type (`agent`, `tool`, `skill`, `storage`) |
|
|
108
|
+
| `-t, --type <type>` | Filter by type (`agent`, `tool`, `skill`, `storage`, `package`) |
|
|
95
109
|
| `-r, --registry <namespace>` | Only show components from this registry |
|
|
96
|
-
|
|
97
|
-
Shows installed version, latest registry version, and an update indicator when a newer version is available.
|
|
110
|
+
| `-v, --verbose` | Show version numbers |
|
|
98
111
|
|
|
99
112
|
### `kitn diff <component>`
|
|
100
113
|
|
|
@@ -128,40 +141,80 @@ kitn update weather-agent weather-tool
|
|
|
128
141
|
kitn update
|
|
129
142
|
```
|
|
130
143
|
|
|
131
|
-
|
|
144
|
+
Re-fetches components from the registry and applies the same conflict resolution as `kitn add --overwrite`.
|
|
132
145
|
|
|
133
146
|
### `kitn info <component>`
|
|
134
147
|
|
|
135
148
|
Show details about a component from the registry.
|
|
136
149
|
|
|
137
150
|
```bash
|
|
151
|
+
# Default registry
|
|
138
152
|
kitn info weather-agent
|
|
153
|
+
|
|
154
|
+
# With namespace and version
|
|
155
|
+
kitn info @acme/tool@1.0.0
|
|
139
156
|
```
|
|
140
157
|
|
|
141
158
|
Displays the component's description, type, version, dependencies, files, and changelog.
|
|
142
159
|
|
|
160
|
+
### `kitn create <type> <name>`
|
|
161
|
+
|
|
162
|
+
Scaffold a new kitn component.
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
kitn create agent my-agent
|
|
166
|
+
kitn create tool my-tool
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
Creates a new component directory with a manifest and template source file.
|
|
170
|
+
|
|
171
|
+
### `kitn build`
|
|
172
|
+
|
|
173
|
+
Build registry JSON from components that have `registry.json` manifests.
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Scan from current directory
|
|
177
|
+
kitn build
|
|
178
|
+
|
|
179
|
+
# Specify directories and output
|
|
180
|
+
kitn build src/components --output dist/r
|
|
181
|
+
```
|
|
182
|
+
|
|
143
183
|
### `kitn registry`
|
|
144
184
|
|
|
145
185
|
Manage component registries.
|
|
146
186
|
|
|
147
187
|
```bash
|
|
148
|
-
# Add a
|
|
188
|
+
# Add a registry with metadata
|
|
189
|
+
kitn registry add @acme https://acme.dev/r/{type}/{name}.json \
|
|
190
|
+
--homepage https://acme.dev \
|
|
191
|
+
--description "Acme AI components"
|
|
192
|
+
|
|
193
|
+
# Add a plain registry (URL only)
|
|
149
194
|
kitn registry add @myteam https://registry.myteam.dev/r/{type}/{name}.json
|
|
150
195
|
|
|
151
|
-
# List configured registries
|
|
196
|
+
# List configured registries (shows URL, homepage, description)
|
|
152
197
|
kitn registry list
|
|
153
198
|
|
|
154
199
|
# Remove a registry
|
|
155
200
|
kitn registry remove @myteam
|
|
201
|
+
|
|
202
|
+
# Overwrite an existing registry
|
|
203
|
+
kitn registry add @myteam https://new-url.dev/r/{type}/{name}.json --overwrite
|
|
204
|
+
|
|
205
|
+
# Remove the default @kitn registry (requires --force)
|
|
206
|
+
kitn registry remove @kitn --force
|
|
156
207
|
```
|
|
157
208
|
|
|
158
209
|
**Subcommands:**
|
|
159
210
|
|
|
160
211
|
| Subcommand | Description |
|
|
161
212
|
|------------|-------------|
|
|
162
|
-
| `add <namespace> <url>` | Add a registry
|
|
163
|
-
| `list` | List all configured registries |
|
|
164
|
-
| `remove <namespace>` | Remove a registry
|
|
213
|
+
| `add <namespace> <url>` | Add a registry. Options: `-o` overwrite, `--homepage`, `--description` |
|
|
214
|
+
| `list` | List all configured registries with URLs and metadata |
|
|
215
|
+
| `remove <namespace>` | Remove a registry. `-f` required to remove `@kitn` |
|
|
216
|
+
|
|
217
|
+
The URL template uses `{type}` and `{name}` placeholders. Components are fetched by replacing these with the component's type directory (`agents`, `tools`, `skills`, `storage`, `package`) and name. The registry index is fetched by replacing `{type}/{name}.json` with `registry.json`.
|
|
165
218
|
|
|
166
219
|
## Configuration
|
|
167
220
|
|
|
@@ -182,7 +235,11 @@ Created by `kitn init`. Controls where components are installed and which regist
|
|
|
182
235
|
"storage": "src/ai/storage"
|
|
183
236
|
},
|
|
184
237
|
"registries": {
|
|
185
|
-
"@kitn":
|
|
238
|
+
"@kitn": {
|
|
239
|
+
"url": "https://kitn-ai.github.io/kitn/r/{type}/{name}.json",
|
|
240
|
+
"homepage": "https://kitn.ai",
|
|
241
|
+
"description": "Official kitn AI agent components"
|
|
242
|
+
}
|
|
186
243
|
}
|
|
187
244
|
}
|
|
188
245
|
```
|
|
@@ -192,18 +249,27 @@ Created by `kitn init`. Controls where components are installed and which regist
|
|
|
192
249
|
| `runtime` | `bun`, `node`, or `deno` |
|
|
193
250
|
| `framework` | `hono` |
|
|
194
251
|
| `aliases` | Directory paths for each component type |
|
|
195
|
-
| `registries` | Named registries
|
|
252
|
+
| `registries` | Named registries — each value is a URL string or an object with `url`, `homepage`, `description` |
|
|
196
253
|
| `installed` | Auto-managed tracking of installed components (don't edit manually) |
|
|
197
254
|
|
|
198
|
-
###
|
|
255
|
+
### Registry entries
|
|
199
256
|
|
|
200
|
-
|
|
257
|
+
Registry entries can be a plain URL string or a rich object:
|
|
201
258
|
|
|
202
|
-
```
|
|
203
|
-
|
|
259
|
+
```json
|
|
260
|
+
{
|
|
261
|
+
"registries": {
|
|
262
|
+
"@kitn": {
|
|
263
|
+
"url": "https://kitn-ai.github.io/kitn/r/{type}/{name}.json",
|
|
264
|
+
"homepage": "https://kitn.ai",
|
|
265
|
+
"description": "Official kitn AI agent components"
|
|
266
|
+
},
|
|
267
|
+
"@myteam": "https://registry.myteam.dev/r/{type}/{name}.json"
|
|
268
|
+
}
|
|
269
|
+
}
|
|
204
270
|
```
|
|
205
271
|
|
|
206
|
-
|
|
272
|
+
Both formats are supported. The CLI stores a rich object when `--homepage` or `--description` is provided, and a plain string otherwise.
|
|
207
273
|
|
|
208
274
|
## Package Manager Detection
|
|
209
275
|
|
|
@@ -219,3 +285,7 @@ The CLI automatically detects your package manager by checking for lockfiles in
|
|
|
219
285
|
Components are **source code**, not packages. `kitn add` copies TypeScript files directly into your project. You own the code and can modify it freely.
|
|
220
286
|
|
|
221
287
|
The CLI tracks what it installed in `kitn.json` under `installed`, storing file paths and content hashes. This enables `kitn diff` to detect local changes and `kitn update` to apply registry updates.
|
|
288
|
+
|
|
289
|
+
### Hosting your own registry
|
|
290
|
+
|
|
291
|
+
Any HTTP server that serves JSON files matching the registry schema can be a kitn registry. See the [registry documentation](https://github.com/kitn-ai/registry) for the schema specification and instructions on registering your registry in the public directory.
|
package/dist/index.js
CHANGED
|
@@ -2247,7 +2247,7 @@ function startUpdateCheck(currentVersion) {
|
|
|
2247
2247
|
}
|
|
2248
2248
|
|
|
2249
2249
|
// src/index.ts
|
|
2250
|
-
var VERSION = true ? "0.1.
|
|
2250
|
+
var VERSION = true ? "0.1.14" : "0.0.0-dev";
|
|
2251
2251
|
var printUpdateNotice = startUpdateCheck(VERSION);
|
|
2252
2252
|
var program = new Command().name("kitn").description("Install AI agent components from the kitn registry").version(VERSION);
|
|
2253
2253
|
program.command("init").description("Initialize kitn in your project").action(async () => {
|