How icampana/dsearch works
dsearch is an offline terminal documentation search tool. Users install DevDocs sets, then search all installed sets or scope by document; results can be listed or rendered as text/Markdown, with JSON output for scripting. The graph also covers catalog browsing and installed-set management. Edges follow the sampled CLI orchestration and storage/client implementations; unsampled behavior is not inferred.
Main entry points: root.go Command routing · store.go Local doc store · install.go Install docs · available.go Browse catalog
Components 15
CLI entry
- Executable entry
cmd/dsearch/main.go - Command routing
internal/cli/root.go - XDG paths
internal/config/paths.go - Data migration
internal/config/migrate.go
Catalog management
- Install docs
internal/cli/install.go - Browse catalog
internal/cli/available.go - List installed
internal/cli/list.go - Remove docs
internal/cli/uninstall.go
Search and display
- Fuzzy search
internal/search/engine.go - Content renderer
internal/render/render.go
Documentation data
- DevDocs client
internal/devdocs/client.go - Local doc store
internal/devdocs/store.go
Other components
- Terminal user
- DevDocs service
- Terminal or pipe
Connections 22
- Terminal user → Executable entry: runs command
cmd/dsearch/main.go - Executable entry → Command routing: executes
cmd/dsearch/main.go - Command routing → XDG paths: initializes paths
internal/cli/root.go - Command routing → Data migration: migrates data
internal/cli/root.go - Command routing → Install docs: routes install
internal/cli/root.go - Command routing → Browse catalog: routes browse
internal/cli/root.go - Command routing → List installed: routes list
internal/cli/root.go - Command routing → Remove docs: routes removal
internal/cli/root.go - Install docs → DevDocs client: fetches manifest and docs
internal/cli/install.go - DevDocs client → DevDocs service: requests manifest and content
internal/devdocs/client.go - Install docs → Local doc store: caches and installs
internal/cli/install.go - Browse catalog → Local doc store: loads or caches manifest
internal/cli/available.go - Browse catalog → DevDocs client: fetches manifest
internal/cli/available.go - List installed → Local doc store: reads installed docs
internal/cli/list.go - Remove docs → Local doc store: removes doc set
internal/cli/uninstall.go - Command routing → Local doc store: loads indices and content
internal/cli/root.go - Command routing → Fuzzy search: searches query
internal/cli/root.go - Fuzzy search → Local doc store: uses index entries
internal/search/engine.go - Command routing → Content renderer: renders content
internal/cli/root.go - Command routing → Terminal or pipe: prints results
internal/cli/root.go - Content renderer → Terminal or pipe: returns formatted text
- Terminal user → Terminal or pipe: reads or pipes
README.md