@tabularis/create-plugin
v0.1.1
Published
Scaffold a new Tabularis database driver plugin in seconds.
Maintainers
Readme
@tabularis/create-plugin
Scaffold a new Tabularis database driver plugin in seconds.
npm create @tabularis/plugin@latest my-driver(Works the same with pnpm create @tabularis/plugin@latest my-driver or yarn create @tabularis/plugin my-driver.)
What you get
A runnable Rust project with:
manifest.jsonaligned with the Tabularis plugin schema.- 33 JSON-RPC handlers pre-wired — metadata methods return empty arrays (plugin loads cleanly), query/CRUD/DDL methods return
-32601until you implement them. test_connectionplaceholder that returns success, so your driver appears in the connection picker immediately afterjust dev-install.- Working utilities:
quote_identifier,paginate— with unit tests — ready to use from your handlers. - Cross-platform GitHub Actions release workflow for Linux x64/arm64, macOS x64/arm64, and Windows x64.
- Local REPL (
just repl) for debugging without restarting Tabularis. - Optional UI extension subworkspace (
--with-ui) pre-configured with Vite IIFE +@tabularis/plugin-api.
Usage
npm create @tabularis/plugin@latest [--] [options] <name>-- separates the package name from the flags so they reach the CLI instead of npm. If you prefer the direct form:
npx @tabularis/create-plugin [options] <name>Options
| Flag | Values | Default | Purpose |
|------|--------|---------|---------|
| --db-type | network | file | folder | api | network | Shapes the connection form and capabilities |
| --quote | " | ` | " | SQL identifier quote character |
| --with-ui | boolean | off | Also scaffold a ui/ subworkspace using @tabularis/plugin-api |
| --no-git | boolean | off | Skip git init |
| --dir | path | ./<name> | Target directory |
Examples
# Network driver (host/port/user/pass connection form)
npm create @tabularis/plugin@latest my-pg-like
# File-based driver (SQLite, DuckDB shape)
npm create @tabularis/plugin@latest duckdb-clone -- --db-type=file
# API-based plugin (no connection form; public REST-ish data source)
npm create @tabularis/plugin@latest my-api -- --db-type=api
# With UI extension scaffold
npm create @tabularis/plugin@latest mine -- --with-uiNext steps after scaffolding
cd my-driver
just dev-install # builds and installs into ~/.local/share/tabularis/plugins/my-driver
# open Tabularis → your driver is in the connection pickerFrom there, fill in handlers in src/handlers/metadata.rs, then query.rs, then the rest. The generated README.md includes a feature-by-feature roadmap.
Layout of the generated project
my-driver/
├── Cargo.toml
├── manifest.json
├── README.md
├── justfile # just build / test / dev-install / repl / lint / fmt
├── rust-toolchain.toml
├── .github/workflows/release.yml
└── src/
├── main.rs # stdio JSON-RPC loop
├── rpc.rs # method dispatch
├── client.rs # TODO: your DB client
├── error.rs
├── models.rs
├── handlers/{metadata,query,crud,ddl}.rs
├── utils/{identifiers,pagination}.rs
└── bin/test_plugin.rsWith --with-ui:
my-driver/ui/
├── package.json
├── tsconfig.json
├── vite.config.ts
└── src/index.tsx # defineSlot("data-grid.toolbar.actions", …)Requirements
- Node 18.17 or newer.
- Rust stable (for building the generated plugin).
just(optional but recommended — the generatedjustfilewraps the common tasks).
Related
- Plugin guide — authoritative reference for JSON-RPC methods, capabilities, slots.
@tabularis/plugin-api— TypeScript types + hooks for UI extensions.- Tabularis repo — the host app.
License
Apache-2.0
