watchdocs 0.1.5 → 0.1.7
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 +126 -117
- package/binaries/watchdocs-darwin-arm64 +0 -0
- package/binaries/watchdocs-linux-x64 +0 -0
- package/binaries/watchdocs-win32-x64.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,117 +1,126 @@
|
|
|
1
|
-
# WatchDocs CLI
|
|
2
|
-
|
|
3
|
-
A lightweight CLI tool that scans a project for dependencies and returns their official documentation URLs as
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npx watchdocs scan
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
No installation needed. Works via `npx` anywhere Node.js is available.
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Commands
|
|
16
|
-
|
|
17
|
-
### `watchdocs scan`
|
|
18
|
-
|
|
19
|
-
Recursively scans the current directory for manifest files, parses dependencies, and resolves official doc URLs from their respective registries.
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
watchdocs scan
|
|
23
|
-
watchdocs scan --path ./frontend
|
|
24
|
-
watchdocs scan --ecosystem npm,go
|
|
25
|
-
watchdocs scan --slim
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
| Flag | Description |
|
|
29
|
-
|---|---|
|
|
30
|
-
| `--path <dir>` | Target a specific directory instead of cwd |
|
|
31
|
-
| `--ecosystem <list>` | Filter by ecosystem(s), comma-separated |
|
|
32
|
-
| `--slim` | Return only `name` and `docUrl` per result (saves tokens) |
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
watchdocs lookup
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
## Supported Ecosystems
|
|
77
|
-
|
|
78
|
-
| Ecosystem | Manifest files | Registry |
|
|
79
|
-
|---|---|---|
|
|
80
|
-
| `npm` | `package.json` | registry.npmjs.org |
|
|
81
|
-
| `go` | `go.mod` | proxy.golang.org / pkg.go.dev |
|
|
82
|
-
| `pip` | `requirements.txt`, `pyproject.toml`, `uv.lock` | pypi.org |
|
|
83
|
-
| `cargo` | `Cargo.toml` | crates.io |
|
|
84
|
-
| `pub` | `pubspec.yaml` | pub.dev |
|
|
85
|
-
| `maven` | `pom.xml` | search.maven.org |
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
│
|
|
112
|
-
├──
|
|
113
|
-
│
|
|
114
|
-
|
|
115
|
-
├──
|
|
116
|
-
└──
|
|
117
|
-
|
|
1
|
+
# WatchDocs CLI
|
|
2
|
+
|
|
3
|
+
A lightweight CLI tool that scans a project for dependencies and returns their official documentation URLs as Markdown — built for AI agents and developers.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx watchdocs scan
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
No installation needed. Works via `npx` anywhere Node.js is available.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## Commands
|
|
16
|
+
|
|
17
|
+
### `watchdocs scan`
|
|
18
|
+
|
|
19
|
+
Recursively scans the current directory for manifest files, parses dependencies, and resolves official doc URLs from their respective registries.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
watchdocs scan
|
|
23
|
+
watchdocs scan --path ./frontend
|
|
24
|
+
watchdocs scan --ecosystem npm,go
|
|
25
|
+
watchdocs scan --slim
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
| Flag | Description |
|
|
29
|
+
|---|---|
|
|
30
|
+
| `--path <dir>` | Target a specific directory instead of cwd |
|
|
31
|
+
| `--ecosystem <list>` | Filter by ecosystem(s), comma-separated |
|
|
32
|
+
| `--slim` | Return only `name` and `docUrl` per result (saves tokens) |
|
|
33
|
+
| `--clear-cache` | Clear the local cache before scanning |
|
|
34
|
+
| `--no-cache` | Disable reading and writing to the local cache |
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
### `watchdocs lookup`
|
|
39
|
+
|
|
40
|
+
Look up a single package by name without needing a manifest file.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
watchdocs lookup express --ecosystem npm
|
|
44
|
+
watchdocs lookup github.com/spf13/cobra --ecosystem go
|
|
45
|
+
watchdocs lookup requests --ecosystem pip --slim
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
| Flag | Description |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `--ecosystem <eco>` | Required — one of: `npm`, `go`, `pip`, `cargo`, `pub`, `maven` |
|
|
51
|
+
| `--slim` | Return only `name` and `docUrl` |
|
|
52
|
+
| `--clear-cache` | Clear the local cache before looking up |
|
|
53
|
+
| `--no-cache` | Disable reading and writing to the local cache |
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Output
|
|
58
|
+
|
|
59
|
+
Without `--slim`:
|
|
60
|
+
```markdown
|
|
61
|
+
### Scan Summary
|
|
62
|
+
- **Scanned Manifests:** go.mod, package.json
|
|
63
|
+
- **Total Dependencies:** 5
|
|
64
|
+
|
|
65
|
+
### Results
|
|
66
|
+
- **express** - [docs](https://expressjs.com) (`^4.18.0`) — `npm` (`prod`) — `resolved`
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
With `--slim` (recommended for agents to save context tokens):
|
|
70
|
+
```markdown
|
|
71
|
+
- **express** - [docs](https://expressjs.com)
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Supported Ecosystems
|
|
77
|
+
|
|
78
|
+
| Ecosystem | Manifest files | Registry |
|
|
79
|
+
|---|---|---|
|
|
80
|
+
| `npm` | `package.json` | registry.npmjs.org |
|
|
81
|
+
| `go` | `go.mod` | proxy.golang.org / pkg.go.dev |
|
|
82
|
+
| `pip` | `requirements.txt`, `pyproject.toml`, `uv.lock` | pypi.org |
|
|
83
|
+
| `cargo` | `Cargo.toml` | crates.io |
|
|
84
|
+
| `pub` | `pubspec.yaml` | pub.dev |
|
|
85
|
+
| `maven` | `pom.xml` | search.maven.org |
|
|
86
|
+
| `nuget` | `*.csproj`, `packages.config`, `Directory.Packages.props` | api.nuget.org |
|
|
87
|
+
| `composer` | `composer.json` | packagist.org |
|
|
88
|
+
| `swift` | `Package.resolved` | github.com / swiftpackageindex.com |
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Building from Source
|
|
93
|
+
|
|
94
|
+
### Prerequisites
|
|
95
|
+
- [Go](https://go.dev/doc/install) 1.21+
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git clone https://github.com/prohv/watchdocs-cli
|
|
99
|
+
cd watchdocs-cli
|
|
100
|
+
go build -o watchdocs .
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Project Structure
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
watchdocs-cli/
|
|
109
|
+
├── cmd/ # CLI commands (scan, lookup)
|
|
110
|
+
├── internal/
|
|
111
|
+
│ ├── scanner/ # Recursive manifest file detection
|
|
112
|
+
│ ├── parser/ # Per-ecosystem manifest parsers
|
|
113
|
+
│ ├── resolver/ # Per-ecosystem online resolvers
|
|
114
|
+
│ └── models/ # Shared types (Dependency, DocResult)
|
|
115
|
+
├── bin/
|
|
116
|
+
│ └── watchdocs.js # npm binary shim
|
|
117
|
+
├── binaries/ # Pre-built platform binaries (not in git)
|
|
118
|
+
├── package.json
|
|
119
|
+
└── main.go
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## GitHub Repository
|
|
125
|
+
|
|
126
|
+
Check out the source code, open issues, or contribute at [github.com/prohv/watchdocs-cli](https://github.com/prohv/watchdocs-cli).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "watchdocs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "An LLM-friendly NPM CLI tool for AI agents and developers to scan project dependencies and instantly extract official documentation URLs.",
|
|
5
5
|
"keywords": ["watchdocs", "ai-agents", "llm-tools", "cli-tool", "dependency-scanner", "documentation-finder", "npm-cli", "project-scan", "agentic"],
|
|
6
6
|
"license": "MIT",
|