Skip to main content

Install the latest version of SDK

Open Edit with copilot

Click on copilot on the bottom right in vs-code you’ll see the following menu

Add files

Navigate to node_modules/@neynar/nodejs-sdk/v1-to-v2-migration.md and add the file to the working set Search for @neynar/nodejs-sdkin the entire project, add all the files to the working set that uses SDK methods. (You can also drag and drop files in the copilot window to add them.) You should see something like this
Choose an AI agent (we recommend Claude) and add the following prompt.
With this, you should get most of the code changes correctly replaced but please verify it once. The only place where AI can make mistakes in code replacement is where v1 API methods are used which are completely removed from the v2 SDK. This is because the response structure is changed in v2 APIs.