SurrealDB Docs Logo

Enter a search query

Installation

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
Important

The SurrealDB SDK for JavaScript is also available in the JSR registry as @surrealdb/surrealdb.


Import the SDK to your project

After installing, you can then import the SDK into your project. Depending on your setup and environment, we supported multiple options.

import Surreal from 'surrealdb';
Note

It is recommended to import this in a utility file or a file that is shared across your application.

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:

On this page

© SurrealDB GitHub Discord Community Cloud Features Releases Install