MCPInstall

surrealdb-cli

Use the surreal command-line binary to run a SurrealDB server (in-memory, RocksDB, SurrealKV, or TiKV), open an interactive or piped SQL REPL, import and export databases, check server readiness, upgrade the binary, repair storage, and manage SurrealML models. Use this skill whenever users run, connect to, back up, restore, or operate SurrealDB from the terminal. Triggers: surreal start, surreal sql, surreal import, surreal export, surreal isready, surreal upgrade, surreal fix, surreal ml, SurrealDB CLI, surreal server.

Installs
403
Last 24h
—
Trending rank
—
Security
Not audited

Install

Works with every agent the skills CLI supports.

npx skills add https://github.com/surrealdb/agent-skills --skill surrealdb-cli
  1. 01

    Install

    Run the command in your project. The CLI asks which agents to install for.

  2. 02

    Describe the task

    Ask your agent for something this skill covers. It loads surrealdb-cli automatically when relevant.

  3. 03

    Review the result

    The agent follows the SKILL.md steps, scripts and references bundled with the skill.

SKILL.md

The instructions your agent reads when the skill is triggered.

SurrealDB CLI

A skill for driving the surreal command-line binary — SurrealDB's all-in-one tool for running a server, querying it, and moving data in and out.

This skill covers operating the surreal binary itself. To write the SurrealQL that you run with it, use the surrealql skill; for declarative schema migrations and type generation, use the surrealkit skill.

When to use this skill

Reference these guidelines when:

  • Starting a SurrealDB server, locally or in a container (surreal start)
  • Opening the SQL shell or piping queries from a file (surreal sql)
  • Importing or exporting a database for backups, seeding, or migration (surreal import / surreal export)
  • Gating scripts or CI on server availability (surreal is-ready)
  • Upgrading the binary or repairing on-disk storage after an upgrade (surreal upgrade / surreal fix)
  • Importing or exporting SurrealML models (surreal ml)

Installation

MethodCommand
curl (macOS / Linux)curl -sSf https://install.surrealdb.com | sh
Windows (PowerShell)iwr https://windows.surrealdb.com -useb | iex
Homebrewbrew install surrealdb/tap/surreal
Dockerdocker run --rm --pull always -p 8000:8000 surrealdb/surrealdb:latest start

Verify with surreal version. Pin a specific image tag (not latest) for production. See the install docs for the current set of methods.

Command map

CommandPurposeReference
surreal start [PATH]Run the database server with a chosen storage backendstart.md
surreal sqlInteractive REPL or piped, non-interactive queryingsql.md
surreal import <FILE>Load a SurrealQL script into a databaseimport-export.md
surreal export [FILE]Dump a database to SurrealQL (file or stdout)import-export.md
surreal is-readyExit 0 when the server is accepting connections (alias isready)maintenance.md
surreal versionPrint local tool and remote server versionsmaintenance.md
surreal upgradeReplace the binary with a newer releasemaintenance.md
surreal fix [PATH]Migrate on-disk storage to the current formatmaintenance.md
surreal ml <sub>Import / export SurrealML modelsmaintenance.md

surreal validate (SurrealQL file checking) and formatting are covered by the surrealql skill. Newer subcommands (mcp, module) also exist — run surreal help and surreal <command> --help to confirm the surface of an installed version.

Connection flags & env vars

sql, import, export, and ml share the same connection flags. Each flag has a SURREAL_* environment variable fallback; an explicit flag wins.

Flag (aliases)Env varNotes
-e, --endpoint—ws://localhost:8000 for sql; http://localhost:8000 for import/export
--namespace (--ns)SURREAL_NAMESPACERequired for import/export/ml
--database (--db)SURREAL_DATABASERequired for import/export/ml
-u, --username (--user)SURREAL_USER
-p, --password (--pass)SURREAL_PASS
-t, --tokenSURREAL_TOKENJWT; use instead of username/password
--auth-levelSURREAL_AUTH_LEVELroot (default), namespace/ns, or database/db

Pass secrets via env vars rather than flags so they do not leak into shell history or process listings.

Quick start

