Context7 Docs (For Human)Search library documentations, code snippets, and examples directly in VS Code, using Context7.
AI has Context7 for instant docs. Now you do too! Features
Smart Library DetectionWhen you select code and run "Search Selection", the extension automatically detects the relevant library:
Supported Languages: JavaScript, TypeScript, JSX, TSX, Python, Go, Rust, Java, C#, Ruby, PHP, Dart, Vue Verified Libraries: React, Vue, Angular, Svelte, Next.js, Nuxt, Astro, Node.js stdlib, Python stdlib, Rust std, Go stdlib, Express, NestJS, Django, FastAPI, and more. Getting StartedVia Selection:
Via Command:
Commands
Configuration (
|
| Anonymous (Default) | API Key | |
|---|---|---|
| Rate Limit | IP-based | 1,000/month (Free) |
| Setup | Zero config | Get key at context7.com/dashboard |
Development
pnpm install # Install dependencies
pnpm watch # Development mode
# Development tasks
pnpm watch:tsc # TypeScript watch mode
pnpm watch-tests # Vitest watch mode
pnpm build # Build
pnpm test # Run tests
pnpm test:coverage # Test coverage
pnpm lint # Lint
Press F5 to launch the extension in development mode.
Build Package
# Create .vsix package
pnpm pack:vsix
Publish
# Publish to Marketplace
pnpm publish:vsix
# Or publish with specific version
vsce publish <version>
Local Testing
# Install the .vsix locally to test
code --install-extension context7-docs-0.1.0.vsix
Architecture
src/
├── extension.ts # Entry point
├── api/
│ └── context7.ts # Context7 API client
├── constants/ # Configuration constants
│ ├── languagePaths.ts
│ └── libraries.ts
├── services/
│ ├── LibraryService.ts # Library management
│ ├── SearchService.ts # Search & highlighting
│ ├── SearchCache.ts # Result caching
│ ├── HistoryService.ts # Search history
│ ├── BookmarkService.ts # Bookmark management
│ └── I18nService.ts # Internationalization
├── providers/
│ ├── DocSearchViewProvider.ts # Webview provider
│ ├── pickers/ # QuickPick pickers
│ │ ├── LibraryPicker.ts
│ │ └── HistoryPicker.ts
│ └── webview/ # Webview communication
│ ├── HtmlBuilder.ts
│ └── MessageHandler.ts
├── utils/
│ ├── libraryDetector.ts # LSP-based library detection
│ └── markdownProcessor.ts
└── types/
└── index.ts # Type definitions
License
MIT