apm view
Show local metadata for an installed package, or query package versions without cloning.
Synopsis
Section titled “Synopsis”apm view PACKAGE [FIELD] [OPTIONS]apm view --file PATH [-g]apm info is accepted as a hidden alias for backward compatibility.
Description
Section titled “Description”apm view has two modes, selected by the optional FIELD argument:
- No field — read installed package metadata from
apm_modules/(or$APM_HOME/apm_modules/, default~/.apm/apm_modules/, with-g). Local-only; the package must be installed. versionsfield — query available versions. Git packages list remote tags and branches without requiring a local install. Registry packages list version and published-timestamp columns. See theapm view <package> versionssubcommand below for the full registry-routing precedence and escape-hatch details.
With --file PATH, apm view works the other way round: it starts from one deployed file and reports which package recorded it. See apm view --file PATH.
When PACKAGE matches the NAME@MARKETPLACE pattern, apm view resolves the plugin against the marketplace manifest and prints its entry (name, version, description, source, tags) instead of a Git repository view. This applies whether or not versions is passed.
See apm outdated to compare locked versions against remotes, and apm install to add a package to the manifest.
Subcommands
Section titled “Subcommands”apm view <package>
Section titled “apm view <package>”Reads metadata from the installed copy. Exits non-zero if apm_modules/ is missing or the package is not installed; on a missing package, prints the list of installed packages to help disambiguate.
Output includes: name, version, description, author, source, install path, lockfile ref and commit (when available), context-file counts (skills, prompts, instructions), workflow count, and hook count.
apm view <package> versions
Section titled “apm view <package> versions”Lists available versions for the package. Calls the remote — requires network access.
For git packages, output is a table with name, type (tag or branch), and short commit SHA. For registry packages, output is a version and published-timestamp table. Registry packages are identified by three signals checked in order: (1) the --registry [NAME] flag forces the registry path; (2) a source: registry entry in apm.lock.yaml routes the package to the registry that installed it; (3) a configured default registry causes plain shorthands (e.g., owner/repo) to route to the registry even without a lockfile entry — use a full git URL to override this. Private git repositories require GITHUB_APM_PAT; private registries use the registry token configured for that registry (see authentication).
apm view --file PATH
Section titled “apm view --file PATH”Read-only reverse lookup for one deployed file, such as an installed SKILL.md or a file bundled next to it. It reads the deployment records in apm.lock.yaml ($APM_HOME/apm.lock.yaml, default ~/.apm/apm.lock.yaml, with -g) and matches PATH exactly. It never guesses from skill names, directory prefixes or substrings. A decomposed (NFD) spelling of an accented path, as macOS tools often pass, matches only when the filesystem confirms it is the same file. Unlike apm find, which lists package names (and optionally sources) from deployed_files, it reports the active writer, ref and commit, and the current file status, with exit codes for scripting.
For each matching record it prints:
- Owner — every recorded owner. On a shared path, the last writer is marked
active writerand the otherssurviving owner. - Kind — this project (project-self), a local bundle, a direct dependency, or a transitive dependency and its parent.
- Source, Ref, Commit — for dependencies, as recorded in the lockfile. A replaced dependency shows the replacement source it installs from. Credentials are redacted; control and non-ASCII characters print as
?. - Current file — kept separate from provenance:
matches the recorded deployed hash,modified since deployment,missing, orunverifiable(for example no recorded hash, not a regular file, or a path through a symlink, including a symlinked home or project root, which is not followed).
A modified or missing file still shows its recorded owner. That is recorded provenance, not proof of what upstream ships today.
Run from the project root. PATH may be relative to it or absolute, and must sit under it (under your home directory with -g). Only records for the selected scope are matched. The command makes no network calls and writes nothing: no lockfile migration, repair or ownership adoption.
Exit codes:
| Code | Meaning |
|---|---|
0 | Provenance recorded for this exact path |
1 | No recorded provenance, or a recorded owner (active writer or surviving owner) has no dependency record. The file’s origin is unknown or incomplete; do not treat it as project-owned or safe to edit |
2 | Usage error, path outside the scope root, or missing or unreadable lockfile |
Before editing an installed skill, run this command. If the owner is a dependency, edit that package’s source; apm install can overwrite edits made to the deployed copy. This is advice only: APM does not block writes.
Arguments
Section titled “Arguments”| Argument | Required | Description |
|---|---|---|
PACKAGE | yes, unless --file is used | owner/repo, short repo name (installed only), or NAME@MARKETPLACE for a marketplace plugin |
FIELD | no | Field selector. Only versions is supported today |
Options
Section titled “Options”| Option | Description |
|---|---|
-g, --global | Inspect a package installed in user scope ($APM_HOME/apm_modules/, default ~/.apm/apm_modules/). With --file, read the user-scope lockfile |
--file PATH | Show the recorded owner(s) of one deployed file (read-only, exact path). Cannot be combined with PACKAGE, FIELD or --registry |
--registry [NAME] | List versions from a registry. Omit a value to use the lockfile entry or configured default; provide NAME to force a specific named registry. Only valid with the versions field. |
Examples
Section titled “Examples”Show metadata for an installed package:
apm view microsoft/apm-sample-packageShort-name lookup (resolves against apm_modules/):
apm view apm-sample-packageList git tags and branches without cloning:
apm view microsoft/apm-sample-package versionsList registry versions for an installed registry package:
apm view acme/web-skills versionsList versions from the configured default registry (for an unlocked shorthand):
apm view acme/web-skills versions --registryList versions from a specific named registry:
apm view acme/web-skills versions --registry my-registryForce the git path even when a default registry is configured:
apm view https://github.com/acme/web-skills versionsInspect a package installed at user scope:
apm view microsoft/apm-sample-package -gFind which package deployed an installed skill:
apm view --file .agents/skills/code-review/SKILL.mdExample output:
[i] .agents/skills/code-review/SKILL.md (project scope, from apm.lock.yaml) Target: copilot Owner: acme/review-skills [active writer] Kind: direct dependency Package: review-skills 1.2.0 Source: github.com/acme/review-skills Ref: v1.2.0 Commit: 0123456789abcdef0123456789abcdef01234567 Current file: matches the recorded deployed hash[i] Deployed copy from a dependency. Edit the dependency's source instead; 'apm install' can overwrite edits made here.Inspect a user-scope skill file:
apm view --file ~/.agents/skills/code-review/SKILL.md -gView a marketplace plugin’s manifest entry:
apm view code-review@acme-pluginsRelated
Section titled “Related”apm outdated— compare locked versions against remote tagsapm install— add a package toapm.ymland install itapm find— list the packages whosedeployed_filesinclude a path- Skills — skill names and provenance
Copyright (c) Microsoft Corporation. General documentation: CC-BY-4.0. Software, code examples and OpenAPM: Apache-2.0. See scope and exclusions.