Package Management API
Relevant source files
The following files were used as context for generating this wiki page:
- packages/cli/src/commands/init.ts
- CONTRIBUTING.md
- packages/webapp/src/app/blog/format-specifications-guide/page.tsx
- packages/webapp/src/app/blog/agents-md-deep-dive/page.tsx
- packages/webapp/public/blog/prpm-complete-feature-guide.md
- packages/webapp/src/app/blog/write-once-distribute-everywhere/page.tsx
- AGENTS.md
- packages/webapp/src/app/blog/copilot-deep-dive/page.tsx
The Prompt Package Manager (PRPM) provides a universal registry and package management system for AI coding tools, including prompts, agents, skills, and rules. It is designed to address the fragmentation of formats across different AI-powered IDEs and assistants like Cursor, Claude, Continue, and GitHub Copilot. The core philosophy is "Write Once, Distribute Everywhere," allowing authors to publish a package in a single format, which can then be installed and used in any supported editor through automatic, on-the-fly format conversion.
This system enables developers to discover, share, version, and manage AI development artifacts with an experience similar to traditional package managers like npm. It supports both individual packages and "Collections," which are bundles of related packages for complete workflow setups.
Sources: packages/webapp/src/app/blog/introducing-prpm/page.tsx:29-43, packages/webapp/src/app/blog/write-once-distribute-everywhere/page.tsx:40-47, packages/webapp/public/blog/prpm-complete-feature-guide.md:10-21
Package Lifecycle
The lifecycle of a PRPM package follows standard package management practices, from creation to consumption.
This diagram illustrates the typical workflow for a package author and consumer within the PRPM ecosystem.
Sources: CONTRIBUTING.md:12-18, packages/webapp/public/blog/prpm-complete-feature-guide.md:330-349
- Initialization: A new package is scaffolded using
prpm init. This command interactively creates apackage.prpm.jsonmanifest and can generate example files based on the chosen format. It also features a "smart init" mode that can detect existing package files and reconcile them with a manifest.
Sources: packages/cli/src/commands/init.ts:18-28, 410-413 - Publishing: Once the package content is ready, the author publishes it to the PRPM registry using
prpm publish.
Sources: CONTRIBUTING.md:18 - Discovery: Users can find packages through the web interface or via the CLI using
prpm search(keyword-based) orprpm ai-search(semantic, intent-based).
Sources: packages/webapp/public/blog/prpm-complete-feature-guide.md:50-65 - Installation: A user installs a package with
prpm install <package-name>. The CLI automatically detects the user's editor and converts the package to the appropriate format.
Sources: packages/webapp/public/blog/prpm-complete-feature-guide.md:10-21
Package Manifest
The package.prpm.json file is the manifest that defines a package's metadata. The prpm init command assists in its creation.
Sources: CONTRIBUTING.md:21, packages/cli/src/commands/init.ts:18-28
| Field | Type | Description | Source |
|---|---|---|---|
name | string | The unique name of the package. | CONTRIBUTING.md:24 |
version | string | The semantic version of the package. | CONTRIBUTING.md:25 |
description | string | A brief summary of what the package does. | CONTRIBUTING.md:26 |
format | string | The native format of the package (e.g., cursor, claude, agents.md). | packages/cli/src/commands/init.ts:51 |
subtype | string | The specific type within the format (e.g., rule, skill, agent). | packages/cli/src/commands/init.ts:52 |
category | string | The category the package belongs to (e.g., code-quality, testing). | CONTRIBUTING.md:28 |
tags | string[] | An array of keywords to aid discovery. | CONTRIBUTING.md:29 |
author | string | The name and/or email of the package author. | CONTRIBUTING.md:30 |
license | string | The software license for the package (e.g., "MIT"). | CONTRIBUTING.md:31 |
files | string[] | An array of file paths that constitute the package content. | packages/cli/src/commands/init.ts:32-33 |
Example package.prpm.json
{
"name": "my-awesome-rule",
"version": "1.0.0",
"description": "A helpful Cursor rule for...",
"type": "cursor",
"category": "code-quality",
"tags": ["typescript", "testing", "best-practices"],
"author": "your-username",
"license": "MIT",
"content": "./rule.md"
}
Sources: CONTRIBUTING.md:23-34
Package Formats and Types
PRPM is designed to be format-agnostic, supporting a wide range of formats used by different AI coding assistants. This is a cornerstone of the "Write Once, Distribute Everywhere" philosophy.
Sources: packages/webapp/src/app/blog/write-once-distribute-everywhere/page.tsx:40-47
Supported Formats
The system supports conversion between 8 major formats, each with its own structure and conventions.
| Format | File Location(s) | Frontmatter | Key Features |
|---|---|---|---|
| Cursor | .cursor/rules | Required | 4 rule types, MDC format |
| Claude Code | .claude/{agents,skills,commands}/ | Required | allowed-tools, model selection, hooks |
| Continue | .continue/rules/*.md | Required | Globs, regex matching, alwaysApply logic |
| Windsurf | .windsurf/rules | None | Plain markdown, 12k character limit |
| GitHub Copilot | .github/copilot-instructions.md | Optional | Two-tier system (repo-wide, path-specific) |
| Kiro Steering | .kiro/steering/*.md | Optional | Inclusion modes, foundational types |
| Kiro Hooks | .kiro/hooks/*.json | N/A (JSON) | Event-driven file automations |
| agents.md | agents.md | None | Open standard, plain markdown |
Sources: packages/webapp/src/app/blog/format-specifications-guide/page.tsx:102-167
Package Types
Packages can be categorized by their function, such as rule, agent, skill, prompt, and more. These types help define the package's purpose.
Sources: CONTRIBUTING.md:36-43
Format Conversion System
A core feature of PRPM is its ability to perform "lossless, semantically-aware conversions" between formats. When a user installs a package, PRPM converts it from its source format to the format required by the user's target editor.
This diagram shows how a package published in one format is converted to another upon installation.
Sources: packages/webapp/src/app/blog/write-once-distribute-everywhere/page.tsx:54-60, packages/webapp/src/app/blog/format-specifications-guide/page.tsx:610-622
The conversion process involves:
- Parsing the source package into a Canonical Format.
- Mapping equivalent capabilities, such as file pattern matching, across formats.
- Preserving format-specific features where possible, often by adding them as comments or documentation in the converted output.
- Validating the output against the target format's JSON schema to ensure correctness.
Sources: packages/webapp/src/app/blog/write-once-distribute-everywhere/page.tsx:120-150, packages/webapp/src/app/blog/format-specifications-guide/page.tsx:612-622
The agents.md Standard
agents.md is an open, tool-agnostic format for providing project-specific guidance to AI agents. It was created through a collaboration involving OpenAI and Google. Its design philosophy is "radical simplicity."
Key characteristics:
- Single File: A single
agents.mdfile at the project root. - Plain Markdown: No special syntax, extensions, or required frontmatter.
- Human-First: Designed to be as readable as standard documentation.
- Tool-Agnostic: Supported by multiple tools, including OpenAI Codex, GitHub Copilot, and Google Gemini Code Assist, avoiding vendor lock-in.
While there are no required fields, recommended sections include:
- Project Overview
- Tech Stack
- Development Setup
- Code Style Guidelines
- Testing Instructions
- Security Practices
GitHub Copilot supports agents.md in addition to its native .github/copilot-instructions.md, and will merge instructions from both if they exist.
Sources: packages/webapp/src/app/blog/agents-md-deep-dive/page.tsx:40-46, 61-80, 150-175, packages/webapp/src/app/blog/copilot-deep-dive/page.tsx:55-66
Collections
Collections are bundles of related packages that can be installed with a single command. They are designed to provide complete setups for specific workflows or technology stacks (e.g., a "Next.js Professional Setup").
A collection is defined by a collection.prpm.json manifest, which lists the package IDs to be included.
Example collection.prpm.json
{
"scope": "@collection",
"id": "nextjs-pro",
"name": "Next.js Professional Setup",
"version": "1.0.0",
"description": "Complete Next.js development environment",
"category": "frontend",
"packages": [
{
"id": "react-best-practices",
"version": "^1.0.0",
"required": true
},
{
"id": "typescript-strict",
"version": "^1.0.0",
"required": true
}
]
}
Sources: CONTRIBUTING.md:69-93, packages/webapp/public/blog/prpm-complete-feature-guide.md:78-90
Summary
The PRPM package management system provides the foundational infrastructure for a cross-platform ecosystem of AI coding tools. By abstracting away format differences through a canonical representation and on-the-fly conversion, it allows authors to reach a wider audience and enables users to access a larger pool of tools, regardless of their preferred AI assistant. Key components like the package manifest, collections, and support for open standards like agents.md create a robust and flexible system for distributing AI-executable knowledge.
Sources: packages/webapp/src/app/blog/distributable-intelligence/page.tsx:40-50, packages/webapp/src/app/blog/introducing-prpm/page.tsx:46-51