watchdocs 0.1.5 → 0.1.6

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,117 +1,132 @@
1
- # WatchDocs CLI
2
-
3
- A lightweight CLI tool that scans a project for dependencies and returns their official documentation URLs as structured JSON — 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
-
34
- ---
35
-
36
- ### `watchdocs lookup`
37
-
38
- Look up a single package by name without needing a manifest file.
39
-
40
- ```bash
41
- watchdocs lookup express --ecosystem npm
42
- watchdocs lookup github.com/spf13/cobra --ecosystem go
43
- watchdocs lookup requests --ecosystem pip --slim
44
- ```
45
-
46
- | Flag | Description |
47
- |---|---|
48
- | `--ecosystem <eco>` | Required — one of: `npm`, `go`, `pip`, `cargo`, `pub`, `maven` |
49
- | `--slim` | Return only `name` and `docUrl` |
50
-
51
- ---
52
-
53
- ## Output
54
-
55
- ```json
56
- {
57
- "scanned": ["go.mod", "package.json"],
58
- "total": 5,
59
- "results": [
60
- {
61
- "name": "express",
62
- "version": "^4.18.0",
63
- "ecosystem": "npm",
64
- "type": "prod",
65
- "docUrl": "https://expressjs.com",
66
- "status": "resolved"
67
- }
68
- ]
69
- }
70
- ```
71
-
72
- `status` is either `"resolved"` or `"not_found"`.
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
- ## Building from Source
90
-
91
- ### Prerequisites
92
- - [Go](https://go.dev/doc/install) 1.21+
93
-
94
- ```bash
95
- git clone https://github.com/prohv/watchdocs-cli
96
- cd watchdocs-cli
97
- go build -o watchdocs .
98
- ```
99
-
100
- ---
101
-
102
- ## Project Structure
103
-
104
- ```
105
- watchdocs-cli/
106
- ├── cmd/ # CLI commands (scan, lookup)
107
- ├── internal/
108
- │ ├── scanner/ # Recursive manifest file detection
109
- │ ├── parser/ # Per-ecosystem manifest parsers
110
- │ ├── resolver/ # Per-ecosystem online resolvers
111
- │ └── models/ # Shared types (Dependency, DocResult)
112
- ├── bin/
113
- │ └── watchdocs.js # npm binary shim
114
- ├── binaries/ # Pre-built platform binaries (not in git)
115
- ├── package.json
116
- └── main.go
117
- ```
1
+ # WatchDocs CLI
2
+
3
+ A lightweight CLI tool that scans a project for dependencies and returns their official documentation URLs as structured JSON — 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
+ | `--format, -f <format>` | Output format: `json` (default) or `list` |
36
+
37
+ ---
38
+
39
+ ### `watchdocs lookup`
40
+
41
+ Look up a single package by name without needing a manifest file.
42
+
43
+ ```bash
44
+ watchdocs lookup express --ecosystem npm
45
+ watchdocs lookup github.com/spf13/cobra --ecosystem go
46
+ watchdocs lookup requests --ecosystem pip --slim
47
+ ```
48
+
49
+ | Flag | Description |
50
+ |---|---|
51
+ | `--ecosystem <eco>` | Required — one of: `npm`, `go`, `pip`, `cargo`, `pub`, `maven` |
52
+ | `--slim` | Return only `name` and `docUrl` |
53
+ | `--clear-cache` | Clear the local cache before looking up |
54
+ | `--no-cache` | Disable reading and writing to the local cache |
55
+ | `--format, -f <format>` | Output format: `json` (default) or `list` |
56
+
57
+ ---
58
+
59
+ ## Output
60
+
61
+ ```json
62
+ {
63
+ "scanned": ["go.mod", "package.json"],
64
+ "total": 5,
65
+ "results": [
66
+ {
67
+ "name": "express",
68
+ "version": "^4.18.0",
69
+ "ecosystem": "npm",
70
+ "type": "prod",
71
+ "docUrl": "https://expressjs.com",
72
+ "status": "resolved"
73
+ }
74
+ ]
75
+ }
76
+ ```
77
+
78
+ `status` is either `"resolved"` or `"not_found"`.
79
+
80
+ ---
81
+
82
+ ## Supported Ecosystems
83
+
84
+ | Ecosystem | Manifest files | Registry |
85
+ |---|---|---|
86
+ | `npm` | `package.json` | registry.npmjs.org |
87
+ | `go` | `go.mod` | proxy.golang.org / pkg.go.dev |
88
+ | `pip` | `requirements.txt`, `pyproject.toml`, `uv.lock` | pypi.org |
89
+ | `cargo` | `Cargo.toml` | crates.io |
90
+ | `pub` | `pubspec.yaml` | pub.dev |
91
+ | `maven` | `pom.xml` | search.maven.org |
92
+ | `nuget` | `*.csproj`, `packages.config`, `Directory.Packages.props` | api.nuget.org |
93
+ | `composer` | `composer.json` | packagist.org |
94
+ | `swift` | `Package.resolved` | github.com / swiftpackageindex.com |
95
+
96
+ ---
97
+
98
+ ## Building from Source
99
+
100
+ ### Prerequisites
101
+ - [Go](https://go.dev/doc/install) 1.21+
102
+
103
+ ```bash
104
+ git clone https://github.com/prohv/watchdocs-cli
105
+ cd watchdocs-cli
106
+ go build -o watchdocs .
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Project Structure
112
+
113
+ ```
114
+ watchdocs-cli/
115
+ ├── cmd/ # CLI commands (scan, lookup)
116
+ ├── internal/
117
+ │ ├── scanner/ # Recursive manifest file detection
118
+ │ ├── parser/ # Per-ecosystem manifest parsers
119
+ │ ├── resolver/ # Per-ecosystem online resolvers
120
+ │ └── models/ # Shared types (Dependency, DocResult)
121
+ ├── bin/
122
+ │ └── watchdocs.js # npm binary shim
123
+ ├── binaries/ # Pre-built platform binaries (not in git)
124
+ ├── package.json
125
+ └── main.go
126
+ ```
127
+
128
+ ---
129
+
130
+ ## GitHub Repository
131
+
132
+ 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.5",
3
+ "version": "0.1.6",
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",