@cloudwick/astral-ui-cli 0.4.0 → 0.5.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
@@ -9,13 +9,9 @@ For most projects, we recommend using the CLI with `npx` or `yarn dlx` instead o
9
9
  ```bash
10
10
  # Using npx
11
11
  npx @cloudwick/astral-ui-cli init
12
- # or more simply:
13
- npx astral-ui init
14
12
 
15
13
  # Using yarn
16
14
  yarn dlx @cloudwick/astral-ui-cli init
17
- # or:
18
- yarn dlx astral-ui init
19
15
  ```
20
16
 
21
17
  If you frequently use the CLI in your workflow, you can install it globally:
@@ -32,13 +28,13 @@ yarn global add @cloudwick/astral-ui-cli
32
28
 
33
29
  ```bash
34
30
  # Initialize your project
35
- npx astral-ui init
31
+ npx @cloudwick/astral-ui-cli init
36
32
 
37
33
  # Follow instructions to set up path aliases
38
- npx astral-ui setup-aliases
34
+ npx @cloudwick/astral-ui-cli setup-aliases
39
35
 
40
36
  # Add components
41
- npx astral-ui add button card
37
+ npx @cloudwick/astral-ui-cli add button card
42
38
 
43
39
  # Start using in your code
44
40
  import { Button } from '@components/ui/button';
@@ -50,10 +46,10 @@ import { keyboardKeys, mobileBreakPoint } from '@constants';
50
46
 
51
47
  For the best experience, follow these steps in order:
52
48
 
53
- 1. **Initialize** your project with `npx astral-ui init`
54
- 2. **Set up path aliases** using `npx astral-ui setup-aliases` and follow the instructions
55
- 3. **Add components** with `npx astral-ui add [component...]`
56
- 4. **Repair Tailwind** if needed with `npx astral-ui repair-tailwind`
49
+ 1. **Initialize** your project with `npx @cloudwick/astral-ui-cli init`
50
+ 2. **Set up path aliases** using `npx @cloudwick/astral-ui-cli setup-aliases` and follow the instructions
51
+ 3. **Add components** with `npx @cloudwick/astral-ui-cli add [component...]`
52
+ 4. **Repair Tailwind** if needed with `npx @cloudwick/astral-ui-cli repair-tailwind`
57
53
  5. **Import and use** components in your application
58
54
 
59
55
  ## Commands
@@ -63,7 +59,7 @@ For the best experience, follow these steps in order:
63
59
  Initialize a project with Astral Core configuration.
64
60
 
65
61
  ```bash
66
- npx astral-ui init
62
+ npx @cloudwick/astral-ui-cli init
67
63
  ```
68
64
 
69
65
  This command will:
@@ -90,7 +86,7 @@ This command will:
90
86
  Display instructions for setting up path aliases in your project.
91
87
 
92
88
  ```bash
93
- npx astral-ui setup-aliases
89
+ npx @cloudwick/astral-ui-cli setup-aliases
94
90
  ```
95
91
 
96
92
  This command will:
@@ -110,10 +106,10 @@ This command will:
110
106
 
111
107
  ```bash
112
108
  # Generate instructions for current directory
113
- npx astral-ui setup-aliases
109
+ npx @cloudwick/astral-ui-cli setup-aliases
114
110
 
115
111
  # Generate instructions for a specific project
116
- npx astral-ui setup-aliases --cwd ./my-project
112
+ npx @cloudwick/astral-ui-cli setup-aliases --cwd ./my-project
117
113
  ```
118
114
 
119
115
  ### `add`
@@ -121,7 +117,7 @@ npx astral-ui setup-aliases --cwd ./my-project
121
117
  Add components to your project.
122
118
 
123
119
  ```bash
124
- npx astral-ui add [component...]
120
+ npx @cloudwick/astral-ui-cli add [component...]
125
121
  ```
126
122
 
127
123
  #### Options
@@ -135,21 +131,28 @@ npx astral-ui add [component...]
135
131
  | `--path <path>` | `-p` | Specify the path to add the component to |
136
132
  | `--silent` | `-s` | Mute output |
137
133
  | `--skip-dependencies` | | Skip installing internal component dependencies |
134
+ | `--list` | `-l` | List all available components |
138
135
 
139
136
  #### Examples
140
137
 
141
138
  ```bash
139
+ # List all available components
140
+ npx @cloudwick/astral-ui-cli add --list
141
+
142
+ # List components in silent mode (component names only)
143
+ npx @cloudwick/astral-ui-cli add --list --silent
144
+
142
145
  # Add specific components
