@cloudwick/astral-ui-cli 0.2.1 → 0.3.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
@@ -2,19 +2,30 @@
2
2
 
3
3
  A command-line tool for installing and managing Astral UI components in any codebase.
4
4
 
5
- ## Installation
5
+ ## Usage
6
6
 
7
- ```bash
8
- # Install globally with npm
9
- npm install -g @cloudwick/astral-ui-cli
7
+ For most projects, we recommend using the CLI with `npx` or `yarn dlx` instead of installing it globally:
10
8
 
11
- # Install globally with yarn
12
- yarn global add @cloudwick/astral-ui-cli
13
-
14
- # Or run directly with npx/yarn without installing
9
+ ```bash
10
+ # Using npx
15
11
  npx @cloudwick/astral-ui-cli init
16
12
  # or more simply:
17
13
  npx astral-ui init
14
+
15
+ # Using yarn
16
+ yarn dlx @cloudwick/astral-ui-cli init
17
+ # or:
18
+ yarn dlx astral-ui init
19
+ ```
20
+
21
+ If you frequently use the CLI in your workflow, you can install it globally:
22
+
23
+ ```bash
24
+ # Install globally with npm (only if needed)
25
+ npm install -g @cloudwick/astral-ui-cli
26
+
27
+ # Install globally with yarn (only if needed)
28
+ yarn global add @cloudwick/astral-ui-cli
18
29
  ```
19
30
 
20
31
  ## Quick Start
@@ -39,10 +50,10 @@ import { keyboardKeys, mobileBreakPoint } from '@constants';
39
50
 
40
51
  For the best experience, follow these steps in order:
41
52
 
42
- 1. **Initialize** your project with `astral-ui init`
43
- 2. **Set up path aliases** using `astral-ui setup-aliases` and follow the instructions
44
- 3. **Add components** with `astral-ui add [component...]`
45
- 4. **Repair Tailwind** if needed with `astral-ui repair-tailwind`
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`
46
57
  5. **Import and use** components in your application
47
58
 
48
59
  ## Commands
@@ -52,7 +63,7 @@ For the best experience, follow these steps in order:
52
63
  Initialize a project with Astral Core configuration.
53
64
 
54
65
  ```bash
55
- astral-ui init
66
+ npx astral-ui init
56
67
  ```
57
68
 
58
69
  This command will:
@@ -61,6 +72,8 @@ This command will:
61
72
  - Install Tailwind CSS if not already present
62
73
  - Add required configuration to existing Tailwind config or create a new one
63
74
  - Add utility functions
75
+ - Add Inter font files for consistent typography
76
+ - Set up font CSS for proper font rendering
64
77
 
65
78
  #### Options
66
79
 
@@ -77,7 +90,7 @@ This command will:
77
90
  Display instructions for setting up path aliases in your project.
78
91
 
79
92
  ```bash
80
- astral-ui setup-aliases
93
+ npx astral-ui setup-aliases
81
94
  ```
82
95
 
83
96
  This command will:
@@ -97,10 +110,10 @@ This command will:
97
110
 
98
111
  ```bash
99
112
  # Generate instructions for current directory
100
- astral-ui setup-aliases
113
+ npx astral-ui setup-aliases
101
114
 
102
115
  # Generate instructions for a specific project
103
- astral-ui setup-aliases --cwd ./my-project
116
+ npx astral-ui setup-aliases --cwd ./my-project
104
117
  ```
105
118
 
106
119
  ### `add`
@@ -108,7 +121,7 @@ astral-ui setup-aliases --cwd ./my-project
108
121
  Add components to your project.
109
122
 
110
123
  ```bash
111
- astral-ui add [component...]
124
+ npx astral-ui add [component...]
112
125
  ```
113
126
 
114
127
  #### Options
@@ -127,16 +140,16 @@ astral-ui add [component...]
127
140
 
