npmViewPackage
Retrieve detailed NPM package information, including version history, dependencies, repository URLs, and exports structure. Ideal for analyzing package metadata and integrating with GitHub for source code exploration.
Instructions
View NPM package information using 'npm view' command. Supports field-specific queries and GitHub repository discovery.
WHEN TO USE: Use when users ask questions about npm packages - provides comprehensive package data and insights.
KEY INSIGHTS:
- Git repository URL for source code exploration
- Package exports structure (understand API surface and dependencies)
- Dependencies/devDependencies for ecosystem analysis
- Version history, size, performance metrics
- License and author information
CAPABILITIES:
- Full package info: npm view <package> --json (optimized format)
- Single field: npm view <package> <field> (version, description, license)
- Multiple fields: filtered JSON response for specific fields
- Repository URLs for GitHub integration and source code analysis
Input Schema
Name | Required | Description | Default |
---|---|---|---|
field | No | Optional field to get specific information (e.g., "version", "description", "license"). If not provided, returns full package info. | |
match | No | Specific field(s) to retrieve. Can be single field or array of fields. Examples: "version", ["version", "description"], ["dependencies", "devDependencies"]. When used, returns only the specified fields. use repository to get the repository url in github | |
packageName | Yes | NPM package name (e.g., "react", "express", "@types/node"). Include @ prefix for scoped packages. |