@aurodesignsystem-dev/auro-cli 0.0.0-pr313.0 → 0.0.0-pr319.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 +208 -28
- package/dist/auro-cli.js +408 -51
- package/dist/auro-cli.js.map +4 -4
- package/package.json +8 -3
package/README.md
CHANGED
|
@@ -1,60 +1,240 @@
|
|
|
1
1
|
# Auro CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://github.com/AlaskaAirlines/auro-cli/actions/workflows/test-and-release.yml)
|
|
4
|
+
[](https://www.npmjs.com/package/@aurodesignsystem/auro-cli)
|
|
5
|
+
[](https://www.apache.org/licenses/LICENSE-2.0)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
A CLI tool for the Auro Design System. It runs the local dev server, syncs repo config, builds components and docs, and drives parts of the release pipeline.
|
|
6
8
|
|
|
7
|
-
|
|
8
|
-
- **Customizable Options**: Specify the port and the directory to open when the server starts.
|
|
9
|
-
- **Hot Module Replacement**: Integrates with HMR (Hot Module Replacement) for a better development experience.
|
|
10
|
-
- **Graceful Error Handling**: Handles invalid inputs and missing options gracefully.
|
|
9
|
+
Published as `@aurodesignsystem/auro-cli`.
|
|
11
10
|
|
|
12
|
-
##
|
|
11
|
+
## Install
|
|
13
12
|
|
|
14
|
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
```bash
|
|
14
|
+
npm install @aurodesignsystem/auro-cli
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or run a single command without installing:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx --package=@aurodesignsystem/auro-cli auro <command>
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commands
|
|
24
|
+
|
|
25
|
+
Run `auro <command> --help` for options on any command. Defaults are shown where they exist.
|
|
26
|
+
|
|
27
|
+
### At a glance
|
|
28
|
+
|
|
29
|
+
**Development**
|
|
30
|
+
|
|
31
|
+
| Command | Does |
|
|
32
|
+
|---------|------|
|
|
33
|
+
| `auro dev` | Runs the dev server for a component. |
|
|
34
|
+
| `auro build` | Builds a component. |
|
|
35
|
+
| `auro docs` | Generates API docs from the Custom Elements Manifest. |
|
|
36
|
+
| `auro test` | Runs the web test runner. |
|
|
37
|
+
|
|
38
|
+
**Repo maintenance**
|
|
39
|
+
|
|
40
|
+
| Command | Does |
|
|
41
|
+
|---------|------|
|
|
42
|
+
| `auro sync` | Pulls `.github/` config from auro-templates. |
|
|
43
|
+
| `auro migrate` | Runs a migration script by id. |
|
|
44
|
+
| `auro agent` | Interactive cross-repo migration runner (work in progress). |
|
|
45
|
+
| `auro ado` | Creates an ADO work item from a GitHub issue. |
|
|
46
|
+
|
|
47
|
+
**Release pipeline** (CI runs these)
|
|
48
|
+
|
|
49
|
+
| Command | Does |
|
|
50
|
+
|---------|------|
|
|
51
|
+
| `auro rc-workflow` | Cuts the RC branch and opens the RC PR. |
|
|
52
|
+
| `auro pr-release` | Sets the PR preview version in `package.json`. |
|
|
53
|
+
| `auro check-commits` (alias `auro cc`) | Classifies commits and can label the PR. |
|
|
54
|
+
|
|
55
|
+
## Full reference
|
|
56
|
+
|
|
57
|
+
### Development
|
|
58
|
+
|
|
59
|
+
#### `auro dev`
|
|
60
|
+
|
|
61
|
+
Runs the dev server for a component. Builds first, then serves.
|
|
19
62
|
|
|
20
|
-
|
|
63
|
+
- `-s, --serve`: start a server.
|
|
64
|
+
- `-p, --port <number>`: server port.
|
|
65
|
+
- `-o, --open`: open the browser once the server is up.
|
|
66
|
+
- `-w, --watch`: rebuild on change.
|
|
67
|
+
- `-m, --module-paths [paths...]`: path(s) to a node_modules folder.
|
|
68
|
+
- `--skip-docs`: skip doc generation (default: off).
|
|
69
|
+
- `-r, --readme-template <url>`: URL to the README template.
|
|
70
|
+
- `--wca-input [files...]`: source file(s) to analyze for API docs.
|
|
71
|
+
- `--wca-output [files...]`: output file(s) for API docs.
|
|
21
72
|
|
|
22
|
-
|
|
73
|
+
#### `auro build`
|
|
74
|
+
|
|
75
|
+
Builds a component.
|
|
76
|
+
|
|
77
|
+
- `-m, --module-paths [paths...]`: path(s) to a node_modules folder.
|
|
78
|
+
- `-w, --watch`: rebuild on change.
|
|
79
|
+
- `--skip-docs`: skip doc generation (default: off).
|
|
80
|
+
- `-r, --readme-template <url>`: URL to the README template.
|
|
81
|
+
- `--wca-input [files...]`: source file(s) to analyze for API docs.
|
|
82
|
+
- `--wca-output [files...]`: output file(s) for API docs.
|
|
83
|
+
|
|
84
|
+
#### `auro docs`
|
|
85
|
+
|
|
86
|
+
Generates API documentation from the Custom Elements Manifest.
|
|
87
|
+
|
|
88
|
+
- `-c, --cem`: generate the Custom Elements Manifest (default: off).
|
|
89
|
+
- `-a, --api`: create `api.md` from the CEM (default: off).
|
|
90
|
+
- `-w, --watch`: rebuild docs on change (default: off).
|
|
91
|
+
- `-r, --readme-template <url>`: URL to the README template.
|
|
92
|
+
- `--skip-readme`: skip README.md processing (default: off).
|
|
93
|
+
- `-s, --serve`: start a server.
|
|
94
|
+
- `-p, --port <number>`: server port.
|
|
95
|
+
- `-o, --open`: open the browser once the server is up.
|
|
96
|
+
|
|
97
|
+
#### `auro test`
|
|
98
|
+
|
|
99
|
+
Runs the web test runner against the component library.
|
|
100
|
+
|
|
101
|
+
- `-w, --watch`: watch mode.
|
|
102
|
+
- `-c, --coverage-report`: generate a coverage report.
|
|
103
|
+
- `-o, --open`: open the coverage report in the browser.
|
|
104
|
+
- `-f, --files <glob>`: test files glob pattern.
|
|
23
105
|
|
|
24
106
|
```bash
|
|
25
|
-
|
|
107
|
+
auro test --coverage-report --open
|
|
26
108
|
```
|
|
27
109
|
|
|
28
|
-
|
|
110
|
+
### Repo maintenance
|
|
111
|
+
|
|
112
|
+
#### `auro sync`
|
|
113
|
+
|
|
114
|
+
Pulls `.github/` config from auro-templates and rewrites this repo's copy.
|
|
115
|
+
|
|
116
|
+
- `-r, --ref <branch/tag/commit>`: git ref to pull from (default: `main`).
|
|
117
|
+
- `-t, --template <name>`: which template to use (default: `default`).
|
|
118
|
+
|
|
119
|
+
Heads up: after it validates the template, it removes the whole `.github/` folder and rebuilds it. Any local `.github/` file not in the template is lost. It does not make a branch, so changes land on your current branch. Run it on a branch you are willing to change.
|
|
120
|
+
|
|
121
|
+
#### `auro migrate`
|
|
122
|
+
|
|
123
|
+
Runs a codemod-style migration script by id.
|
|
124
|
+
|
|
125
|
+
- `-i, --id <string>` (required): the migration to run.
|
|
126
|
+
- `-m, --multi-gitter`: run it across every repo in the multi-gitter config.
|
|
127
|
+
|
|
128
|
+
#### `auro agent`
|
|
129
|
+
|
|
130
|
+
Interactive. Runs a migration across Auro components in dependency order. It prompts for the migration id and which components to start from. Needs multi-gitter installed. (Work in progress)
|
|
131
|
+
|
|
132
|
+
#### `auro ado`
|
|
133
|
+
|
|
134
|
+
Creates an Azure DevOps work item from a GitHub issue.
|
|
29
135
|
|
|
30
|
-
|
|
136
|
+
- `-g, --gh-issue <issue>`: the GitHub issue to use.
|
|
137
|
+
|
|
138
|
+
### Release pipeline
|
|
139
|
+
|
|
140
|
+
CI runs these. You do not usually run them by hand. The workflows in auro-actions call them.
|
|
141
|
+
|
|
142
|
+
#### `auro rc-workflow`
|
|
143
|
+
|
|
144
|
+
Cuts the release-candidate branch and opens the RC pull request. Runs on a push to dev. No options.
|
|
145
|
+
|
|
146
|
+
#### `auro pr-release`
|
|
147
|
+
|
|
148
|
+
Sets the PR preview version in `package.json`, computed from the npm registry. Does not publish.
|
|
149
|
+
|
|
150
|
+
- `-n, --namespace <namespace>`: package namespace (default: `@aurodesignsystem-dev`).
|
|
151
|
+
- `-p, --pr-number <number>`: the PR number (default: `0`).
|
|
152
|
+
|
|
153
|
+
The version comes out as `0.0.0-pr<PR#>.<n>`, where `<n>` is the next free increment on npm.
|
|
154
|
+
|
|
155
|
+
#### `auro check-commits` (alias `auro cc`)
|
|
156
|
+
|
|
157
|
+
Reads the repo's commits, classifies each by conventional-commit type, and reports the result.
|
|
158
|
+
|
|
159
|
+
- `-l, --set-label`: label the PR by the highest-priority commit type.
|
|
160
|
+
- `-d, --debug`: print detailed commit info.
|
|
161
|
+
- `-r, --release-notes`: generate release notes from the commits.
|
|
162
|
+
|
|
163
|
+
### AI assistant context
|
|
164
|
+
|
|
165
|
+
#### `auro context`
|
|
166
|
+
|
|
167
|
+
Prints an AI-ready context document describing the Auro Design System, its components, and usage patterns. Designed to be piped into or pasted into AI coding assistants (Claude, Cursor, Copilot, etc.) to prime them on Auro.
|
|
168
|
+
|
|
169
|
+
The Component Reference table is enriched from each component's Custom Elements Manifest so descriptions stay current. For components installed in the current project, the manifest is read from `node_modules` (matching your installed version); everything else is fetched from unpkg. The curated built-in list is the fallback for any component that can't be resolved. After generating the document, any installed component that isn't on the latest published release is reported to stderr (so it never pollutes the document itself).
|
|
170
|
+
|
|
171
|
+
- `-o, --output <file>`: write the context document to a file instead of stdout (e.g. `AURO_CONTEXT.md`).
|
|
172
|
+
- `--offline`: skip network fetches — enrich only from locally installed manifests and fall back to the built-in table (also skips the outdated-release check).
|
|
173
|
+
|
|
174
|
+
Print the context to the terminal:
|
|
31
175
|
|
|
32
176
|
```bash
|
|
33
|
-
auro
|
|
177
|
+
auro context
|
|
34
178
|
```
|
|
35
179
|
|
|
36
|
-
|
|
180
|
+
Write the context to a file for your AI tool:
|
|
37
181
|
|
|
38
|
-
|
|
182
|
+
```bash
|
|
183
|
+
auro context --output AURO_CONTEXT.md
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
#### `auro cem`
|
|
39
187
|
|
|
40
|
-
`
|
|
41
|
-
Runs the web development server.
|
|
188
|
+
Aggregates the Custom Elements Manifests (`custom-elements.json`) of every published Auro component into a single file. Each component's manifest is fetched from the latest published version on unpkg; components that do not publish a manifest yet are skipped. Useful for feeding a complete, machine-readable component API index to IDEs, docs tooling, and AI assistants.
|
|
42
189
|
|
|
43
190
|
#### Options
|
|
44
191
|
|
|
45
|
-
- `-o, --
|
|
46
|
-
- `-p, --port <type>` Change the server port (default: undefined).
|
|
192
|
+
- `-o, --output <file>` Path to write the aggregated manifest (default: `custom-elements.aggregate.json`).
|
|
47
193
|
|
|
48
194
|
#### Examples
|
|
49
195
|
|
|
50
|
-
|
|
196
|
+
Generate the aggregated manifest:
|
|
197
|
+
|
|
198
|
+
```
|
|
199
|
+
auro cem
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Write it to a specific path:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
auro cem --output dist/custom-elements.aggregate.json
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
#### `auro component <name>`
|
|
209
|
+
|
|
210
|
+
Looks up a single Auro component's API — attributes, properties/methods, slots, events, and CSS parts — from its Custom Elements Manifest. Useful for humans and for AI coding assistants that call the CLI in a tool-use loop to avoid guessing an API.
|
|
211
|
+
|
|
212
|
+
If the component is installed in the current project's `node_modules`, its manifest is read locally so the API matches the version you actually have — the success line shows `(local vX.Y.Z)`. Otherwise it's fetched from unpkg (shown as `(unpkg)`). Passing an explicit `--tag`/version always fetches that version from unpkg.
|
|
213
|
+
|
|
214
|
+
#### Options
|
|
215
|
+
|
|
216
|
+
- `-t, --tag <version>` npm dist-tag or version to look up (default: `latest`; forces an unpkg fetch).
|
|
217
|
+
- `--json` Output the raw manifest declaration(s) as JSON instead of formatted text.
|
|
218
|
+
|
|
219
|
+
#### Examples
|
|
220
|
+
|
|
221
|
+
Look up a component (name is normalized, so all of these work):
|
|
222
|
+
|
|
223
|
+
```
|
|
224
|
+
auro component button
|
|
225
|
+
auro component auro-button
|
|
226
|
+
auro component @aurodesignsystem/auro-button
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Look up a specific version or dist-tag:
|
|
51
230
|
|
|
52
231
|
```
|
|
53
|
-
auro
|
|
232
|
+
auro component auro-button --tag beta
|
|
233
|
+
auro component auro-button --tag 11.0.0
|
|
54
234
|
```
|
|
55
235
|
|
|
56
|
-
|
|
236
|
+
Get machine-readable output:
|
|
57
237
|
|
|
58
238
|
```
|
|
59
|
-
auro
|
|
239
|
+
auro component auro-button --json
|
|
60
240
|
```
|