Once you have created a Surreal Cloud Instance, you can connect to it via CLI. The SurrealDB CLI lets you interact with your Surreal Cloud Instance from the command line.
Before connecting to your Surreal Cloud Instance using the CLI, you need to install the SurrealDB CLI. Installation instructions are in the SurrealDB CLI documentation.
Once it is installed, you can connect to your Surreal Cloud Instance using the surreal sql
command. This command connects to your Surreal Cloud Instance using the specified endpoint and token.
surreal sql --endpoint <endpoint> --token <token>
The token
is a JSON Web Token (JWT) that is used to authenticate your connection to the Surreal Cloud Instance. You can find the token in the Instance details page in the Surreal Cloud console.
Learn more about the SurrealDB CLI in the SurrealDB documentation.