intersystems / intersystems/ipm
Native doc command for IPM CLI
- Dominant language
- ObjectScript
- Stars
- 41
- Forks
- 29
- Avg merge
- 23h 54m
- Merged PRs (30d)
- 4
Description
## Problem Statement
Currently, after installing a package via IPM, there is no standardized way to access documentation. Users must manually switch to a browser, search GitHub, or dig through the `module.xml` and class code to understand how to use the module. This creates a "discovery gap" that slows down development.
## Proposed Solution
Introduce a native `doc` (or `docs`) command to the IPM shell. This command will act as an intelligent router to open or display documentation based on the module's metadata and the user's environment.
**Usage:**
```objectscript
zpm:USER>doc
```
## Implementation Logic (The "Smart Router")
The command should follow a prioritized waterfall approach to ensure it always provides value:
1. **Local Module Documentation (Highest Priority):**
* Search for a specific documentation class within the module (e.g., `.Docs.cls`).
* If found, calculate the local web server URL (e.g., `http://localhost:52773/csp/namespace/Package.Docs.cls`).
2. **Manifest Metadata:**
* If no local class exists, check `module.xml` for a `` or `` tag.
3. **Registry Fallback:**
* Fetch the repository URL from the IPM registry metadata.
## Benefits to the Ecosystem
* **Portability:** Encourages developers to ship documentation *with* their code (via CSP), making it available in air-gapped or offline environments.
* **Live Documentation:** By using CSP pages, documentation can be "live"—reflecting the actual configuration and version of the module installed in that specific na# 6. Proposed `module.xml` Extension
We could optionally introduce a standard attribute to make this explicit:
```xml
...
```
Contributor guide
Assessment
This issue has not been assessed yet.