# 1. Start an authenticated in-memory server (foreground)
surreal start --user root --pass root memory

# 2. In another shell, open the SQL REPL on namespace/database "main"
surreal sql --endpoint ws://localhost:8000 \
  --user root --pass root --ns main --db main --pretty

# 3. Load a dump into that database
surreal import --endpoint http://localhost:8000 \
  --user root --pass root --ns main --db main backup.surql

Rules & conventions

  • Authentication is on by default. surreal start needs --user/--pass; only use --unauthenticated for throwaway local instances.
  • Choose a storage backend deliberately. memory (the default) is ephemeral — data vanishes on exit. Use rocksdb:/surrealkv:// for persistence and tikv:// for distributed clusters. See start.md.
  • Export defaults to stdout. surreal export writes to - (stdout) unless you give a file path; redirect or pipe accordingly.
  • Gate CI with is-ready. It returns a non-zero exit code until the server accepts connections — ideal in healthchecks and scripts.
  • Run fix after a major upgrade if the server reports an incompatible storage version, pointing it at the same PATH used by start.
  • The CLI evolves. Confirm flags and subcommands against surreal <command> --help for the installed version; this skill reflects v3.x.

References

  • Running a server and storage backends — references/start.md
  • Interactive and piped querying — references/sql.md
  • Importing and exporting data — references/import-export.md
  • Versioning, upgrades, readiness, repair, and ML models — references/maintenance.md

FAQ

What does the surrealdb-cli skill do?

Use the surreal command-line binary to run a SurrealDB server (in-memory, RocksDB, SurrealKV, or TiKV), open an interactive or piped SQL REPL, import and export databases, check server readiness, upgrade the binary, repair storage, and manage SurrealML models. Use this skill whenever users run, connect to, back up, restore, or operate SurrealDB from the terminal. Triggers: surreal start, surreal sql, surreal import, surreal export, surreal isready, surreal upgrade, surreal fix, surreal ml, SurrealDB CLI, surreal server.

How do I install surrealdb-cli?

Run npx skills add https://github.com/surrealdb/agent-skills --skill surrealdb-cli in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/surrealdb-cli/ (personal) or .claude/skills/surrealdb-cli/ (project).

Which AI agents can use surrealdb-cli?

Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.

Is surrealdb-cli safe to install?

No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.

Who maintains surrealdb-cli?

It is published by surrealdb in surrealdb/agent-skills. It has 403 recorded installs.

More from surrealdb/agent-skills

View all →

surrealql

surrealdb/agent-skills

Generate and modify SurrealQL queries to interact with SurrealDB databases. This includes creating and retrieving records, designing and managing schemas, establishing and querying graph relationships, performing live (real-time) queries, and leveraging all unique SurrealQL features for advanced database workflows. Use this skill whenever users need to write, adapt, or troubleshoot SurrealQL statements.

Data & Databases707 installs

surrealdb-vector

surrealdb/agent-skills

Vector search with SurrealDB using HNSW indexes, KNN queries, and similarity scoring. Use when creating vector indexes, querying vectors with KNN distance operators, building semantic search or RAG pipelines, tuning HNSW parameters (EFC, M, M0, distance function, type), or implementing recommendation systems with SurrealDB. Triggers: HNSW, vector, embedding, KNN, cosine, euclidean, semantic search, RAG, vector::distance.

AI & Agents537 installs

surrealdb-python

surrealdb/agent-skills

Using SurrealDB with the Python SDK, covering both client/server mode (WebSocket) and embedded mode (in-memory or file-based). Use when connecting to SurrealDB from Python, using the surrealdb Python package, running SurrealDB embedded without a server, or performing CRUD operations from Python code. Triggers: surrealdb Python, Surreal(), AsyncSurreal(), Python SDK, embedded SurrealDB, mem://, file://.

Backend & APIs427 installs

surrealql-performance

surrealdb/agent-skills

Optimize SurrealDB performance through record ID and key design, indexing strategy, and computed/derived fields. Use when queries are slow, when designing record IDs for locality and range scans, choosing between standard/unique/full-text/vector indexes, verifying index usage with EXPLAIN, or deciding whether to precompute values with computed fields, views, or events. Triggers: slow query, performance, record id design, range scan, DEFINE INDEX, EXPLAIN, computed field, FUTURE, DEFINE TABLE AS SELECT.

