Discovering Packages (search, ai-search, info)
Relevant source files
The following files were used as context for generating this wiki page:- packages/cli/src/commands/search.ts
- packages/cli/src/commands/ai-search.ts
- packages/cli/src/commands/info.ts
- packages/cli/src/commands/trending.ts
- packages/webapp/src/app/blog/prpm-complete-feature-guide.md
- packages/webapp/src/app/blog/introducing-use-cases/page.tsx
- packages/cli/src/commands/init.ts
The prpm ecosystem contains over 7,500 packages, making effective discovery a critical feature. To address this, prpm provides a suite of CLI commands designed to help users find relevant packages through various methods, including traditional keyword search, AI-powered semantic search, direct information lookup, and browsing trending packages. These tools ensure that developers can navigate the extensive registry to find the exact AI prompts, rules, or skills they need.
This document details the functionality of the primary discovery commands: search, ai-search, info, and trending.
Sources: packages/webapp/public/blog/prpm-complete-feature-guide.md, packages/webapp/src/app/blog/introducing-use-cases/page.tsx
Standard Keyword Search (prpm search)
The prpm search command provides a traditional keyword-based search against the prpm registry. It is ideal for when you know specific terms, package names, or authors you are looking for. The command queries the registry's full-text search index and returns a list of matching packages.
Sources: packages/cli/src/commands/search.ts, packages/webapp/public/blog/prpm-complete-feature-guide.md
Command Options
The search command can be refined using several options to filter and sort the results.
| Option | Alias | Description |
|---|---|---|
<query> | The search query string. | |
--format <format> | -f | Filter packages by a specific format (e.g., cursor, claude, continue). |
--subtype <subtype> | Filter by subtype (e.g., rule, skill, agent). | |
--author <author> | Filter packages by a specific author. | |
--sort <field> | -s | Sort results by quality, downloads, stars, or recency. Default is quality. |
--limit <number> | -l | Limit the number of results returned. Default is 20. |
--json | Output results in JSON format instead of a table. |
Sources: packages/cli/src/commands/search.ts:16-32
Search Flow
The following diagram illustrates the process flow for a standard keyword search.
This diagram shows how the prpm search command takes user input, constructs an API request with filters, retrieves data from the registry, and formats the output.
Sources: packages/cli/src/commands/search.ts:34-89
AI Semantic Search (prpm ai-search)
For more complex discovery needs where exact keywords are unknown, prpm ai-search allows users to search using natural language. Instead of matching keywords, this command understands the intent behind the query, finding packages that solve a particular problem even if they don't use the same terminology.
This is achieved by using AI embeddings to find conceptually similar packages. For example, a query like "help me manage side effects in React" would find packages related to useEffect, data fetching, and lifecycle management.
Sources: packages/cli/src/commands/ai-search.ts, packages/webapp/public/blog/prpm-complete-feature-guide.md
Command Options
| Option | Alias | Description |
|---|---|---|
<query> | The natural language search query. | |
--limit <number> | -l | Limit the number of results returned. Default is 10. |
--json | Output results in JSON format. |
Sources: packages/cli/src/commands/ai-search.ts:13-20
AI Search Flow
The sequence diagram below shows the interaction between the CLI, the registry, and the AI services during a semantic search.
This diagram illustrates the process of converting a natural language query into an embedding, searching a vector database for similar packages, and returning the results.
Sources: packages/cli/src/commands/ai-search.ts:22-63, packages/webapp/public/blog/prpm-complete-feature-guide.md
Use Case-Based Discovery
To further improve discoverability, prpm organizes packages into over 50 practical "Use Cases". This allows developers to browse for packages based on the task they are trying to accomplish, such as "API Development" or "Debugging & Troubleshooting".
When a package is published, an AI enrichment process analyzes its content and automatically tags it with relevant use cases. These use cases can then be used as filters in the search interface, providing a task-oriented way to find tools.
Sources: packages/webapp/src/app/blog/introducing-use-cases/page.tsx
AI Auto-Tagging Process
This diagram shows the automated process of analyzing a package and assigning it to relevant use case categories.
Sources: packages/webapp/src/app/blog/introducing-use-cases/page.tsx
Viewing Package Details (prpm info)
The prpm info command allows users to retrieve and display detailed information about a single package. This is useful for inspecting a package's metadata, quality score, and content before deciding to install it.
Sources: packages/cli/src/commands/info.ts
Command Options
| Option | Alias | Description |
|---|---|---|
<package-id> | The ID of the package to inspect (e.g., @author/package-name). | |
--json | Output full package manifest in JSON format. |
Sources: packages/cli/src/commands/info.ts:13-18
Information Displayed
When run, prpm info displays a summary including:
- Package name, version, and description
- Author and license
- Tags and format
- Quality score
- Download and star counts
- Last update timestamp
- A preview of the package's content/files
Sources: packages/cli/src/commands/info.ts:20-71
Discovering Popular Packages (prpm trending)
To see what's currently popular within the community, the prpm trending command lists packages with the highest download counts over a specific period.
Sources: packages/cli/src/commands/trending.ts
Command Options
| Option | Alias | Description |
|---|---|---|
--limit <number> | -l | The number of trending packages to display. Default is 10. |
--period <days> | -p | The time period in days to consider for trending. Default is 7. |
--json | Output results in JSON format. |
Sources: packages/cli/src/commands/trending.ts:12-19
Conclusion
The prpm CLI offers a robust and multi-faceted suite of tools for package discovery. Users can choose the method that best suits their needs, whether it's a precise keyword search, an intent-based AI query, a task-oriented browse through use cases, or a look at community trends. This comprehensive approach is essential for making the vast and growing registry of over 7,500 packages accessible and useful to all developers.
Sources: packages/webapp/public/blog/prpm-complete-feature-guide.md