128
141
  ```bash
129
142
  # Add specific components
130
- astral-ui add button card select
143
+ npx astral-ui add button card select
131
144
 
132
145
  # Add all components
133
- astral-ui add --all
146
+ npx astral-ui add --all
134
147
 
135
148
  # Add a component to a specific directory
136
- astral-ui add button --path ./components/custom
149
+ npx astral-ui add button --path ./components/custom
137
150
 
138
151
  # Skip installing internal component dependencies
139
- astral-ui add button --skip-dependencies
152
+ npx astral-ui add button --skip-dependencies
140
153
  ```
141
154
 
142
155
  ### `repair-tailwind`
@@ -144,7 +157,7 @@ astral-ui add button --skip-dependencies
144
157
  Repair Tailwind configuration when setup fails - only use if experiencing issues with Tailwind.
145
158
 
146
159
  ```bash
147
- astral-ui repair-tailwind
160
+ npx astral-ui repair-tailwind
148
161
  ```
149
162
 
150
163
  This command will:
@@ -250,7 +263,7 @@ The `cn` function allows you to conditionally combine class names and automatica
250
263
 
251
264
  ## Styling Components
252
265
 
253
- The components in the registry require Tailwind CSS to be properly configured in your application. When you run `astral-ui init`, the CLI will:
266
+ 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:
254
267
 
255
268
  1. Check for an existing Tailwind configuration and upgrade it with required settings
256
269
  2. Create a CSS file with required CSS variables for component styling
@@ -273,7 +286,6 @@ Required Tailwind features included in the configuration:
273
286
  - Color system with RGB variables for primary, secondary, success, warning, error, and gray scales
274
287
  - Custom box shadows for card components
275
288
  - Dark mode support ("class" mode for theme toggling)
276
- - Animation utilities via tailwindcss-animate plugin
277
289
 
278
290
  ### CSS Variables
279
291
 
@@ -294,7 +306,7 @@ If you're having problems with imports:
294
306
  - **Next.js**: Make sure you're using the correct import format for your Next.js version
295
307
  - **Angular**: Configure paths in tsconfig.app.json instead of tsconfig.json
296
308
  - **Create React App**: You'll need CRACO or similar to enable path aliases
297
- 3. **Verify setup**: Run `astral-ui setup-aliases` again to get fresh instructions
309
+ 3. **Verify setup**: Run `npx astral-ui setup-aliases` again to get fresh instructions
298
310
  4. **Check components.json**: Make sure the paths in the "aliases" section match your project structure
299
311
 
300
312
  ### Styling Issues
@@ -304,57 +316,12 @@ If components don't appear correctly styled:
304
316
  1. Make sure the Tailwind CSS configuration is properly loaded in your application
305
317
  2. Verify the CSS variables are included in your main CSS file
306
318
  3. Check that your component is properly importing the required utilities
307
- 4. Run `astral-ui repair-tailwind` to create a fresh Tailwind configuration
319
+ 4. Run `npx astral-ui repair-tailwind` to create a fresh Tailwind configuration
308
320
  5. If you need to combine the new configuration with your existing customizations, use your backup file as a reference
309
321
 
310
- ## Development
311
-
312
- ### Setup
313
-
314
- ```bash
315
- # Install dependencies
316
- yarn install
317
- ```
322
+ ## Contributing
318
323
 
319
- ### Building
320
-
321
- ```bash
322
- # Build the CLI
323
- yarn build
324
-
325
- # Watch for changes and rebuild automatically
326
- yarn dev
327
- ```
328
-
329
- ### Linting
330
-
331
- ```bash
332
- # Run both ESLint and Stylelint
333
- yarn lint
334
-
335
- # Run only ESLint for TypeScript
336
- yarn lint:js
337
-
338
- # Run only Stylelint for CSS/SCSS
339
- yarn lint:style
340
-
341
- # Fix auto-fixable ESLint issues
342
- yarn lint:fix
343
- ```
344
-
345
- ### Testing
346
-
347
- ```bash
348
- # Run tests
349
- yarn test
350
- ```
351
-
352
- ### Utilities
353
-
354
- ```bash
355
- # Copy CSS variables from the UI library
356
- yarn copy-css
357
- ```
324
+ For information on developing and contributing to the CLI, please see the [CONTRIBUTING.md](../../CONTRIBUTING.md) file in the root of the repository.
358
325
 
359
326
  ## License
360
327