cmd/

directory
v0.33.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 15, 2026 License: AGPL-3.0

README

TinySQL commands

This directory contains runnable TinySQL applications, demos, servers, and WebAssembly builds. For engine capabilities, GIS, storage modes, imports, and limitations, start with the root README.

Choose a command

Goal Command Start here
Explore SQL features with seed data demo go run ./cmd/demo
Use an interactive SQL shell repl go run ./cmd/repl
Use a SQLite-like CLI tinysql go run ./cmd/tinysql
Format, lint, validate, or explain SQL sqltools go run ./cmd/sqltools
Diagnose SQL against a fresh database debug go run ./cmd/debug
Query files directly with SQL query_files go run ./cmd/query_files
Query filesystem metadata and content fsql build from cmd/fsql
Move data between files and databases migrate build from cmd/migrate

Servers and applications

Goal Command Notes
HTTP and gRPC SQL API server General-purpose API server
Exercise the API under load server/loadtest Companion load generator
Durable DBMS daemon and tile server tinysqld Health, jobs, storage, optional tiles
Browser database manager accessweb Datasheets, CRUD, SQL, export
SQL-driven HTML pages tinysqlpage Render pages from .sql definitions
Form application formigo TinySQL or SQL Server backend
Desktop SQL application studio Wails desktop app
MCP server for AI hosts tinysql-mcp-server stdio Model Context Protocol server

Demos and reference applications

Goal Command Notes
Catalog and scheduler APIs catalog_demo Tables, views, functions, jobs
Local read-only POI snapshot offline_demo No service or network required
Evaluate local RAG retrieval ragdemo Requires a local embedding server
Explore tinyORM tinyorm_demo Migrations and named parameters

Browser and WebAssembly

Goal Command Start here
Full local-first SQL playground query_files_wasm GitHub Pages app and GIS map editor
Minimal browser WASM UI wasm_browser ./build.sh --serve
Run TinySQL from Node.js WASM wasm_node ./build.sh --run

The focused map demo is built by query_files_wasm and its data generator in mbtilesdemo. It runs tile lookups and GeoJSON edits through the same in-browser TinySQL engine.

Build conventions

Most commands can be built from the repository root:

go build ./cmd/<name>
go run ./cmd/<name> --help

fsql, migrate, studio, and the WebAssembly applications have their own build workflows; follow their command README. Optional file importers use build tags:

go build -tags=sqliteimport ./...
go build -tags=shapefile ./...
go build -tags=sqliteimport,shapefile ./...

Use go test ./... from the repository root for the main suite. See the development guide for the Make targets and release/demo workflow.

Directories

Path Synopsis
catalog_demo – tinySQL Catalog & Scheduler demonstration.
catalog_demo – tinySQL Catalog & Scheduler demonstration.
debug – tinySQL SQL diagnostic tool.
debug – tinySQL SQL diagnostic tool.
Package main provides a practical SQL playground for tinySQL.
Package main provides a practical SQL playground for tinySQL.
Command offline_demo is a small local-first tinySQL example.
Command offline_demo is a small local-first tinySQL example.
Command ragdemo exercises a complete local RAG pipeline with LM Studio and TinySQL.
Command ragdemo exercises a complete local RAG pipeline with LM Studio and TinySQL.
Command tinysqld is the enterprise DBMS daemon entry point.
Command tinysqld is the enterprise DBMS daemon entry point.
internal/referencegen
Package referencegen extracts the ordered example overview used by the browser-based function reference.
Package referencegen extracts the ordered example overview used by the browser-based function reference.
tools command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL