context7
npx @buildinternet/releases get context7-releasesnpx @buildinternet/releases get context7-releasesctx7 setup now downloads the find-docs and context7-mcp skills directly from GitHub instead of the deprecated Skill Hub API.4416fb8: Use the shared API URL for login and explain how to sign in again when the server rejects a saved session.
Recommend logout and login only when the server returns HTTP 401. Report other identity-check failures without asking users to discard saved credentials.
ctx7 setup --base-url, including secure interactive personal API-key entry and anonymous-auth discovery support.91dea9f: Fix ctx7 library, ctx7 docs and ctx7 skills suggest silently falling back to anonymous requests when the stored OAuth token expires, which surfaced misleading quota errors for authenticated users. ctx7 generate no longer forces a full interactive re-login when the token can be refreshed instead. All four commands now go through getValidAccessToken(), which refreshes expired credentials.
A successful refresh also keeps the stored refresh_token when the server omits one from the response, as permitted by RFC 6749 §6. Previously the response was written verbatim, so the refresh token was dropped and the user was silently logged out at the next expiry.
ctx7 setup now writes the API key as a standard Authorization: Bearer <key> header instead of a custom CONTEXT7_API_KEY header. Codex resolves a server's auth mode from bearer_token_env_var or a header literally named Authorization, so a custom name read as "no credential configured": Codex fell through to an OAuth credential stored against the same server name and URL, refreshed it during startup, and when that refresh token was dead the server failed with invalid_grant before the API key was ever sent. The hosted endpoint accepts both header forms, so existing configs keep working.gh directly instead of through a shell. The shell wrapper (cmd.exe /d /s /c on Windows) caused endpoint protection tools such as Microsoft Defender for Endpoint to raise a "Suspicious Node.js process behavior" alert during ctx7 setup.ctx7 setup skill install failing with "fetch failed" when the GitHub git tree API (api.github.com) is blocked or unreachable. Skill download now falls back to fetching the single SKILL.md directly from raw.githubusercontent.com — the URL the docs API already resolves — so setup succeeds in environments where only the docs/raw hosts are reachable.query-docs query description so it asks for a single concept per query. When a question spans multiple distinct topics, callers are now told to make a separate query per concept instead of combining them (unless the question is about how the concepts interact), which avoids diluted, shallow results. Applied consistently across the MCP server, CLI, pi, and AI SDK tools.acd0d46: Surface GitHub API error details when skill download fails (#2363)
Previously, any GitHub API failure during ctx7 setup or ctx7 setup --cli produced the opaque message "GitHub API error", making it impossible to distinguish a 403 rate-limit from a 401 bad token or a 404 wrong branch.
Changes:
fetchRepoTree and fetchDefaultBranch now extract the HTTP status and GitHub error body, returning descriptive strings like "HTTP 403: API rate limit exceeded"listSkillsFromGitHub distinguishes a true 404 (repo not found) from other errors (rate-limit, bad credentials) that previously all collapsed into the same silent resultrun \gh auth login` or set the GITHUB_TOKEN env var to increase rate limits`✖ with the error detail on its own line instead of embedding it in the status stringcommander 13 -> 15 and ora 9.0 -> 9.4./facebook/react into a Windows path under the Git install dir (C:/Program Files/Git/facebook/react), causing ctx7 docs to reject it as invalid; this mainly affected users running ctx7 through Claude Code. The CLI now detects and undoes the conversion before validation, accepts the //owner/repo escape, and points users at that workaround for install layouts it can't auto-detect.~/.context7. Credentials move to $XDG_CONFIG_HOME/context7 (default ~/.config/context7), updater state to $XDG_STATE_HOME/context7 (default ~/.local/state/context7), and generate previews to $XDG_CACHE_HOME/context7 (default ~/.cache/context7). Existing files in ~/.context7 are migrated automatically on first use; migration is best-effort and falls back to reading the legacy file if it cannot complete. The credentials file is always re-asserted to 0o600 after migration or write so it is never group/world-readable. Relative or empty XDG_* values are ignored per the spec.ctx7 login now always uses the device-code flow. The localhost-callback path is removed — every install (laptop, SSH, Codespace, Docker, CI) goes through the same boxed prompt and verification page. Drops the --device flag (it was the opt-in for what's now the default). Older CLI versions (≤ 0.5.0) continue to work against the unchanged auth endpoints, so pinned installs are unaffected.5a180d5: Add OAuth 2.0 device authorization flow (RFC 8628) for ctx7 login and ctx7 setup. Required for headless / remote hosts (SSH, Codespaces, Docker, CI) where the existing localhost-callback flow can't work — the browser was opening on the user's laptop while the callback listener ran on the remote host.
The new flow prints a verification URL and short code, then polls a token endpoint. The user visits the URL on any device, signs in, and approves; the CLI receives the same ctx7sk-… API key it would have gotten from the legacy flow. Device flow is selected automatically when SSH_CONNECTION is set or $DISPLAY is missing on Linux, and can be forced with ctx7 login --device. Polling tolerates transient network errors and 5xx responses without ending the session.
ctx7 setup now properly supports --antigravity, installing skills to .agent/skills, a GEMINI.md rule section (Antigravity reads Gemini-family config), and MCP config to Antigravity 2.0's documented global path ~/.gemini/config/mcp_config.json (with httpUrl for HTTP, matching the Gemini convention). Antigravity has no documented project-level MCP file, so setup --antigravity --project --mcp writes to the global location. Also removes the --universal flag from setup, which was advertised but silently ignored — it never propagated through agent selection, so passing it (e.g. setup --cli --universal --project) caused setup to fall back to auto-detection and write to the wrong directory.ctx7 setup --api-key <KEY> (without --cli, --mcp, or -y) now prompts to choose between MCP server and CLI + Skills modes. Previously, passing --api-key short-circuited to MCP, locking users out of the CLI + Skills option even though that mode also accepts an API key. Explicit --mcp / --cli / --stdio / --oauth / -y still skip the prompt as before.--json flag to ctx7 skills list for machine-parseable output. Emits { skills: [{ name, path, source }] } where path is absolute and source is the agent type (universal, claude, cursor, antigravity). Matches the existing --json pattern on ctx7 library and ctx7 docs.@inquirer/core as a direct dependency of the CLI. It was previously imported in selectOrInput.ts but only resolvable as a transitive of @inquirer/prompts, which caused ctx7 to fail at startup with ERR_MODULE_NOT_FOUND under pnpm's isolated node linker.--stdio flag to ctx7 setup to configure Context7 as a local stdio MCP server.ctx7 skills install and ctx7 skills remove. Skill names from remote SKILL.md files are now restricted to a safe character set, and the install sinks assert the target directory is a direct child of the skills root before writing.ctx7 remove agent detection. Previously, an unparseable JSON config at any agent's well-known path (e.g. a hand-edited ~/.claude.json) would crash the command with an unhandled SyntaxError before it could do anything. The detector now skips the offending file and logs a warning naming the path and parse error so the user can fix it, while detection continues for the remaining agents.CLAUDE_CONFIG_DIR env var when resolving Claude Code's global config, rules, skills, and detection pathsquery-docs MCP tool no longer accepts or forwards a researchMode parameter, and the CLI no longer exposes a --research flag on ctx7 docs.researchMode tool and the CLI docs --research flag for deep, agent-driven documentation answers.ctx7 upgrade command. The CLI now checks for newer versions with cached state, shows a non-blocking notice before interactive commands, and provides safer upgrade guidance across npm, pnpm, bun, and ephemeral runner setups.ctx7 remove as the cleanup counterpart to ctx7 setup, with safer detection and removal behavior. The command now prompts only for agents with actual Context7 artifacts, preserves non-Context7 MCP configuration when removing entries, and includes stronger test coverage for JSON and TOML cleanup.find-docs skill tell Codex to rerun Context7 CLI requests outside the default sandbox after DNS or network failures.--all-agents and --yes support to ctx7 skills install for non-interactive multi-agent installs.a667712: Update search filter warning
d739f9b: Fix OpenCode MCP setup to resolve all config file variants (opencode.json, opencode.jsonc, .opencode.json, .opencode.jsonc)
4f13168: Install rules alongside skills in ctx7 setup for better trigger rates
c3c2647: Use ~/.agents/skills instead of ~/.config/agents/skills for global universal skill installs
ctx7 setuplibrary and docs commands for querying library documentation from the terminalctx7 setupctx7 setup command for configuring Context7 MCP and rules across Claude Code, Cursor, and OpenCode.agents/skills as universal install target, supporting multiple agents with a single installation
--codex, --opencode, and --amp flags with single --universal flagskills suggest command that scans your project's dependencies (package.json, requirements.txt, pyproject.toml) and recommends relevant skills. Results show install counts, trust scores, and which dependency each skill matches.$EDITOR)skills generate command, including library search, clarifying questions, real-time query progress, feedback loop, and weekly quota management.skills list command to show all detected IDE skill directories without prompts.↓100+, ↓50+)install, search, list, remove, infosi, ssctx7 skills install /owner/repo skill-name