@accesslint/cli 0.1.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.
Files changed (3) hide show
  1. package/README.md +63 -0
  2. package/dist/cli.js +56055 -0
  3. package/package.json +25 -0
package/README.md ADDED
@@ -0,0 +1,63 @@
1
+ # @accesslint/cli
2
+
3
+ CLI tool for auditing HTML accessibility using [@accesslint/core](https://github.com/AccessLint/core).
4
+
5
+ ## Install
6
+
7
+ ```
8
+ bun install
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ accesslint [options] [source]
15
+ ```
16
+
17
+ ### Sources
18
+
19
+ ```bash
20
+ # Audit a local file
21
+ bun src/cli.ts index.html
22
+
23
+ # Audit a URL
24
+ bun src/cli.ts https://example.com
25
+
26
+ # Pipe HTML via stdin
27
+ curl -s https://example.com | bun src/cli.ts
28
+ ```
29
+
30
+ ### Options
31
+
32
+ ```
33
+ -f, --format <fmt> Output format: text, json (default: text)
34
+ --include-aaa Include AAA-level rules
35
+ --component-mode Exclude page-level rules
36
+ -d, --disable <ids> Comma-separated rule IDs to disable
37
+ -h, --help Show help
38
+ -v, --version Show version
39
+ ```
40
+
41
+ ### Exit codes
42
+
43
+ | Code | Meaning |
44
+ |------|---------|
45
+ | 0 | No violations |
46
+ | 1 | Violations found |
47
+ | 2 | Error |
48
+
49
+ ## Examples
50
+
51
+ ```bash
52
+ # Text output with colors
53
+ echo '<img src="photo.jpg">' | bun src/cli.ts
54
+
55
+ # JSON output
56
+ bun src/cli.ts --format json index.html
57
+
58
+ # Audit a component (skip page-level rules like document-title, html-has-lang)
59
+ bun src/cli.ts --component-mode component.html
60
+
61
+ # Disable specific rules
62
+ bun src/cli.ts -d "landmarks/region,navigable/bypass" index.html
63
+ ```