@kivacore/ui-cli 0.26.4 → 0.27.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.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Kiva UI CLI
2
2
 
3
- Official command-line interface for Kiva - authentication, project scaffolding, and code generation tools.
3
+ Command-line tool for the Kiva UI component library. It adds, updates and migrates Kiva UI components, hooks and themes in your project. It only reads the public Kiva UI registry, so it needs no account or sign-in.
4
4
 
5
5
  ## Usage
6
6
 
@@ -10,125 +10,13 @@ npx @kivacore/ui-cli <command>
10
10
 
11
11
  ## Local build
12
12
 
13
- Run `pnpm build` from this package with `CLI_KIVA_API_URL`, `CLI_KIVA_CLIENT_ID`, and `CLI_KIVA_OAUTH_SCOPES` set in the environment or in `.env`. The build uses tsup 9 and writes both the CLI and library to `dist/`. For local builds, tsup supports Node 22.18+, 24.11+, or 26+ on those release lines.
13
+ Run `pnpm build` from this package. It needs no environment variables or secrets. The build uses tsup 9 and writes both the CLI and library to `dist/`. For local builds, tsup supports Node 22.18+, 24.11+, or 26+ on those release lines.
14
14
 
15
15
  ## Commands
16
16
 
17
- ### Authentication
18
-
19
- #### `login`
20
-
21
- Log in to Kiva using browser-based SSO (default).
22
-
23
- ```bash
24
- npx @kivacore/ui-cli login # Opens browser for SSO authentication
25
- npx @kivacore/ui-cli login --email # Use email/password instead (prompts for credentials)
26
- npx @kivacore/ui-cli login -e user@example.com # Pre-fill email address
27
- ```
28
-
29
- #### `logout`
30
-
31
- Log out from Kiva and clear stored credentials.
32
-
33
- ```bash
34
- npx @kivacore/ui-cli logout
35
- ```
36
-
37
- #### `whoami`
38
-
39
- Display the currently logged-in user.
40
-
41
- ```bash
42
- npx @kivacore/ui-cli whoami
43
- # Output: Email: user@example.com
44
- # Name: John Doe
45
- ```
46
-
47
- ### Project Creation
48
-
49
- #### `create [name]`
50
-
51
- Create a new Kiva project from a template.
52
-
53
- ```bash
54
- npx @kivacore/ui-cli create # Interactive mode - prompts for all options
55
- npx @kivacore/ui-cli create my-app # Create project with specified name
56
- npx @kivacore/ui-cli create my-app --nextjs # Next.js + plain Tailwind
57
- npx @kivacore/ui-cli create my-app --nextjs --shadcn # Next.js + shadcn/ui
58
- npx @kivacore/ui-cli create my-app --react --shadcn # React + shadcn/ui
59
- npx @kivacore/ui-cli create my-app --vue --shadcn # Vue + shadcn-vue
60
- npx @kivacore/ui-cli create my-app --nextjs --shadcn --zustand --eslint --pnpm # Full flags
61
- ```
62
-
63
- **Framework Options:**
64
-
65
- | Flag | Description |
66
- |------|-------------|
67
- | `--nextjs` | Use Next.js 16+ (App Router) |
68
- | `--react` | Use React 19+ with Vite |
69
- | `--vue` | Use Vue 3.5+ with Vite |
70
-
71
-
72
- **UI Library Options (optional - defaults to plain Tailwind if not specified):**
73
-
74
- | Flag | Compatible Frameworks |
75
- |------|----------------------|
76
- | `--shadcn` | Next.js, React (shadcn/ui) / Vue (shadcn-vue) |
77
-
78
- **State Management Options (optional):**
79
-
80
- | Flag | Compatible Frameworks |
81
- |------|----------------------|
82
- | `--zustand` | Next.js, React |
83
- | `--tanstack-query` | Next.js, React |
84
- | `--tanstack-vue-query` | Vue |
85
-
86
- **Linter Options:**
87
-
88
- | Flag | Description |
89
- |------|-------------|
90
- | `--eslint` | Use ESLint for linting |
91
- | `--biome` | Use Biome for linting |
92
- | `--no-linter` | Skip linter configuration |
93
-
94
- **Package Manager Options:**
95
-
96
- | Flag | Description |
97
- |------|-------------|
98
- | `--pnpm` | Use pnpm (recommended) |
99
- | `--npm` | Use npm |
100
- | `--yarn` | Use yarn |
101
- | `--bun` | Use bun |
102
-
103
- **Styling Options (shadcn only):**
104
-
105
- | Option | Description |
106
- |--------|-------------|
107
- | `--style <style>` | Component style (vega, nova, maia, lyra, mira) |
108
- | `--base-color <color>` | Base color theme (zinc, slate, neutral, stone, gray) |
109
- | `--rtl` | Enable RTL (right-to-left) support |
110
-
111
- **Other Options:**
112
-
113
- | Option | Description |
114
- |--------|-------------|
115
- | `-p, --path <path>` | Target directory path |
116
- | `--alias <prefix>` | Custom import alias prefix (must start with @) |
117
- | `--local` | Use local templates (development only) |
118
-
119
- Each template includes:
120
- - Pre-configured OAuth2 authentication via `@kivacore/signin`
121
- - Kiva API client integration
122
- - Modern TypeScript setup
123
- - Linter configuration (ESLint or Biome)
124
-
125
17
  ### Component Registry
126
18
 
127
- Registry uç noktalarını özelleştirme:
128
-
129
- - `KIVA_REGISTRY_URL` (varsayılan: `https://ui.kivacore.com/r`)
130
- - `KIVA_SHADCN_REGISTRY_URL` (varsayılan: `https://ui.kivacore.com/r/shadcn`)
131
- - `KIVA_PLATE_REGISTRY_URL` (varsayılan: `https://ui.kivacore.com/r/plate`)
19
+ Components come from `https://ui.kivacore.com/r`. To use another registry, see [Environment Variables](#environment-variables).
132
20
 
133
21
  #### `add [items...]`
134
22
 
@@ -251,24 +139,6 @@ Display current `:root` and `.dark` CSS variables from your `globals.css`.
251
139
  npx @kivacore/ui-cli themes current
252
140
  ```
253
141
 
254
- ### Code Generation
255
-
256
- #### `generate db [spec]`
257
-
258
- Generate TanStack Query collections from an OpenAPI 3.1.0 specification.
259
-
260
- ```bash
261
- npx @kivacore/ui-cli generate db # Auto-detect openapi.json in current directory
262
- npx @kivacore/ui-cli generate db ./api/openapi.json # Specify spec file path
263
- npx @kivacore/ui-cli generate db ./spec.json -o ./src/api # Custom output directory
264
- ```
265
-
266
- **Options:**
267
-
268
- | Option | Description |
269
- |--------|-------------|
270
- | `-o, --output <dir>` | Output directory (defaults to `src` in spec file folder) |
271
-
272
142
  ### Project Setup
273
143
 
274
144
  #### `commitlint`
@@ -291,12 +161,21 @@ npx @kivacore/ui-cli upgrade
291
161
 
292
162
  #### `info`
293
163
 
294
- Display CLI version, system information, and authentication status.
164
+ Display the CLI version, system information, the registry URL and the config file location.
295
165
 
296
166
  ```bash
297
167
  npx @kivacore/ui-cli info
298
168
  ```
299
169
 
170
+ #### `config`
171
+
172
+ Show the configuration, or change the color theme of the help output.
173
+
174
+ ```bash
175
+ npx @kivacore/ui-cli config # Show configuration
176
+ npx @kivacore/ui-cli config --theme # Pick a help color theme
177
+ ```
178
+
300
179
  ## Global Options
301
180
 
302
181
  ### `--json`
@@ -304,8 +183,8 @@ npx @kivacore/ui-cli info
304
183
  Output results in JSON format. Useful for scripting and CI/CD pipelines.
305
184
 
306
185
  ```bash
307
- npx @kivacore/ui-cli whoami --json
308
- npx @kivacore/ui-cli generate db ./spec.json --json
186
+ npx @kivacore/ui-cli list --json
187
+ npx @kivacore/ui-cli info --json
309
188
  ```
310
189
 
311
190
  ### `-v, --version`
@@ -318,22 +197,21 @@ Display help information.
318
197
 
319
198
  ```bash
320
199
  npx @kivacore/ui-cli --help
321
- npx @kivacore/ui-cli create --help
200
+ npx @kivacore/ui-cli add --help
322
201
  ```
323
202
 
324
203
  ## Environment Variables
325
204
 
205
+ All are optional and read at runtime.
206
+
326
207
  | Variable | Description |
327
208
  |----------|-------------|
328
- | `KIVA_API_URL` | Override the API base URL |
329
- | `KIVA_OAUTH_CLIENT_ID` | Override the OAuth2 client ID |
330
- | `KIVA_OAUTH_SCOPES` | Override the OAuth2 scopes |
331
-
332
- ## Token Storage
209
+ | `KIVA_REGISTRY_URL` | Kiva UI registry base URL (default `https://ui.kivacore.com/r`) |
210
+ | `KIVA_SHADCN_REGISTRY_URL` | shadcn registry URL (default `<registry>/shadcn`) |
211
+ | `KIVA_PLATE_REGISTRY_URL` | Plate registry URL (default `<registry>/plate`) |
212
+ | `KIVA_AI_ELEMENTS_REGISTRY_URL` | AI Elements registry URL (default `<registry>/ai-elements`) |
333
213
 
334
- Credentials are securely stored using:
335
- - **macOS/Linux**: System keychain (via `keytar`)
336
- - **Fallback**: Encrypted file in `~/.docyrus/` (the name from before the Kiva rename, so existing sign-ins keep working)
214
+ The help theme setting is stored with `conf` under the `docyrus` project name, the name from before the Kiva rename, so existing settings carry over. `kiva-ui info` shows the file path.
337
215
 
338
216
  ## License
339
217