* feat(cli): enumerate popularity and trust in skill search results
Replace raw install counts with star-based popularity rating (★☆☆/★★☆/★★★)
and numeric trust scores with High/Medium/Low labels in skill search,
install, and suggest commands. Show install range and raw trust score
in the hover description. Also reorder setup command to show CLI before MCP.
* feat(cli): use 4-star popularity scale matching install count ranges
* fix(cli): replace hardcoded "docs" with "find-docs" in setup output
* chore: add changeset for skill search enumeration and find-docs rename
* refactor(skills): consolidate skills under /skills with canonical sources
- Rename skills/docs → skills/find-docs (name: find-docs)
- Rename skills/ctx7-cli → skills/context7-cli (name: context7-cli)
- Add skills/context7-mcp as canonical MCP skill source
- Rename plugin skill folders to context7-mcp and unify name to context7-mcp
- MCP setup now downloads context7-mcp skill from GitHub instead of using hardcoded SKILL_CONTENT
- Remove SKILL_CONTENT from templates.ts — skills/context7-mcp/SKILL.md is the single source of truth
- Add Error Handling section to find-docs skill for quota errors
- Update agents.ts skill name: documentation-lookup → context7-mcp
- Update docs/clients/cli.mdx and setup references accordingly
* chore: add changeset for skills consolidation
* fix(skills): update plugin skill frontmatter name and setup docs to context7-mcp
* feat(cli): add CLI mode to ctx7 setup with docs skill installation
- Add MCP vs CLI mode selection prompt at the start of setup
- CLI mode authenticates user and installs docs skill via promptForInstallTargets
- Add --cli, --universal, --antigravity flags to setup command
- --yes skips the detected-locations confirmation prompt
- Default CLI install scope to global (override with --project)
- Fix checkbox selected choices to render in green (consistent with select prompt)
- Move Claude Code above Universal in IDE selection order
- Add forceUniversal=false option to promptForInstallTargets for setup flow
- Add yes? to AddOptions to support auto-confirm in promptForInstallTargets
* chore: add changeset for ctx7 setup CLI mode
* feat(cli): rename CLI mode to CLI + Skills, add --mcp flag, remove recommended label
* feat(cli): add --api-key support to CLI mode and update docs
- Pass apiKey through to resolveCliAuth in CLI mode setup
- Store provided API key as bearer token for subsequent API calls
- Update cli.mdx and setup.md to reflect both MCP and CLI + Skills modes
* docs: update setup docs to reflect --api-key for both modes and --cursor for CLI
- --api-key works in both MCP and CLI + Skills mode (not MCP-only)
- --oauth clarified as MCP-only
- Added --cursor to CLI + Skills mode examples (Cursor has a skills directory)
- Updated auth table row for ctx7 setup
* fix(cli): improve library ID validation and add telemetry headers
- Validate /owner/repo format locally before spinner starts, showing
consistent error + hint for both "react" and "/react" inputs
- Send X-Context7-Source, X-Context7-Client-IDE, X-Context7-Client-Version,
and X-Context7-Transport headers on library/docs requests so CLI
appears in the admin telemetry dashboard
* feat(cli): show source repo next to skill name in search and suggest results
Adds the project repo in parentheses after each skill name to help
disambiguate skills with identical names from different repositories.
* chore: add changeset for repo display in skill search
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(docs): add dedicated docs skill and restructure CLI documentation
- Add new `docs` skill as a single-file skill for documentation retrieval
- Align skill prompts with MCP tool descriptions (selection process, query guidance, 3-call limit)
- Enrich CLI docs page with result fields, query tips, and version-specific IDs
- Move CLI page to Overview section in docs nav
- Make `query` required for `ctx7 library` across all skills and docs
- Update trust score display label in skills.mdx
* feat(cli): align library output format with MCP labels
Use labeled fields and categorical Source Reputation labels
(High/Medium/Low/Unknown) instead of numeric trust scores to match
the MCP transport format.
* refactor: move skills from .agents/skills to skills/ at repo root
Source-control location for skills — users install them into
.agents/, .claude/, etc. via the CLI. Also updates install
instructions to use `npm install -g ctx7@latest` or `npx ctx7@latest`.
* docs: use natural-language query examples across skills and CLI docs
Replace keyword-style queries ("useEffect cleanup") with full
question-style queries ("How to clean up useEffect with async
operations") to better demonstrate how the query parameter works.
* docs: fix trust score description to show numeric range
* feat(cli): add resolve and query commands for library documentation
Expose Context7's resolve-library and query-docs API as CLI commands,
enabling agents and developers to fetch documentation directly from
the terminal without MCP setup.
- `ctx7 resolve <library> [query]` - resolve library name to Context7 ID
- `ctx7 query <libraryId> <query>` - fetch documentation for a library
- Both support --json for structured output
- TTY-aware: spinners and colors in terminal, clean output when piped
- Auth: CONTEXT7_API_KEY env var > OAuth token > unauthenticated
* refactor(cli): rename resolve/query to library/docs commands
Rename commands for a more natural CLI interface:
- `ctx7 library <name> [query]` instead of `ctx7 resolve`
- `ctx7 docs <libraryId> <query>` instead of `ctx7 query`
* fix(cli): show benchmark score and all versions in library results
* chore: add changeset for library and docs commands
* style(cli): fix lint formatting in api.ts
* refactor(cli): remove redundant spinner success messages
The output itself is self-evident, no need for "Found 5 libraries"
or "Documentation retrieved" messages.
* feat(cli): install documentation-lookup skill during ctx7 setup
The setup command now installs the Context7 documentation-lookup skill
alongside the MCP server and rule for each agent.
Skill paths per agent:
- Claude: .claude/skills/documentation-lookup/SKILL.md
- Cursor: .cursor/skills/documentation-lookup/SKILL.md
- OpenCode: .agents/skills/documentation-lookup/SKILL.md (universal)
* chore: add changeset for skill install in setup
* add `ctx7 setup` command for configuring MCP and rules
Adds an interactive setup command that configures the Context7 MCP server
and agent rules for Claude Code, Cursor, and OpenCode. Authenticates via
OAuth, generates an API key, and writes per-agent config files.<noreply@anthropic.com>
* revert auth.ts client ID change
* add changeset for setup command
* fix lint: format import line
* feat(cli): adopt .agents/skills as universal install target
Install to .agents/skills/ by default as the shared standard directory.
Universal agents (Amp, Codex, OpenCode, Gemini CLI, GitHub Copilot) all
read from this path natively. Vendor-specific agents (Claude Code, Cursor,
Antigravity) get symlinks pointing back to .agents/skills/.
- Add "universal" as a first-class IDE type across all path maps
- Auto-detect .agents/ and vendor dirs: detected → confirm, nothing
detected → checkbox picker with Universal pre-checked
- Update list/remove commands to check universal + vendor-specific dirs
- Update DEFAULT_CONFIG.defaultIde from "claude" to "universal"
- Show labeled install summary (Universal, Claude Code, etc.) with paths
* feat(cli): consolidate agent flags into single --universal option
Replace --codex, --opencode, and --amp flags with a single --universal flag that points to .agents/skills/. This simplifies the CLI interface since these agents all share the same installation path.
* refactor(cli): simplify IDE types and remove UNIVERSAL_AGENTS Set
- Simplify IDE type from 7 types to 4 (remove codex, opencode, amp)
- Remove UNIVERSAL_AGENTS Set and replace with direct equality checks
- Update documentation to add --universal flag examples throughout
- Consolidate Supported Clients table to show single Universal row
All universal agents (Amp, Codex, Gemini CLI, GitHub Copilot, OpenCode, etc.)
are now represented by the single "universal" type since they're functionally
identical and use the same .agents/skills/ directory.
* docs(skills): update CLI flags to use --universal
- Replace --codex, --opencode, --amp flags with single --universal flag
- Update all command examples (install, list, remove, suggest, generate)
- Consolidate Supported Clients table with Universal at top
- Reorder tables to prioritize Universal agents
* discover
* feat(cli): use backend suggest endpoint for skill suggestions
Replace client-side NOTABLE_SET filtering with a single POST request to
/api/v2/skills/suggest. The backend now handles SKIP_SET filtering,
vector search, install count enrichment, and ranking.
- Remove NOTABLE_SET/SKIP_SET from deps.ts
- Add suggestSkills API function
- Add SuggestGroup and SuggestResponse types
- Simplify suggestCommand to use backend response
* feat(cli): send auth token with suggest request
Pass the user's OAuth token (if logged in) when calling the suggest
endpoint so the request counts against their quota.
* chore: add changeset
* refactor: simplify suggest API usage
- Remove ecosystem field from deps detection
- Use flat skills array from backend instead of groups
- Simplify display logic
* fix: use white color for Relevant value in metadata panel
* refactor: rename DiscoverOptions to SuggestOptions
* feat(cli): add trust score column and improve skill search display
Add trust score and installs columns with aligned headers to skill search results.
Trust scores use yellow/red color coding (0-10 scale).
* chore: add changeset for trust score column
* feat(cli): auto-login when generate requires authentication
Extract login flow into reusable `performLogin()` function.
Generate command now triggers OAuth login automatically instead of
showing an error asking the user to run 'ctx7 login' manually.
* feat(cli): show recommended option first in generate questions
Reorder options so the recommended answer is always displayed at
position 1 with cursor starting on it, regardless of original index.
* feat(cli): open generated skill in default editor instead of inline view
Replace inline terminal "View full skill" with "View skill" that opens
the content in the system default editor ($EDITOR or 'open' fallback)
via a temp file.
* feat(cli): revamp generate UX with improved copy and examples
Update skill generation flow:
- Show do/don't examples (✕/✓) for skill descriptions
- Rename "libraries" to "sources" in user-facing text
- Add explanation of what sources are used for
- Update spinner text for questions and generation steps
- Remove unused libraryNames variable
* chore: update changeset to include generate UX changes
* fix(cli): show dash placeholder for missing installs and trust scores
* feat(cli): add external link icon to terminal hyperlinks and show dash for empty fields
* feat(cli): improve view/edit skill with persistent edits and preview cleanup
Save preview files to ~/.context7/previews/ instead of OS temp dir, read
edits back before install, and clean up preview files on exit.
* feat(cli): improve generate UX copy and flow polish
Update skill generation flow with clearer descriptions, better spinner
messages, and improved finalize menu options.
* fix(cli): fix stale editor preview, install count side effect, and editor spawn
- Reset previewFileWritten between regeneration cycles so editor shows fresh content
- Add placeholder param to formatInstallCount to avoid showing "-" in list command
- Replace execFile with spawn for proper $EDITOR support (terminal editors, args)
- Move trustScore to Skill base type and remove redundant installCount from SkillSearchResult
Display exact install count numbers instead of rounded values (e.g. 41 instead of 40+), sort skills by install count descending in the install command, and show "installs" column header inline with the prompt.
* feat: add oauth 2.0 support with login,whoami and logout commands
* ci: lockfile
* fix: address security and port issues in OAuth flow
- Fix XSS vulnerability by escaping HTML in error page messages
- Change callback port from 9876 to 52417 (high ephemeral range, less likely to conflict)
* refactor: clean up auth code and remove unnecessary comments
- Remove obvious comments that duplicate function names
- Extract duplicate expiration display logic into printTokenExpiration helper
- Simplify logoutCommand (remove async, inline condition)
- Remove unused saved_at field from token storage
* fix: address auth bugs and remove unused code
Bug fixes:
- whoami now shows "Session expired" instead of misleading "Logged in" when token is invalid
- expires_at calculation preserves existing value instead of overwriting
- Login check now allows re-login when tokens are expired with no refresh token
Simplifications:
- Remove unused getAccessToken and refreshAccessToken functions
- Simplify printTokenExpiration (remove unused showExpired parameter)
* refactor: improve whoami output formatting
- Align labels using padEnd for consistent output
- Remove expiration time display from whoami
- Show login status first, then fetch user details
* chore: add changeset for OAuth feature
* feat: enumerate search results
* feat: select hovered item on Enter in checkbox prompts
* refactor: improve types in prompts.ts
* feat: improve skill list UI with metadata panel and install counts
* chore: update version and changelog
* feat: add consistent green highlighting to IDE/scope prompts
Apply green highlight theme to all selection prompts in ide.ts
for visual consistency with skill selection prompts.
* feat: add skills cli
* chore: cleanup comments
* feat: update commands with new apis
* chore: remove unnecessary deps
* chore: update aliases and package name
* feat: remove /owner/repo/skill convention
* fix: cleanup, path and param handling
* feat(cli): multi-keyword search and Claude symlink priority
- Support multi-keyword search: `ctx7 skills search react hooks`
- Prioritize Claude to receive original files when installing to multiple IDEs
* refactor(cli): rename project to repository, reorder options
- Rename "project" argument to "repository" in help text
- Reorder options: --all and --global first, then IDE options
- Simplify IDE option descriptions to show client name and path
- Update internal variable names (project → repo)
* refactor(cli): flatten search results display
- Remove grouping by repository in search results
- Remove "Select all from repo" option
- Show each skill on single line with repo name in parentheses
- Simplify selection handling
* docs(cli): improve main help output with detailed examples
- Add section headers for commands and examples
- Include npx prefix in all example commands
- Group examples by use case (search, install, manage)
- Add comments explaining each example group
- Add link to context7.com
* refactor(cli): simplify banner, add examples to --help
Move detailed examples to --help output using addHelpText().
Simplify the no-argument banner to show only quick start examples.
* chore: remove unnecessary package