@aurodesignsystem-dev/auro-cli 0.0.0-pr297.3 → 0.0.0-pr302.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 +173 -42
- package/dist/auro-cli.js +52 -42
- package/dist/auro-cli.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,82 +1,182 @@
|
|
|
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
|
-
- [Options](#options)
|
|
18
|
-
- [Examples](#examples)
|
|
19
|
-
|
|
20
|
-
## Installation
|
|
13
|
+
```bash
|
|
14
|
+
npm install @aurodesignsystem/auro-cli
|
|
15
|
+
```
|
|
21
16
|
|
|
22
|
-
|
|
17
|
+
Or run a single command without installing:
|
|
23
18
|
|
|
24
19
|
```bash
|
|
25
|
-
|
|
20
|
+
npx --package=@aurodesignsystem/auro-cli auro <command>
|
|
26
21
|
```
|
|
27
22
|
|
|
28
|
-
##
|
|
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.
|
|
62
|
+
|
|
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.
|
|
29
72
|
|
|
30
|
-
|
|
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.
|
|
31
105
|
|
|
32
106
|
```bash
|
|
33
|
-
auro
|
|
107
|
+
auro test --coverage-report --open
|
|
34
108
|
```
|
|
35
109
|
|
|
36
|
-
|
|
110
|
+
### Repo maintenance
|
|
37
111
|
|
|
38
|
-
|
|
112
|
+
#### `auro sync`
|
|
39
113
|
|
|
40
|
-
|
|
41
|
-
Runs the web development server.
|
|
114
|
+
Pulls `.github/` config from auro-templates and rewrites this repo's copy.
|
|
42
115
|
|
|
43
|
-
|
|
116
|
+
- `-r, --ref <branch/tag/commit>`: git ref to pull from (default: `main`).
|
|
117
|
+
- `-t, --template <name>`: which template to use (default: `default`).
|
|
44
118
|
|
|
45
|
-
|
|
46
|
-
- `-p, --port <type>` Change the server port (default: undefined).
|
|
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.
|
|
47
120
|
|
|
48
|
-
####
|
|
121
|
+
#### `auro migrate`
|
|
49
122
|
|
|
50
|
-
|
|
123
|
+
Runs a codemod-style migration script by id.
|
|
51
124
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```
|
|
125
|
+
- `-i, --id <string>` (required): the migration to run.
|
|
126
|
+
- `-m, --multi-gitter`: run it across every repo in the multi-gitter config.
|
|
55
127
|
|
|
56
|
-
|
|
128
|
+
#### `auro agent`
|
|
57
129
|
|
|
58
|
-
|
|
59
|
-
auro dev --open src/
|
|
60
|
-
```
|
|
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)
|
|
61
131
|
|
|
62
|
-
`auro
|
|
63
|
-
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.
|
|
132
|
+
#### `auro ado`
|
|
64
133
|
|
|
65
|
-
|
|
134
|
+
Creates an Azure DevOps work item from a GitHub issue.
|
|
66
135
|
|
|
67
|
-
- `-
|
|
136
|
+
- `-g, --gh-issue <issue>`: the GitHub issue to use.
|
|
68
137
|
|
|
69
|
-
|
|
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
|
+
- `-o, --output <file>`: write the context document to a file instead of stdout (e.g. `AURO_CONTEXT.md`).
|
|
70
170
|
|
|
71
171
|
Print the context to the terminal:
|
|
72
172
|
|
|
73
|
-
```
|
|
173
|
+
```bash
|
|
74
174
|
auro context
|
|
75
175
|
```
|
|
76
176
|
|
|
77
177
|
Write the context to a file for your AI tool:
|
|
78
178
|
|
|
79
|
-
```
|
|
179
|
+
```bash
|
|
80
180
|
auro context --output AURO_CONTEXT.md
|
|
81
181
|
```
|
|
82
182
|
|
|
@@ -100,3 +200,34 @@ Write it to a specific path:
|
|
|
100
200
|
```
|
|
101
201
|
auro cem --output dist/custom-elements.aggregate.json
|
|
102
202
|
```
|
|
203
|
+
|
|
204
|
+
`auro component <name>`
|
|
205
|
+
Looks up a single Auro component's API — attributes, properties/methods, slots, events, and CSS parts — from its published 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.
|
|
206
|
+
|
|
207
|
+
#### Options
|
|
208
|
+
|
|
209
|
+
- `-t, --tag <version>` npm dist-tag or version to look up (default: `latest`).
|
|
210
|
+
- `--json` Output the raw manifest declaration(s) as JSON instead of formatted text.
|
|
211
|
+
|
|
212
|
+
#### Examples
|
|
213
|
+
|
|
214
|
+
Look up a component (name is normalized, so all of these work):
|
|
215
|
+
|
|
216
|
+
```
|
|
217
|
+
auro component button
|
|
218
|
+
auro component auro-button
|
|
219
|
+
auro component @aurodesignsystem/auro-button
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Look up a specific version or dist-tag:
|
|
223
|
+
|
|
224
|
+
```
|
|
225
|
+
auro component auro-button --tag beta
|
|
226
|
+
auro component auro-button --tag 11.0.0
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Get machine-readable output:
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
auro component auro-button --json
|
|
233
|
+
```
|