dead-links 0.1.0 → 0.1.2
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 +82 -48
- package/dist/index.js +0 -0
- package/package.json +13 -12
package/README.md
CHANGED
|
@@ -2,76 +2,120 @@
|
|
|
2
2
|
|
|
3
3
|
A CLI tool to scan your Obsidian vault for broken links, orphan notes, and connection graphs.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Usage
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
|
|
8
|
+
npx dead-links scan --vault "my-vault"
|
|
9
|
+
npx dead-links broken --vault "my-vault" --verbose
|
|
10
|
+
npx dead-links orphans --vault "my-vault" --ignore-folders Films Diary
|
|
11
|
+
npx dead-links graph --vault "my-vault" --format json
|
|
12
|
+
npx dead-links report --vault "my-vault" --output report.md
|
|
9
13
|
```
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
| Command | Description |
|
|
18
|
+
|---------|-------------|
|
|
19
|
+
| `dead-links scan` | Full scan: broken links + orphan notes + graph |
|
|
20
|
+
| `dead-links broken` | Show only broken links |
|
|
21
|
+
| `dead-links orphans` | Show only orphan notes |
|
|
22
|
+
| `dead-links graph` | Show connection graph |
|
|
23
|
+
| `dead-links report` | Generate a `.md` report file |
|
|
24
|
+
|
|
25
|
+
### scan
|
|
12
26
|
|
|
13
27
|
```bash
|
|
14
|
-
|
|
28
|
+
dead-links scan [options]
|
|
29
|
+
|
|
30
|
+
Options:
|
|
31
|
+
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
32
|
+
--format <type> Output format: text, json, markdown (default: text)
|
|
33
|
+
--output <file> Save output to a file
|
|
34
|
+
--ignore <patterns...> Glob patterns to ignore
|
|
35
|
+
--attachments Also check embedded attachments (images, PDFs)
|
|
36
|
+
--ignore-folders <folders> Exclude folders from orphan report
|
|
37
|
+
--quiet Only show issues, no stats
|
|
38
|
+
--no-color Disable colored output
|
|
15
39
|
```
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
### broken
|
|
18
42
|
|
|
19
43
|
```bash
|
|
20
|
-
dead-links
|
|
44
|
+
dead-links broken [options]
|
|
45
|
+
|
|
46
|
+
Options:
|
|
47
|
+
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
48
|
+
--ignore <patterns...> Glob patterns to ignore
|
|
49
|
+
--attachments Also check embedded attachments
|
|
50
|
+
--verbose Show line numbers and full details
|
|
21
51
|
```
|
|
22
52
|
|
|
23
|
-
|
|
53
|
+
### orphans
|
|
24
54
|
|
|
25
|
-
|
|
55
|
+
```bash
|
|
56
|
+
dead-links orphans [options]
|
|
26
57
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| `dead-links report` | Generate a `.md` report file |
|
|
58
|
+
Options:
|
|
59
|
+
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
60
|
+
--ignore <patterns...> Glob patterns to ignore
|
|
61
|
+
--ignore-folders <folders> Exclude folders from report
|
|
62
|
+
--verbose Show full list of orphan notes
|
|
63
|
+
```
|
|
34
64
|
|
|
35
|
-
|
|
65
|
+
### graph
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
dead-links graph [options]
|
|
36
69
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
| `--ignore <patterns...>` | Glob patterns to ignore |
|
|
43
|
-
| `--attachments` | Also check if images/PDFs/files exist |
|
|
44
|
-
| `--ignore-folders <folders...>` | Exclude folders from orphan report |
|
|
45
|
-
| `--quiet` | Only show issues, no stats or summary |
|
|
46
|
-
| `--no-color` | Disable colored output |
|
|
47
|
-
| `--verbose` | Show line numbers and full details |
|
|
70
|
+
Options:
|
|
71
|
+
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
72
|
+
--format <type> Output format: text, json (default: text)
|
|
73
|
+
--ignore <patterns...> Glob patterns to ignore
|
|
74
|
+
```
|
|
48
75
|
|
|
49
|
-
|
|
76
|
+
### report
|
|
50
77
|
|
|
51
78
|
```bash
|
|
52
|
-
|
|
53
|
-
dead-links scan --vault ./my-vault
|
|
79
|
+
dead-links report [options]
|
|
54
80
|
|
|
55
|
-
|
|
56
|
-
|
|
81
|
+
Options:
|
|
82
|
+
--vault <path> Path to the Obsidian vault (default: current directory)
|
|
83
|
+
--output <file> Output file path (default: dead-links-report.md)
|
|
84
|
+
--ignore <patterns...> Glob patterns to ignore
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Quick Start
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
# Full scan
|
|
91
|
+
npx dead-links scan --vault "my-vault"
|
|
92
|
+
|
|
93
|
+
# Check for broken links only with verbose output
|
|
94
|
+
npx dead-links broken --vault "my-vault" --verbose
|
|
57
95
|
|
|
58
96
|
# Include attachments in the check
|
|
59
|
-
dead-links scan --vault
|
|
97
|
+
npx dead-links scan --vault "my-vault" --attachments
|
|
60
98
|
|
|
61
99
|
# Ignore noisy folders from orphan report
|
|
62
|
-
dead-links scan --vault
|
|
100
|
+
npx dead-links scan --vault "my-vault" --ignore-folders Films Diary Books
|
|
63
101
|
|
|
64
102
|
# JSON output for scripts/CI
|
|
65
|
-
dead-links scan --vault
|
|
103
|
+
npx dead-links scan --vault "my-vault" --format json
|
|
66
104
|
|
|
67
105
|
# Generate markdown report
|
|
68
|
-
dead-links report --vault
|
|
106
|
+
npx dead-links report --vault "my-vault" --output report.md
|
|
69
107
|
|
|
70
108
|
# Ignore patterns
|
|
71
|
-
dead-links scan --vault
|
|
109
|
+
npx dead-links scan --vault "my-vault" --ignore "**/Templates/**" "**/.trash/**"
|
|
72
110
|
|
|
73
111
|
# Quiet mode (only issues)
|
|
74
|
-
dead-links scan --vault
|
|
112
|
+
npx dead-links scan --vault "my-vault" --quiet
|
|
113
|
+
|
|
114
|
+
# Disable colors
|
|
115
|
+
npx dead-links scan --vault "my-vault" --no-color
|
|
116
|
+
|
|
117
|
+
# Show orphan notes list
|
|
118
|
+
npx dead-links orphans --vault "my-vault" --verbose
|
|
75
119
|
```
|
|
76
120
|
|
|
77
121
|
## Output Format
|
|
@@ -133,15 +177,5 @@ Exit code is `0` if no issues found, `1` if issues exist. Perfect for CI pipelin
|
|
|
133
177
|
- `![[image.png]]` - Embeds
|
|
134
178
|
- `[text](file.md)` - Markdown links
|
|
135
179
|
|
|
136
|
-
## Development
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
pnpm install
|
|
140
|
-
pnpm run build
|
|
141
|
-
pnpm test
|
|
142
|
-
pnpm run lint
|
|
143
|
-
```
|
|
144
|
-
|
|
145
180
|
## License
|
|
146
|
-
|
|
147
181
|
MIT
|
package/dist/index.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dead-links",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "CLI tool to scan Obsidian vaults for broken links, orphan notes, and connection graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -9,13 +9,6 @@
|
|
|
9
9
|
"files": [
|
|
10
10
|
"dist"
|
|
11
11
|
],
|
|
12
|
-
"scripts": {
|
|
13
|
-
"build": "tsup",
|
|
14
|
-
"dev": "tsup --watch",
|
|
15
|
-
"test": "vitest",
|
|
16
|
-
"lint": "eslint .",
|
|
17
|
-
"format": "prettier --write ."
|
|
18
|
-
},
|
|
19
12
|
"keywords": [
|
|
20
13
|
"obsidian",
|
|
21
14
|
"vault",
|
|
@@ -37,17 +30,18 @@
|
|
|
37
30
|
"url": "https://github.com/offluisangel/dead-links/issues"
|
|
38
31
|
},
|
|
39
32
|
"engines": {
|
|
40
|
-
"node": ">=
|
|
33
|
+
"node": ">=22.0.0"
|
|
41
34
|
},
|
|
42
|
-
"packageManager": "pnpm@11.0.8",
|
|
43
35
|
"dependencies": {
|
|
36
|
+
"commander": "^14.0.3",
|
|
37
|
+
"fast-glob": "^3.3.3",
|
|
38
|
+
"gray-matter": "^4.0.3",
|
|
44
39
|
"ora": "^9.4.0"
|
|
45
40
|
},
|
|
46
41
|
"devDependencies": {
|
|
47
42
|
"@eslint/js": "^10.0.1",
|
|
48
43
|
"@types/node": "^25.8.0",
|
|
49
44
|
"chalk": "^5.6.2",
|
|
50
|
-
"commander": "^14.0.3",
|
|
51
45
|
"eslint": "^10.4.0",
|
|
52
46
|
"eslint-config-prettier": "^10.1.8",
|
|
53
47
|
"fast-glob": "^3.3.3",
|
|
@@ -57,5 +51,12 @@
|
|
|
57
51
|
"tsup": "^8.5.1",
|
|
58
52
|
"typescript": "^6.0.3",
|
|
59
53
|
"vitest": "^4.1.6"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "tsup",
|
|
57
|
+
"dev": "tsup --watch",
|
|
58
|
+
"test": "vitest",
|
|
59
|
+
"lint": "eslint .",
|
|
60
|
+
"format": "prettier --write ."
|
|
60
61
|
}
|
|
61
|
-
}
|
|
62
|
+
}
|