@kitnai/cli 0.1.16 → 0.1.18

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 CHANGED
@@ -27,14 +27,27 @@ pnpm dlx @kitnai/cli init
27
27
  Initialize kitn in your project. Creates `kitn.json`, installs the core engine and Hono routes, and sets up tsconfig path aliases.
28
28
 
29
29
  ```bash
30
+ # Interactive (prompts for runtime and base directory)
30
31
  kitn init
32
+
33
+ # Non-interactive with flags
34
+ kitn init --runtime bun --base src/ai
35
+
36
+ # Accept all defaults (runtime=bun, base=src/ai)
37
+ kitn init -y
31
38
  ```
32
39
 
33
- Prompts for:
34
- - **Runtime**: bun, node, or deno
35
- - **Install path**: Base directory for kitn components (defaults to `src/ai`)
40
+ **Flags:**
41
+
42
+ | Flag | Description |
43
+ |------|-------------|
44
+ | `-r, --runtime <runtime>` | Runtime to use (`bun`, `node`, `deno`) — skips runtime prompt |
45
+ | `-b, --base <path>` | Base directory for components (default: `src/ai`) — skips path prompt |
46
+ | `-y, --yes` | Accept all defaults without prompting |
36
47
 
37
- After answering, the CLI automatically installs the core engine and HTTP routes into your project.
48
+ When flags are provided, the corresponding prompts are skipped. This enables scripting and CI usage.
49
+
50
+ After setup, the CLI automatically installs the core engine and HTTP routes into your project.
38
51
 
39
52
  ### `kitn add [components...]`
40
53
 
@@ -56,12 +69,18 @@ kitn add weather-agent@1.2.0
56
69
  # Overwrite existing files without prompting
57
70
  kitn add weather-agent --overwrite
58
71
 
59
- # Filter interactive selection by type
60
- kitn add --type agent
72
+ # Type-first syntax specify the type before the name
73
+ kitn add agent weather
74
+ kitn add tool weather
75
+
76
+ # Filter by type with the --type flag
77
+ kitn add --type agent weather
61
78
  ```
62
79
 
63
80
  Components from the default `@kitn` registry don't need a namespace prefix. Components from other registries use `@namespace/name` format.
64
81
 
82
+ When multiple components share the same name but differ in type (e.g., a `weather` agent and a `weather` tool), you'll be prompted to choose which to install. Use the type-first syntax or `--type` flag to skip the prompt.
83
+
65
84
  Third-party components install into a namespace subdirectory (e.g. `src/ai/agents/acme/custom-agent.ts`).
66
85
 
67
86
  **Flags:**
@@ -69,7 +88,7 @@ Third-party components install into a namespace subdirectory (e.g. `src/ai/agent
69
88
  | Flag | Description |
70
89
  |------|-------------|
71
90
  | `-o, --overwrite` | Overwrite existing files without prompting |
72
- | `-t, --type <type>` | Filter components by type when browsing |
91
+ | `-t, --type <type>` | Filter by component type during resolution |
73
92
 
74
93
  When a file already exists and differs from the registry version, you'll see a unified diff and be prompted to keep your version or overwrite.
75
94
 
@@ -180,6 +199,16 @@ kitn build
180
199
  kitn build src/components --output dist/r
181
200
  ```
182
201
 
202
+ ### `kitn check`
203
+
204
+ Check for CLI updates.
205
+
206
+ ```bash
207
+ kitn check
208
+ ```
209
+
210
+ Shows the current version and whether a newer version is available on npm.
211
+
183
212
  ### `kitn registry`
184
213
 
185
214
  Manage component registries.