Context7 CLI

Current API docs + code snippets for third-party libraries/frameworks. Use to verify exact signatures/usage.

Mic92 2deac57 849 B Updated

File contents

Two-step: search resolves a library name to a Context7 ID, then docs fetches a few focused snippets for that ID. IDs are not guessable — always search first. Both args are required for both commands.

# 1. Find the library ID — output shows IDs, ⭐, snippet count, and available versions
context7-cli search nextjs "middleware"
#   /vercel/next.js   ⭐ 131k   Versions: v15.1.8, v13.5.11, ...

# 2. Fetch docs — query is semantic, be specific (output is ~5KB, don't waste it on broad topics)
context7-cli docs /vercel/next.js "middleware matcher config"

# Pin version (only ones listed in search output work)
context7-cli docs /vercel/next.js/v15.1.8 "app router migration"

Mic92/mics-skills/tree/main/context7-cli/skill commit 2deac57aac

Frequently asked questions

npx skillmds@latest add mic92/context7-cli