surrealql-functions

surrealdb/agent-skills

Discover and use SurrealDB's built-in SurrealQL functions with accurate, version-current signatures by running the SurrealQL language server (LSP) and tree-sitter grammar, with a namespace catalog linking every function group to its docs. Use when looking up which built-in function to use, its exact signature/arguments, getting editor completions/hover/signature-help for .surql files, or confirming a function exists in the installed SurrealDB version. Triggers: SurrealQL function, built-in function, function signature, string::, array::, math::, type::, LSP, language server, completions, surrealql-language-server.

Backend & APIs419 installs

surrealkit

surrealdb/agent-skills

Use SurrealKit, SurrealDB's schema-management and migration CLI, to scaffold projects from templates, sync schema in development, plan and execute production rollouts (with rollback), statically check SurrealQL without a database, generate JSON/TypeScript types, and write declarative TOML test suites for schemas, permissions, and API endpoints. Use this skill whenever users set up, migrate, type, check, or test a SurrealDB schema with SurrealKit.

Popular backend & apis skills

View category →

find-skills

vercel-labs/skills

Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.

OfficialBackend & APIs4.1M installs

entra-app-registration

microsoft/azure-skills

Guides Microsoft Entra ID app registration, OAuth 2.0 authentication, and MSAL integration. USE FOR: create app registration, register Azure AD app, configure OAuth, set up authentication, add API permissions, generate service principal, MSAL example, console app auth, Entra ID setup, Azure AD authentication. DO NOT USE FOR: Key Vault secrets (use azure-keyvault-expiration-audit), general Azure resource security guidance.

OfficialBackend & APIs566.7K installs

This skill should be used when the user wants to "write agent code", "build an agent with ADK", "add a tool", "create a callback", "define an agent", "use state management" — in a project that needs ADK (Agent Development Kit) API patterns and code examples. It provides a quick reference for agent types, tool definitions, orchestration patterns, callbacks, state management, the graph Workflow API, and reference recipes to study. Do NOT use for scaffolding (use google-agents-cli-scaffold) or deployment (use google-agents-cli-deploy).

Backend & APIs514.8K installs

embedded-captions

heygen-com/hyperframes

Add captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embedded behind the subject, VFX captions, “炸/特效/酷炫字幕,” or a named identity from the 35-style catalog. Route by visual identity, not by backend engine. The quiet anchor rail is the default; embed every word only when the user explicitly wants a fully cinematic treatment. The workflow runs locally end to end, including transcription and subject matting; split multi-shot footage before applying it.

Backend & APIs453.3K installs

entra-agent-id

microsoft/azure-skills

Provision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token exchange (fmipath, OBO, cross-tenant) including the Microsoft Entra SDK for AgentID sidecar. USE FOR: Agent Identity Blueprint, BlueprintPrincipal, agent OAuth, fmipath token exchange, agent OBO, Workload Identity Federation for agents, polyglot agent auth, Microsoft.Identity.Web.AgentIdentities. DO NOT USE FOR: standard Entra app registration (use entra-app-registration), Microsoft Foundry agent authoring (use microsoft-foundry).

OfficialBackend & APIs336.6K installs

neon

neondatabase/agent-skills

Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon for undecided login, files, APIs, and LLM calls, set up the CLI or MCP server, and follow the branch-first workflow. Use when building an app or backend on Neon, or when "Neon" or "Lakebase Postgres" is mentioned. Child skill neon-postgres wins for an existing DATABASEURL, SQL, schema, inspect, or search. Child skill neon-auth wins for login, users, sessions, identity routing, and Managed Better Auth setup. Child skill neon-realtime wins for live queries in reactive apps and agents. Also use for object storage, S3, buckets, serverless functions, function triggers, cron, AI gateway, LLM calls, realtime, logs, Loki, Grafana, observability, postgres, database, backend, Claimable Neon, neon.new, or a no-signup database.

Backend & APIs237.1K installs