watchdocs
v0.1.8
Published
An LLM-friendly NPM CLI tool for AI agents and developers to scan project dependencies and instantly extract official documentation URLs.
Maintainers
Readme
WatchDocs CLI
A lightweight CLI tool that scans a project for dependencies and returns their official documentation URLs as Markdown — built for AI agents and developers.
Install
npx watchdocs scanNo installation needed. Works via npx anywhere Node.js is available.
Commands
watchdocs scan
Recursively scans the current directory for manifest files, parses dependencies, and resolves official doc URLs from their respective registries.
watchdocs scan
watchdocs scan --path ./frontend
watchdocs scan --ecosystem npm,go
watchdocs scan --detailed| Flag | Description |
|---|---|
| --path <dir> | Target a specific directory instead of cwd |
| --ecosystem <list> | Filter by ecosystem(s), comma-separated |
| --detailed, -d | Show detailed output with package metadata |
| --clear-cache | Clear the local cache before scanning |
| --no-cache | Disable reading and writing to the local cache |
watchdocs lookup
Look up a single package by name without needing a manifest file.
watchdocs lookup express --ecosystem npm
watchdocs lookup github.com/spf13/cobra --ecosystem go
watchdocs lookup requests --ecosystem pip --detailed| Flag | Description |
|---|---|
| --ecosystem <eco> | Required — one of: npm, go, pip, cargo, pub, maven |
| --detailed, -d | Show detailed output with package metadata |
| --clear-cache | Clear the local cache before looking up |
| --no-cache | Disable reading and writing to the local cache |
Output
With --detailed (or -d):
### Scan Summary
- **Scanned Manifests:** go.mod, package.json
- **Total Dependencies:** 5
### Results
- **express** - https://expressjs.com (`^4.18.0`) — `npm` (`prod`) — `resolved`Without --detailed (Default - recommended for agents to save context tokens):
- **express** - https://expressjs.comSupported Ecosystems
| Ecosystem | Manifest files | Registry |
|---|---|---|
| npm | package.json | registry.npmjs.org |
| go | go.mod | proxy.golang.org / pkg.go.dev |
| pip | requirements.txt, pyproject.toml, uv.lock | pypi.org |
| cargo | Cargo.toml | crates.io |
| pub | pubspec.yaml | pub.dev |
| maven | pom.xml | search.maven.org |
| nuget | *.csproj, packages.config, Directory.Packages.props | api.nuget.org |
| composer | composer.json | packagist.org |
| swift | Package.resolved | github.com / swiftpackageindex.com |
Building from Source
Prerequisites
- Go 1.21+
git clone https://github.com/prohv/watchdocs-cli
cd watchdocs-cli
go build -o watchdocs .Project Structure
watchdocs-cli/
├── cmd/ # CLI commands (scan, lookup)
├── internal/
│ ├── scanner/ # Recursive manifest file detection
│ ├── parser/ # Per-ecosystem manifest parsers
│ ├── resolver/ # Per-ecosystem online resolvers
│ └── models/ # Shared types (Dependency, DocResult)
├── bin/
│ └── watchdocs.js # npm binary shim
├── binaries/ # Pre-built platform binaries (not in git)
├── package.json
└── main.goGitHub Repository
Check out the source code, open issues, or contribute at github.com/prohv/watchdocs-cli.
