@aurodesignsystem-dev/auro-cli 0.0.0-pr297.3 → 0.0.0-pr302.1

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
@@ -1,82 +1,185 @@
1
1
  # Auro CLI
2
2
 
3
- Auro CLI is a command-line interface designed to help consumers of the Auro Design System and the developers maintaining it.
3
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/AlaskaAirlines/auro-cli/test-and-release.yml?style=for-the-badge)](https://github.com/AlaskaAirlines/auro-cli/actions/workflows/test-and-release.yml)
4
+ [![See it on NPM!](https://img.shields.io/npm/v/@aurodesignsystem/auro-cli.svg?style=for-the-badge&color=orange)](https://www.npmjs.com/package/@aurodesignsystem/auro-cli)
5
+ [![License](https://img.shields.io/npm/l/@aurodesignsystem/auro-cli.svg?color=blue&style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
4
6
 
5
- ## `Dev` Command Features
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
- - **Start Development Server**: Quickly launch a web development server with default or custom configurations.
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
- ## Table of Contents
11
+ ## Install
13
12
 
14
- - [Installation](#installation)
15
- - [Usage](#usage)
16
- - [Commands](#commands)
17
- - [Options](#options)
18
- - [Examples](#examples)
19
-
20
- ## Installation
13
+ ```bash
14
+ npm install @aurodesignsystem/auro-cli
15
+ ```
21
16
 
22
- To install Auro CLI, clone the repository and install the dependencies:
17
+ Or run a single command without installing:
23
18
 
24
19
  ```bash
25
- npm install @aurodesignsystem/auro-cli
20
+ npx --package=@aurodesignsystem/auro-cli auro <command>
26
21
  ```
27
22
 
28
- ## Usage
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
- To use Auro CLI, run the following command in your terminal:
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 dev
107
+ auro test --coverage-report --open
34
108
  ```
35
109
 
36
- This will start the development server with default options.
110
+ ### Repo maintenance
37
111
 
38
- ## Commands
112
+ #### `auro sync`
39
113
 
40
- `auro dev`
41
- Runs the web development server.
114
+ Pulls `.github/` config from auro-templates and rewrites this repo's copy.
42
115
 
43
- #### Options
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
- - `-o, --open <type>` Open the server to a specific directory (default: demo/).
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
- #### Examples
121
+ #### `auro migrate`
49
122
 
50
- Start the server on a specific port:
123
+ Runs a codemod-style migration script by id.
51
124
 
52
- ```
53
- auro dev --port 8000
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
- Open the server to a specific directory:
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 context`
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
- #### Options
134
+ Creates an Azure DevOps work item from a GitHub issue.
66
135
 
67
- - `-o, --output <file>` Write the context document to a file instead of stdout (e.g. `AURO_CONTEXT.md`).
136
+ - `-g, --gh-issue <issue>`: the GitHub issue to use.
68
137
 
69
- #### Examples
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 published Custom Elements Manifest so descriptions stay current; the curated built-in list is used as a fallback for any component that can't be fetched (or when `--offline` is passed).
170
+
171
+ - `-o, --output <file>`: write the context document to a file instead of stdout (e.g. `AURO_CONTEXT.md`).
172
+ - `--offline`: skip fetching live manifests and use the built-in component table (no network).
70
173
 
71
174
  Print the context to the terminal:
72
175
 
73
- ```
176
+ ```bash
74
177
  auro context
75
178
  ```
76
179
 
77
180
  Write the context to a file for your AI tool:
78
181
 
79
- ```
182
+ ```bash
80
183
  auro context --output AURO_CONTEXT.md
81
184
  ```
82
185
 
@@ -100,3 +203,34 @@ Write it to a specific path:
100
203
  ```
101
204
  auro cem --output dist/custom-elements.aggregate.json
102
205
  ```
206
+
207
+ `auro component <name>`
208
+ 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.
209
+
210
+ #### Options
211
+
212
+ - `-t, --tag <version>` npm dist-tag or version to look up (default: `latest`).
213
+ - `--json` Output the raw manifest declaration(s) as JSON instead of formatted text.
214
+
215
+ #### Examples
216
+
217
+ Look up a component (name is normalized, so all of these work):
218
+
219
+ ```
220
+ auro component button
221
+ auro component auro-button
222
+ auro component @aurodesignsystem/auro-button
223
+ ```
224
+
225
+ Look up a specific version or dist-tag:
226
+
227
+ ```
228
+ auro component auro-button --tag beta
229
+ auro component auro-button --tag 11.0.0
230
+ ```
231
+
232
+ Get machine-readable output:
233
+
234
+ ```
235
+ auro component auro-button --json
236
+ ```