所有命令 · extensions
pm package
Manage package lifecycle in project or global scope.
Installs, explores, manages, diagnoses, adopts, activates, deactivates, and refreshes package-backed pm runtime extensions.
用法
pm package [options] [command] [target]参数
| <target> | Package source, name, or scaffold path | 可选 |
|---|
选项
| --init | Generate a starter package scaffold at target path | 可选 |
|---|---|---|
| --capability <kind> | Starter capability for --init (default: commands) | 可选 |
| --install | Install a package source | 可选 |
| --dry-run | Preview install without writes or activation | 可选 |
| --uninstall | Uninstall an installed package | 可选 |
| --explore | List discovered packages in selected scope | 可选 |
| --manage | List managed packages and updates | 可选 |
| --describe | Show surfaces registered by a loaded package | 可选 |
| --markdown | Render describe as Markdown | 可选 |
| --output <path> | Write Markdown to a file | 可选 |
| --reload | Reload packages without import cache | 可选 |
| --watch | Use watch mode with --reload | 可选 |
| --doctor | Run package diagnostics | 可选 |
| --catalog | List bundled first-party package catalog metadata | 可选 |
| --adopt | Adopt unmanaged package | 可选 |
| --adopt-all | Adopt all unmanaged packages | 可选 |
| --activate | Activate a package in selected scope settings | 可选 |
| --deactivate | Deactivate a package in selected scope settings | 可选 |
| --project | Use project package scope (default) | 可选 |
| --global | Use global package scope | 可选 |
| --gh <github-source> | Install from GitHub shorthand source (owner/repo[/path]) | 可选 |
| --ref <ref> | Git ref/branch/tag for GitHub install sources | 可选 |
| --detail <mode> | Package diagnostics detail mode (summary|deep) | 可选 |
| --trace | Include actionable registration traces in doctor deep diagnostics | 可选 |
| --runtime-probe | Opt-in runtime activation probe for manage output parity | 可选 |
| --fix-managed-state | Adopt unmanaged packages before diagnostics/update checks | 可选 |
| --isolated | Run doctor against project-scope packages only, ignoring global registrations | 可选 |
| --strict-exit | Return non-zero exit when doctor warnings are present (ok=false) | 可选 |
| --declarative | Scaffold the composeExtension blueprint starter (any capability) | 可选 |
示例
pm package install npm:@scope/pm-package --project