This page shows how to install the JavaScript SDK and import it into your project.
Install the SDK
First, install the SurrealDB SDK using your preferred package manager:
bun install surrealdbNote
The SurrealDB SDK for JavaScript is also available in the JSR registry as @surrealdb/surrealdb.
Import the SDK into your project
After installing the SDK as a dependency, you can import the SDK into your project. The SDK supports several import options, depending on your setup and environment.
import { Surreal } from 'surrealdb';Next steps
After installing the SDK, see the quick start guide to build a simple application with the SDK. You can also learn more about carrying out common tasks with the SDK in the following sections: