@foundrykit/cli 1.0.15 → 1.0.16

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/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @foundrykit/cli
2
2
 
3
+ ## 1.0.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Just a quick demo for Anvar
8
+ - Updated dependencies
9
+ - @foundrykit/types@1.0.9
10
+
3
11
  ## 1.0.15
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -1,14 +1,19 @@
1
1
  # @foundrykit/cli
2
2
 
3
- The official CLI for FoundryKit - a modern component library for Next.js applications with Tailwind CSS v4 support.
3
+ The official CLI for FoundryKit - a modern component library for Next.js
4
+ applications with Tailwind CSS v4 support.
4
5
 
5
6
  ## Features
6
7
 
7
- - 🌐 **Live Registry** - Fetches components from the hosted registry at [foundry.umiflow.com](https://foundry.umiflow.com)
8
- - 🎨 **Interactive Selection** - Multi-select components with keyboard navigation
9
- - 📦 **Smart Dependencies** - Automatically installs required component dependencies
8
+ - 🌐 **Live Registry** - Fetches components from the hosted registry at
9
+ [foundry.umiflow.com](https://foundry.umiflow.com)
10
+ - 🎨 **Interactive Selection** - Multi-select components with keyboard
11
+ navigation
12
+ - 📦 **Smart Dependencies** - Automatically installs required component
13
+ dependencies
10
14
  - 🎯 **Tailwind CSS v4** - Full support for the latest Tailwind CSS version
11
- - 🔄 **Auto-updates** - Registry automatically updates when new components are released
15
+ - 🔄 **Auto-updates** - Registry automatically updates when new components are
16
+ released
12
17
 
13
18
  ## Installation
14
19
 
@@ -42,6 +47,7 @@ foundrykit init
42
47
  ```
43
48
 
44
49
  This will:
50
+
45
51
  - ✅ Detect your Next.js project
46
52
  - ✅ Install required FoundryKit dependencies
47
53
  - ✅ Set up Tailwind CSS v4 configuration
@@ -59,14 +65,17 @@ foundrykit init [options]
59
65
  ```
60
66
 
61
67
  **Options:**
68
+
62
69
  - `-f, --force` - Overwrite existing files
63
70
  - `--skip-install` - Skip installing dependencies
64
71
  - `--skip-prompts` - Use default paths without prompting for customization
65
72
 
66
73
  **What it does:**
74
+
67
75
  1. Validates that you're in a React-based project (Next.js, Vite, Remix)
68
76
  2. **Detects your project structure** and suggests smart default paths
69
- 3. **Prompts for custom paths** - you can customize where files and folders are created
77
+ 3. **Prompts for custom paths** - you can customize where files and folders are
78
+ created
70
79
  4. Installs required dependencies (if not in a workspace)
71
80
  5. Sets up Tailwind CSS v4 with FoundryKit styles
72
81
  6. Creates component directories in your chosen locations
@@ -74,14 +83,16 @@ foundrykit init [options]
74
83
  8. Updates your layout/App file to import FoundryKit styles
75
84
  9. Adds convenient scripts to package.json
76
85
 
77
- **Path Customization:**
78
- The init command now intelligently detects your project structure and offers to customize paths:
86
+ **Path Customization:** The init command now intelligently detects your project
87
+ structure and offers to customize paths:
88
+
79
89
  - Automatically detects if you use `src/` directory
80
90
  - Finds existing `components/`, `lib/`, `styles/` directories
81
91
  - Suggests appropriate defaults based on your framework (Next.js, Vite, Remix)
82
92
  - Allows you to customize each path individually
83
93
 
84
94
  Example prompts:
95
+
85
96
  ```
86
97
  📂 Configure installation paths:
87
98
  Press enter to use the default value shown in parentheses
@@ -105,10 +116,13 @@ foundrykit list [options]
105
116
  ```
106
117
 
107
118
  **Options:**
108
- - `-c, --category <category>` - Filter by category (primitives, components, blocks)
119
+
120
+ - `-c, --category <category>` - Filter by category (primitives, components,
121
+ blocks)
109
122
  - `-s, --search <term>` - Search components by name or description
110
123
 
111
124
  **Examples:**
125
+
112
126
  ```bash
113
127
  # List all components
114
128
  foundrykit list
@@ -124,17 +138,20 @@ foundrykit list -s button
124
138
 
125
139
  ### `add`
126
140
 
127
- Add a component or block to your project. Components are fetched from the live registry at [foundry.umiflow.com](https://foundry.umiflow.com).
141
+ Add a component or block to your project. Components are fetched from the live
142
+ registry at [foundry.umiflow.com](https://foundry.umiflow.com).
128
143
 
129
144
  ```bash
130
145
  foundrykit add <component-id> [options]
131
146
  ```
132
147
 
133
148
  **Options:**
149
+
134
150
  - `-o, --overwrite` - Overwrite existing files
135
151
  - `-p, --path <path>` - Custom installation path
136
152
 
137
153
  **Examples:**
154
+
138
155
  ```bash
139
156
  # Interactive mode - select from a list of all components
140
157
  foundrykit add
@@ -158,6 +175,7 @@ foundrykit update <component-id>
158
175
  ```
159
176
 
160
177
  **Example:**
178
+
161
179
  ```bash
162
180
  foundrykit update hero-minimal
163
181
  ```
@@ -171,6 +189,7 @@ foundrykit doctor
171
189
  ```
172
190
 
173
191
  This command checks:
192
+
174
193
  - Next.js installation
175
194
  - FoundryKit dependencies
176
195
  - Tailwind CSS v4 configuration
@@ -179,7 +198,8 @@ This command checks:
179
198
 
180
199
  ## Tailwind CSS v4 Support
181
200
 
182
- FoundryKit CLI is built for Tailwind CSS v4, which uses CSS-based configuration instead of JavaScript config files. The CLI will:
201
+ FoundryKit CLI is built for Tailwind CSS v4, which uses CSS-based configuration
202
+ instead of JavaScript config files. The CLI will:
183
203
 
184
204
  1. Import FoundryKit's pre-configured Tailwind CSS v4 styles
185
205
  2. Set up proper CSS variables for theming
@@ -187,11 +207,13 @@ FoundryKit CLI is built for Tailwind CSS v4, which uses CSS-based configuration
187
207
  4. Include all necessary Tailwind directives
188
208
 
189
209
  Your `globals.css` will be updated to include:
210
+
190
211
  ```css
191
- @import "@foundrykit/tailwind/globals.css";
212
+ @import '@foundrykit/tailwind/globals.css';
192
213
  ```
193
214
 
194
215
  This provides:
216
+
195
217
  - Complete Tailwind CSS v4 setup
196
218
  - CSS variables for colors and theming
197
219
  - Dark mode configuration
@@ -200,7 +222,8 @@ This provides:
200
222
 
201
223
  ## Working in a Monorepo
202
224
 
203
- If you're using FoundryKit in a monorepo with workspace packages (like pnpm workspaces), the CLI will:
225
+ If you're using FoundryKit in a monorepo with workspace packages (like pnpm
226
+ workspaces), the CLI will:
204
227
 
205
228
  1. Detect the workspace configuration
206
229
  2. Skip installing dependencies (they're already linked via workspace)
@@ -220,6 +243,7 @@ After initialization, you'll have these convenient scripts:
220
243
  ```
221
244
 
222
245
  Use them like:
246
+
223
247
  ```bash
224
248
  npm run fk list
225
249
  pnpm fk add hero-minimal
@@ -261,6 +285,7 @@ your-nextjs-app/
261
285
  If you get `command not found: foundrykit` after global installation with pnpm:
262
286
 
263
287
  1. Ensure your pnpm global bin directory is in your PATH:
288
+
264
289
  ```bash
265
290
  export PATH="$PNPM_HOME:$PATH"
266
291
  ```
@@ -288,7 +313,8 @@ If you're migrating from Tailwind CSS v3:
288
313
 
289
314
  ## Contributing
290
315
 
291
- Contributions are welcome! Please see our [Contributing Guide](../../CONTRIBUTING.md) for details.
316
+ Contributions are welcome! Please see our
317
+ [Contributing Guide](../../CONTRIBUTING.md) for details.
292
318
 
293
319
  ## License
294
320
 
@@ -296,13 +322,19 @@ MIT © FoundryKit
296
322
 
297
323
  ## Registry
298
324
 
299
- FoundryKit components are served from a live registry hosted at [foundry.umiflow.com](https://foundry.umiflow.com). The registry automatically updates when new components are released on GitHub.
325
+ FoundryKit components are served from a live registry hosted at
326
+ [foundry.umiflow.com](https://foundry.umiflow.com). The registry automatically
327
+ updates when new components are released on GitHub.
300
328
 
301
329
  ### Registry Endpoints
302
330
 
303
- - **Component List**: `https://foundry.umiflow.com/registry` - Returns all component metadata
304
- - **Individual Component**: `https://foundry.umiflow.com/registry/[id]` - Returns full component data including files
305
- - **Filtered List**: `https://foundry.umiflow.com/registry?category=primitives&search=button` - Supports filtering
331
+ - **Component List**: `https://foundry.umiflow.com/registry` - Returns all
332
+ component metadata
333
+ - **Individual Component**: `https://foundry.umiflow.com/registry/[id]` -
334
+ Returns full component data including files
335
+ - **Filtered List**:
336
+ `https://foundry.umiflow.com/registry?category=primitives&search=button` -
337
+ Supports filtering
306
338
 
307
339
  ### Custom Registry
308
340
 
@@ -315,10 +347,11 @@ foundrykit list
315
347
 
316
348
  ### Offline Mode
317
349
 
318
- If the registry is unavailable, the CLI will automatically fall back to a local component cache, ensuring you can always work offline.
350
+ If the registry is unavailable, the CLI will automatically fall back to a local
351
+ component cache, ensuring you can always work offline.
319
352
 
320
353
  ## Support
321
354
 
322
355
  - 📧 Email: support@foundrykit.dev
323
356
  - 🐛 Issues: [GitHub Issues](https://github.com/foundrykit/foundrykit/issues)
324
- - 📖 Docs: [https://foundrykit.dev](https://foundrykit.dev)
357
+ - 📖 Docs: [https://foundrykit.dev](https://foundrykit.dev)
@@ -4,14 +4,16 @@
4
4
 
5
5
  The FoundryKit CLI handles two types of dependencies when adding components:
6
6
 
7
- 1. **Registry Dependencies** - Other components or utilities from the registry that a component depends on
7
+ 1. **Registry Dependencies** - Other components or utilities from the registry
8
+ that a component depends on
8
9
  2. **Package Dependencies** - NPM packages that need to be installed
9
10
 
10
11
  ## How It Works
11
12
 
12
13
  ### Registry Dependencies
13
14
 
14
- When a component lists registry dependencies (e.g., `registryDependencies: ['utils']`), the CLI:
15
+ When a component lists registry dependencies (e.g.,
16
+ `registryDependencies: ['utils']`), the CLI:
15
17
 
16
18
  1. **Checks if the dependency already exists** in the project
17
19
  2. **Handles special dependencies** (like `utils`) with custom logic
@@ -22,7 +24,8 @@ When a component lists registry dependencies (e.g., `registryDependencies: ['uti
22
24
 
23
25
  The following dependencies are handled specially:
24
26
 
25
- - `utils` - Creates a `lib/utils.ts` file with the `cn()` function for className merging
27
+ - `utils` - Creates a `lib/utils.ts` file with the `cn()` function for className
28
+ merging
26
29
  - `lib` - Alias for `utils`
27
30
  - `helpers` - Alias for `utils`
28
31
  - `cn` - Alias for `utils`
@@ -75,6 +78,7 @@ foundrykit add button
75
78
  ```
76
79
 
77
80
  The CLI will:
81
+
78
82
  1. Check/create `lib/utils.ts`
79
83
  2. Install the button component files
80
84
  3. Notify about required NPM packages
@@ -92,6 +96,7 @@ The CLI will:
92
96
  ```
93
97
 
94
98
  The CLI will:
99
+
95
100
  1. Process each registry dependency in order
96
101
  2. Skip already installed dependencies
97
102
  3. Create special dependencies as needed
@@ -145,6 +150,7 @@ node test-add-command.js
145
150
  ```
146
151
 
147
152
  This tests:
153
+
148
154
  1. Utils file creation
149
155
  2. Existing file preservation
150
156
  3. Missing dependency handling
@@ -181,6 +187,7 @@ This tests:
181
187
  ### Dependency not found in registry
182
188
 
183
189
  This is usually fine - special dependencies are created locally. The CLI will:
190
+
184
191
  1. Log a warning
185
192
  2. Create the dependency if it's special (like `utils`)
186
193
  3. Continue with the installation
@@ -191,4 +198,4 @@ This is usually fine - special dependencies are created locally. The CLI will:
191
198
  - [ ] Circular dependency detection
192
199
  - [ ] Batch dependency installation
193
200
  - [ ] Dependency tree visualization
194
- - [ ] Custom dependency handlers
201
+ - [ ] Custom dependency handlers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@foundrykit/cli",
3
- "version": "1.0.15",
3
+ "version": "1.0.16",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
@@ -25,7 +25,7 @@
25
25
  "glob": "^10.3.10",
26
26
  "inquirer": "^9.2.15",
27
27
  "node-fetch": "^3.3.0",
28
- "@foundrykit/types": "1.0.8"
28
+ "@foundrykit/types": "1.0.9"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/node": "^20.19.9",
@@ -35,8 +35,8 @@
35
35
  "tsup": "^8.0.0",
36
36
  "typescript": "^5.9.2",
37
37
  "vitest": "^1.2.0",
38
- "@foundrykit/eslint-config": "1.0.4",
39
- "@foundrykit/typescript-config": "1.0.4"
38
+ "@foundrykit/eslint-config": "1.0.5",
39
+ "@foundrykit/typescript-config": "1.0.5"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "tsup",