Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

surrealkit

БесплатноБез исполняемых скриптовНе проверен

Use SurrealKit, SurrealDB's schema-management and migration CLI, to scaffold projects from templates, sync schema in development, plan and execute production…

surrealdbот surrealdb★ 29 звёзд на GitHub

Об этом скилле

SurrealKit

A skill for driving SurrealKit, SurrealDB's schema-management and migration CLI. Written against SurrealKit 1.0 (currently 1.0.0-beta.3).

SurrealKit keeps a SurrealDB database in sync with .surql schema files. It provides two complementary workflows — a fast declarative sync for development and controlled, phased rollouts for shared and production databases — plus seeding, static analysis, type generation, and a declarative testing framework.

When to use this skill

Reference these guidelines when:

  • Scaffolding a new SurrealDB project (surrealkit init) or authoring templates
  • Applying schema changes in development (surrealkit sync)
  • Planning, executing, or rolling back production migrations (surrealkit rollout)
  • Adopting SurrealKit on a database that already exists (surrealkit rollout baseline)
  • Splitting a schema into independently tracked modules, or applying it to several databases
  • Statically checking SurrealQL against the schema without a database (surrealkit check)
  • Generating JSON or TypeScript types from a live schema (surrealkit typegen)
  • Writing or running declarative tests for schemas, permissions, or API endpoints (surrealkit test)

This skill covers the SurrealKit tool itself. To write the actual schema, seed, and query statements that go in .surql files, use the surrealql skill.

Installation

Method Command
cargo binstall (recommended) cargo binstall surrealkit
Cargo (from source) cargo install surrealkit
Docker docker pull ghcr.io/surrealdb/surrealkit:latest
Prebuilt tarball GitHub Releases

Building from source needs a C compiler and cmake. Static analysis is on by default and adds tree-sitter (~7.5 MiB, ~100s of build time); drop it with cargo install surrealkit --no-default-features --features kv-mem,cli — that binary has no check, generate, or watch. Prebuilt binaries and cargo binstall always include analysis.

The Docker image is distroless (~25 MB, uid 65532) and exits on completion, which suits "apply schema then run tests" pipelines in Docker Compose alongside SurrealDB.

Command map

Command Purpose Reference
surrealkit init Scaffold a project from a template, selecting optional features init-templates.md
surrealkit sync Declaratively reconcile the database to your schema files (dev) sync-rollouts.md
surrealkit rollout <sub> Plan, stage, complete, roll back, and repair migrations (shared/prod) sync-rollouts.md
surrealkit seed [--force] Run seeding files in database/seed/ (idempotent, hash-tracked) sync-rollouts.md
surrealkit check Statically analyse the project's SurrealQL — no database contacted static-analysis.md
surrealkit generate / watch Emit / continuously refresh a typed client for embedded queries static-analysis.md
surrealkit typegen Introspect a live DB and emit JSON / TypeScript types typegen.md
surrealkit test Run declarative TOML test suites testing.md
surrealkit apply <path> Apply a single .surql file directly —
surrealkit setup Run database/setup.surql (SurrealKit's own metadata tables) —
surrealkit status Show sync/rollout state —

Run surrealkit <command> --help to confirm available flags for an installed version.

Connection & config

Global flags work on every command and resolve in this order (highest wins): [target.<name>] in surrealkit.toml > CLI flags > system env vars > .env file > defaults.

surrealkit --host http://localhost:8000 --ns my_ns --db my_db \
  --user root --pass root --auth-level root sync
Flag Env var Default
--host SURREALDB_HOST http://localhost:8000
--ns SURREALDB_NAMESPACE db
--db SURREALDB_NAME test
--user SURREALDB_USER root
--pass SURREALDB_PASSWORD root
--auth-level SURREALDB_AUTH_LEVEL root (root / namespace|ns / database|db / none)
--folder SURREALDB_FOLDER ./database
--connect-timeout-secs SURREALDB_CONNECT_TIMEOUT_SECS 30 (0 waits indefinitely)
--query-timeout-secs SURREALDB_QUERY_TIMEOUT_SECS unset (a rollout step's SQL waits indefinitely)

The DATABASE_* aliases were removed in 1.0. Setting one without its SURREALDB_* replacement is a hard error, not a silent fallback. Update .env files and CI when upgrading.

Selection flags are also global: -s/--schema <name>, -t/--target <name>, --all, --keep-going, `--no-dep

Полный SKILL.md на GitHub

Установить surrealkit в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/init-templates.mdreferences/modules-targets.mdreferences/static-analysis.mdreferences/sync-rollouts.mdreferences/testing.mdreferences/typegen.md

FAQ

Что делает скилл surrealkit?

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.

Как установить скилл surrealkit?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл surrealkit запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить surrealkit с