In this section, you will learn how to install the JavaScript SDK in your project.
Install the SDK
First, install the SurrealDB SDK using your favorite package manager:
bun install surrealdb 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. Depending on your setup and environment, we supported multiple options.
import { Surreal } from 'surrealdb';Next steps
After installing the SDK, check out the quick start guide to build your a simple application with the SDK. You can also learn more about carrying out common tasks with the SDK in the following sections: