upstash avatar

Context7 Cli

This is a CLI wrapper that pulls fresh library docs when your training data might be stale, manages AI coding skills (install, search, generate custom ones), and sets up the Context7 MCP server for your editor. You'd reach for it when you need current API signatures for a library, want to grab pre-built skills from repos like /anthropics/skills, or need to configure Context7 for Claude Code or Cursor. The two-step docs flow (resolve library ID, then fetch) feels a bit clunky, but it's honest about what it does. Most commands work without auth, though generating custom skills requires login. If you're already in the Context7 ecosystem, this ties the pieces together.

skills.sh installs
8.5K
GitHub stars
64.4K
last updated
Aug 21, 2026

Install

$ npx -y skills add upstash/context7 --skill context7-cli --agent claude-code

Installs into .claude/skills of the current project.

Files

ctx7 CLI

The Context7 CLI does two things: fetches up-to-date library documentation and sets up Context7 MCP for your editor.

Make sure the CLI is up to date before running commands:

npm install -g ctx7@latest

Or run directly without installing:

npx ctx7@latest <command>

What this skill covers

  • Documentation — Fetch current docs for any library. Use when writing code, verifying API signatures, or when training data may be outdated.
  • Setup — Configure Context7 MCP for Claude Code / Cursor / OpenCode.

Quick Reference

# Documentation
ctx7 search <query>                   # Search all libraries in one step
ctx7 library <name> <query>           # Step 1: resolve library ID
ctx7 docs <libraryId> <query>         # Step 2: fetch docs

# Setup
ctx7 setup                            # Configure Context7 MCP (interactive)
ctx7 login                            # Log in for higher rate limits
ctx7 whoami                           # Check current login status

Authentication

Sponsors

Details

Repository
github.com/upstash/context7
Categories
Documentation, AI & Agent Building, CLI & Terminal
First seen
Apr 16, 2026

More from upstash/context7

All 4
1msw-git avatarmsw-planningmsw-git/msw-ai-coding-plugins-officialMSW (MapleStory Worlds) game-planning mode — for BOTH starting a brand-new game from scratch AND continuing/resuming an in-progress prototype. Narrow the idea w8.1Kskills.sh installs
2google avatarbigquery-bigframesgoogle/skillsGenerates Python code using BigQuery DataFrames (BigFrames), the pandas/scikit-learn-style API over BigQuery. Use when writing BigFrames code or doing pandas-st7.3Kskills.sh installs
3github avatarmentoring-juniorsgithub/awesome-copilotSocratic mentoring for junior developers and AI newcomers. Guides through questions, never answers. Triggers: "help me understand", "explain this code", "I'm st7Kskills.sh installs
4wshobson avatarhadswshobson/agentsUse when writing technical documentation that needs to be readable by both humans and AI models, converting existing docs to HADS format, validating a HADS docu6.9Kskills.sh installs
5jeffallan avatarsql-projeffallan/claude-skillsOptimizes SQL queries, designs database schemas, and troubleshoots performance issues. Use when a user asks why their query is slow, needs help writing complex 6.8Kskills.sh installs
6agricidaniel avatarseo-content-briefagricidaniel/claude-seoGenerate competitive SEO content briefs with per-section word counts, competitor scoring, keyword density guidance, and page-type templates. Supports both new p6.6Kskills.sh installs