143
- npx astral-ui add button card select
146
+ npx @cloudwick/astral-ui-cli add button card select
144
147
 
145
148
  # Add all components
146
- npx astral-ui add --all
149
+ npx @cloudwick/astral-ui-cli add --all
147
150
 
148
151
  # Add a component to a specific directory
149
- npx astral-ui add button --path ./components/custom
152
+ npx @cloudwick/astral-ui-cli add button --path ./components/custom
150
153
 
151
154
  # Skip installing internal component dependencies
152
- npx astral-ui add button --skip-dependencies
155
+ npx @cloudwick/astral-ui-cli add button --skip-dependencies
153
156
  ```
154
157
 
155
158
  ### `repair-tailwind`
@@ -157,7 +160,7 @@ npx astral-ui add button --skip-dependencies
157
160
  Repair Tailwind configuration when setup fails - only use if experiencing issues with Tailwind.
158
161
 
159
162
  ```bash
160
- npx astral-ui repair-tailwind
163
+ npx @cloudwick/astral-ui-cli repair-tailwind
161
164
  ```
162
165
 
163
166
  This command will:
@@ -186,13 +189,13 @@ The CSS structure created will match exactly what the `init` command creates, in
186
189
 
187
190
  ```bash
188
191
  # Basic repair
189
- npx astral-ui repair-tailwind
192
+ npx @cloudwick/astral-ui-cli repair-tailwind
190
193
 
191
194
  # Force overwrite existing files
192
- npx astral-ui repair-tailwind --force
195
+ npx @cloudwick/astral-ui-cli repair-tailwind --force
193
196
 
194
197
  # Repair in a specific directory
195
- npx astral-ui repair-tailwind --cwd ./my-project
198
+ npx @cloudwick/astral-ui-cli repair-tailwind --cwd ./my-project
196
199
  ```
197
200
 
198
201
  ## Configuration
@@ -236,6 +239,20 @@ For full details, see `schema/components-config.schema.json` in your project.
236
239
 
237
240
  ## Available Components
238
241
 
242
+ To see a complete list of all available components, run:
243
+
244
+ ```bash
245
+ npx @cloudwick/astral-ui-cli add --list
246
+ ```
247
+
248
+ This will display all components with their descriptions. You can also use the silent mode to get just the component names:
249
+
250
+ ```bash
251
+ npx @cloudwick/astral-ui-cli add --list --silent
252
+ ```
253
+
254
+ ### Popular Components
255
+
239
256
  | Component | Description |
240
257
  |-----------|-------------|
241
258
  | `button` | A button component with various styles, sizes, and states |
@@ -284,7 +301,7 @@ The `cn` function allows you to conditionally combine class names and automatica
284
301
 
285
302
  ## Styling Components
286
303
 
287
- The components in the registry require Tailwind CSS to be properly configured in your application. When you run `npx astral-ui init`, the CLI will:
304
+ The components in the registry require Tailwind CSS to be properly configured in your application. When you run `npx @cloudwick/astral-ui-cli init`, the CLI will:
288
305
 
289
306
  1. Check for an existing Tailwind configuration and upgrade it with required settings
290
307
  2. Create a CSS file with required CSS variables for component styling
@@ -327,7 +344,7 @@ If you're having problems with imports:
327
344
  - **Next.js**: Make sure you're using the correct import format for your Next.js version
328
345
  - **Angular**: Configure paths in tsconfig.app.json instead of tsconfig.json
329
346
  - **Create React App**: You'll need CRACO or similar to enable path aliases
330
- 3. **Verify setup**: Run `npx astral-ui setup-aliases` again to get fresh instructions
347
+ 3. **Verify setup**: Run `npx @cloudwick/astral-ui-cli setup-aliases` again to get fresh instructions
331
348
  4. **Check components.json**: Make sure the paths in the "aliases" section match your project structure
332
349
 
333
350
  ### Styling Issues
@@ -337,7 +354,7 @@ If components don't appear correctly styled:
337
354
  1. Make sure the Tailwind CSS configuration is properly loaded in your application
338
355
  2. Verify the CSS variables are included in your main CSS file
339
356
  3. Check that your component is properly importing the required utilities
340
- 4. Run `npx astral-ui repair-tailwind` to create a fresh Tailwind configuration
357
+ 4. Run `npx @cloudwick/astral-ui-cli repair-tailwind` to create a fresh Tailwind configuration
341
358
  5. If you need to combine the new configuration with your existing customizations, use your backup file as a reference
342
359
 
343
360
  ## Contributing