> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prpm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Collections

> Bundle multiple packages together

# Collections

Collections are curated bundles of packages that work together for specific development workflows.

## What are Collections?

Instead of installing packages one by one:

```bash theme={null}
prpm install typescript-strict
prpm install @username/react-best-practices
prpm install tailwind-config
prpm install testing-patterns
```

You can install a collection:

```bash theme={null}
prpm install collections/my-react-setup
```

## Creating Collections

Collections are defined in your prpm.json using the `collections` array:

```json theme={null}
{
  "name": "my-prompts-repo",
  "author": "Your Name",
  "license": "MIT",
  "collections": [
    {
      "id": "react-complete",
      "name": "Complete React Setup",
      "description": "Full React development setup with TypeScript and testing",
      "version": "1.0.0",
      "category": "development",
      "tags": ["react", "typescript", "testing"],
      "packages": [
        {
          "packageId": "typescript-strict",
          "version": "^1.0.0",
          "required": true,
          "reason": "Enforces strict type checking"
        },
        {
          "packageId": "@username/react-best-practices",
          "version": "^2.0.0",
          "required": true
        },
        {
          "packageId": "tailwind-config",
          "version": "^1.5.0",
          "required": false,
          "reason": "Optional Tailwind CSS setup"
        }
      ]
    }
  ]
}
```

## Version Ranges

Specify how packages should be updated:

* `^1.0.0` - Compatible with 1.x.x (recommended)
* `~1.2.0` - Compatible with 1.2.x
* `1.0.0` - Exact version only
* `latest` - Always use latest version

## Required vs Optional Packages

Mark packages as optional so users can skip them:

```json theme={null}
{
  "packageId": "storybook-setup",
  "version": "^1.0.0",
  "required": false,
  "reason": "Optional Storybook configuration"
}
```

Install without optional packages:

```bash theme={null}
prpm install collections/react-complete --skip-optional
```

## Publishing Collections

Collections are published alongside packages:

```bash theme={null}
prpm publish
```

Or publish only a specific collection:

```bash theme={null}
prpm publish --collection react-complete
```

## Use Cases

### Starter Kits

Bundle everything needed for new projects:

```json theme={null}
{
  "id": "nextjs-starter",
  "name": "Next.js Starter",
  "description": "Complete Next.js setup with TypeScript and Tailwind",
  "packages": [...]
}
```

### Team Standards

Share team development standards:

```json theme={null}
{
  "id": "acme-standards",
  "name": "ACME Corp Standards",
  "description": "Company development standards",
  "packages": [...]
}
```

### Technology Stacks

Bundle complete technology stacks:

```json theme={null}
{
  "id": "python-ml-stack",
  "name": "Python ML Stack",
  "description": "Machine learning development stack",
  "packages": [...]
}
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Publishing Collections" icon="upload" href="/publishing/collections">
    Learn how to publish your collections
  </Card>

  <Card title="Manifest Reference" icon="file-code" href="/publishing/manifest">
    Complete collection schema
  </Card>
</CardGroup>
