Publishing Collections
Learn how to create and publish collections that bundle multiple packages together.What are Collections?
Collections allow users to install multiple related packages with a single command:Creating a Collection
Collections are defined in prpm.json using thecollections array:
Collection Fields
Required Fields
| Field | Description |
|---|---|
id | Unique identifier (kebab-case) |
name | Display name |
description | What this collection provides |
packages | Array of packages to include |
Optional Fields
| Field | Description |
|---|---|
version | Semantic version (default: 1.0.0) |
category | Category (development, testing, etc.) |
tags | Tags for discoverability |
icon | Emoji or icon |
Package Entries
Each package in thepackages array:
Version Ranges
^1.0.0- Compatible with 1.x.x (recommended)~1.2.0- Compatible with 1.2.x1.0.0- Exact version onlylatest- Always use latest
Required vs Optional
Optional packages can be skipped during installation:Publishing Collections
Publish All
Publish all packages and collections:Publish Specific Collection
Publish only one collection:Collections with Packages
You can define both packages and collections in the same prpm.json:- Publish your own packages
- Create collections that bundle your packages with others from the registry
Collection Categories
Common categories:development- General development setupstesting- Testing configurationsdeployment- Deployment workflowsdata-science- Data science and MLdevops- DevOps and infrastructuredesign- Design and UI/UXdocumentation- Documentation toolssecurity- Security patternsperformance- Performance optimization
Best Practices
Use Semantic Version Ranges
Provide Clear Descriptions
Use Relevant Tags
Add Reasons
Explain why each package is included:Deprecating Collections
If you need to deprecate a collection (e.g., it’s been superseded by a better alternative), use thedeprecate command:
What Happens When You Deprecate
- The collection is hidden from search results
- Users who have the collection installed will see a deprecation warning
- The collection can still be installed directly by name
- All versions of the collection are marked as deprecated