Native doc command for IPM CLI

Open
#1,042 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Domain
cli

Research direction

Start with the IPM shell command entry point and inspect how installed modules, module.xml metadata, and IPM registry metadata are accessed. Trace the proposed priority from a module-specific Docs class to Documentation or Homepage metadata and then the registry repository URL. Done means the doc command accepts a package name and follows that fallback order to provide a documentation destination.

Written by the indexing model from the issue text.

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:

zpm:USER>doc <package-name>

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., <Module>.Docs.cls).
  • If found, calculate the local web server URL (e.g., http://localhost:52773/csp/namespace/Package.Docs.cls).
  1. Manifest Metadata:
  • If no local class exists, check module.xml for a <Documentation> or <Homepage> tag.
  1. 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:

<Module>
  ...
  <Documentation class="irisjwt.docs" />
  <Documentation url="https://docs.myproject.com" />
</Module>
Dominant language
ObjectScript
Stars
41
Forks
33
Avg merge
23h 20m
Merged PRs (30d)
29

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from intersystems/ipm

All issues in intersystems/ipm

Similar issues

More CLI issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.