import { Context7 } from "@upstash/context7-sdk";const client = new Context7();const libraries = await client.searchLibrary( "I need to build a UI", "react");console.log(`Found ${libraries.length} libraries`);libraries.forEach((library) => { console.log(`${library.name}: ${library.description}`);});
import { Context7 } from "@upstash/context7-sdk";const client = new Context7();const libraries = await client.searchLibrary( "I need to build a UI", "react");console.log(`Found ${libraries.length} libraries`);libraries.forEach((library) => { console.log(`${library.name}: ${library.description}`);});
import { Context7 } from "@upstash/context7-sdk";const client = new Context7();const libraries = await client.searchLibrary( "I want to build a React app", "react");const library = libraries[0];console.log(`Using: ${library.name} (${library.id})`);const context = await client.getContext( "How do I create a component?", library.id);console.log(context);