@pkgseer/cli
CLI and MCP server for PkgSeer — package intelligence for developers and AI assistants.
Get insights about packages across npm, PyPI, Hex, Crates, NuGet, Maven, and more: search code and documentation, navigate source code, trace call graphs, check security vulnerabilities, analyze dependencies, and compare packages. Works standalone or as an MCP server for AI assistants like Claude and Cursor.
Installation
Use npx without installation:
npx @pkgseer/cli --help
Or install globally:
npm install -g @pkgseer/cli
Quick Start
pkgseer init
pkgseer login
pkgseer skill init
AI Assistant Integration
PkgSeer works with AI assistants in two ways:
Skills
Skills teach your AI assistant to use PkgSeer CLI commands through natural language:
pkgseer skill init
This installs a skill definition for Claude Code or Codex CLI. The AI runs CLI commands and reads the output.
MCP Server
MCP provides structured tools that AI assistants can call programmatically:
pkgseer mcp init
This provides structured tools that AI assistants can call programmatically. Configuration varies by assistant:
Claude Code / Codex CLI: The mcp init command configures these automatically.
Cursor IDE: Add to .cursor/mcp.json:
{
"mcpServers": {
"pkgseer": {
"command": "npx",
"args": ["-y", "@pkgseer/cli", "mcp", "start"]
}
}
}
Claude Desktop: Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"pkgseer": {
"command": "npx",
"args": ["-y", "@pkgseer/cli", "mcp", "start"]
}
}
}
CLI Commands
Search
Search code and documentation across packages:
pkgseer search "authentication" -P express,passport
pkgseer search "http client" -P pypi:requests,pypi:httpx
pkgseer search "json parsing" -P hex:jason,hex:poison
pkgseer search "auth" -P lodash --type code
pkgseer search "auth" -P lodash --type docs
pkgseer search "api" -P new-package --wait 60000
pkgseer search "api" -P new-package --no-wait
pkgseer search "api" -P large-package --no-poll
pkgseer search status <searchRef>
If packages haven't been indexed yet, the search will wait up to 30 seconds by default. Use --wait <ms> to customize or --no-wait to return immediately with progress info.
For long-running searches, use --no-poll to get a searchRef and later poll with pkgseer search status <ref> (or the equivalent legacy form --resume <ref>).
Package Commands
pkgseer pkg info lodash
pkgseer pkg vulns lodash@4.17.21
pkgseer pkg quality express
pkgseer pkg deps express
pkgseer pkg deps express --transitive
pkgseer pkg compare axios got fetch-h2
pkgseer pkg changelog express
Package format: [registry:]name[@version]
lodash — npm (default registry)
pypi:requests — PyPI
hex:phoenix — Hex
crates:serde — Crates
nuget:Newtonsoft.Json — NuGet
maven:com.google.guava:guava — Maven
lodash@4.17.21 — specific version
Documentation Commands
pkgseer docs list pypi:requests
pkgseer docs get lodash/chunk
pkgseer docs search "routing" -P express
Code Navigation Commands
pkgseer code overview express
pkgseer code find express Router --include-code
pkgseer code context express src/router/index.js
pkgseer code callers npm:express
pkgseer code callees npm:express
pkgseer code path npm:express
pkgseer code search express "ERR_HTTP_HEADERS_SENT"
pkgseer code grep express src/router/index.js "handle"
pkgseer code read express src/router/index.js
pkgseer code files express --path-prefix src/
pkgseer code list express --scope exports
pkgseer code imports express --resolved-only
pkgseer code diff express v4.18.2 v5.0.0
Indexing Commands
pkgseer index trigger express lodash
pkgseer index status <ref>
Project Commands
pkgseer project init
pkgseer project detect
pkgseer project upload
Authentication
pkgseer login
pkgseer logout
pkgseer auth status
Configuration
pkgseer config show
MCP Tools
When running as an MCP server, 26 tools are available across four categories:
Registry metadata (instant, no indexing):
package_summary | Package metadata, versions, quickstart examples |
package_vulnerabilities | Security advisories and CVEs |
package_dependencies | Dependency tree (direct and transitive) with lifecycle filter |
package_quality | Quality score with category breakdown |
compare_packages | Side-by-side comparison of packages |
package_changelog | Changelog entries (GitHub Releases, CHANGELOG.md, HexDocs) |
Documentation (requires doc site crawling):
list_package_docs | Available documentation pages |
fetch_package_doc | Full content of a documentation page |
search_project_docs | Search docs for packages in current project |
Code navigation (requires indexing, dual addressing — package or repo scope):
code_overview | Statistical overview of a codebase (languages, complexity, test coverage) |
file_context | All code intelligence for a single file (symbols, imports, callers, callees) |
find_symbol | Find functions, classes, or modules by name |
list_symbols | Browse symbols by scope (exports or file contents) |
search_symbols | Search code navigation index (symbol-level results) |
symbol_callers | Find what calls a symbol (cross-package capable) |
symbol_callees | Find what a symbol calls (cross-package capable) |
call_path | Find call path between two symbols |
list_imports | Get import statements |
version_diff | Compare symbols between two versions or git refs |
list_files | List files in an indexed repository |
grep_file | Search for pattern within a file |
read_file | Read source code by file path and line range |
Search and utility:
search | Lexical keyword search across code and docs in multiple targets |
search_status | Check async search progress and retrieve results |
trigger_indexing | Pre-warm indexes for packages/repositories |
indexing_status | Poll navigation indexing progress |
Configuration
Project Configuration
Create pkgseer.yml in your project root:
project: my-project-name
enabled_tools:
- package_summary
- package_vulnerabilities
- search_project_docs
Environment Variables
PKGSEER_API_TOKEN | API token (alternative to pkgseer login) |
PKGSEER_URL | Base URL for PkgSeer (for development/testing) |
Documentation
Development
See CLAUDE.md for development guidelines.
bun install
bun run dev
bun test
bun run build
bun run codegen
Need Help?
License
(c) 2025-2026 Juha Litola