@doccov/cli 0.25.8 → 0.25.11
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 +91 -20
- package/dist/cli.js +1200 -270
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @doccov/cli
|
|
2
2
|
|
|
3
|
-
Command-line interface for documentation coverage and drift detection.
|
|
3
|
+
Command-line interface for documentation coverage analysis and drift detection.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -8,35 +8,106 @@ Command-line interface for documentation coverage and drift detection.
|
|
|
8
8
|
npm install -g @doccov/cli
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Quick Start
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
|
-
# Check coverage
|
|
15
|
-
doccov check
|
|
14
|
+
# Check documentation coverage
|
|
15
|
+
doccov check src/index.ts
|
|
16
16
|
|
|
17
|
-
# Generate spec
|
|
18
|
-
doccov
|
|
17
|
+
# Generate OpenPkg spec
|
|
18
|
+
doccov spec src/index.ts -o .doccov
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
doccov
|
|
20
|
+
# Get package info
|
|
21
|
+
doccov info src/index.ts
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
## Commands
|
|
25
25
|
|
|
26
26
|
| Command | Description |
|
|
27
27
|
|---------|-------------|
|
|
28
|
-
| `check` |
|
|
29
|
-
| `
|
|
30
|
-
| `diff` | Compare two specs |
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `init` | Create
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
28
|
+
| `check` | Analyze coverage and detect drift |
|
|
29
|
+
| `spec` | Generate OpenPkg + DocCov specs |
|
|
30
|
+
| `diff` | Compare two specs for breaking changes |
|
|
31
|
+
| `info` | Show brief coverage summary |
|
|
32
|
+
| `trends` | View historical coverage trends |
|
|
33
|
+
| `init` | Create configuration file |
|
|
34
|
+
|
|
35
|
+
### check
|
|
36
|
+
|
|
37
|
+
Analyze documentation coverage against thresholds.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
doccov check src/index.ts --min-coverage 80
|
|
41
|
+
doccov check --format json -o report.json
|
|
42
|
+
doccov check --examples typecheck # Validate @example blocks
|
|
43
|
+
doccov check --fix # Auto-fix drift issues
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### spec
|
|
47
|
+
|
|
48
|
+
Generate specification files.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
doccov spec src/index.ts -o .doccov
|
|
52
|
+
doccov spec --format api-surface # Human-readable output
|
|
53
|
+
doccov spec --runtime # Extract Zod/Valibot schemas
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### diff
|
|
57
|
+
|
|
58
|
+
Compare specs and detect breaking changes.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
doccov diff main.json feature.json
|
|
62
|
+
doccov diff --recommend-version # Suggest semver bump
|
|
63
|
+
doccov diff --format github # PR comment format
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### info
|
|
67
|
+
|
|
68
|
+
Quick coverage overview.
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
doccov info src/index.ts
|
|
72
|
+
# @stacks/transactions@7.3.1
|
|
73
|
+
# Exports: 413
|
|
74
|
+
# Coverage: 13%
|
|
75
|
+
# Drift: 13%
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### trends
|
|
79
|
+
|
|
80
|
+
View coverage history over time.
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
doccov trends --cwd ./my-package
|
|
84
|
+
doccov trends --record # Save current coverage
|
|
85
|
+
doccov trends --extended # Show velocity/projections
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
## Configuration
|
|
89
|
+
|
|
90
|
+
Create `doccov.config.yaml` or use `doccov init`:
|
|
91
|
+
|
|
92
|
+
```yaml
|
|
93
|
+
check:
|
|
94
|
+
minCoverage: 80
|
|
95
|
+
maxDrift: 10
|
|
96
|
+
examples: [presence, typecheck]
|
|
97
|
+
|
|
98
|
+
docs:
|
|
99
|
+
include:
|
|
100
|
+
- "docs/**/*.md"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Output Formats
|
|
104
|
+
|
|
105
|
+
All commands support multiple output formats:
|
|
106
|
+
|
|
107
|
+
- `text` (default) - Human-readable terminal output
|
|
108
|
+
- `json` - Machine-readable JSON
|
|
109
|
+
- `markdown` - Markdown report
|
|
110
|
+
- `github` - GitHub Actions annotations
|
|
40
111
|
|
|
41
112
|
## License
|
|
42
113
|
|