LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

sirix-cli

command-line client for SirixDB bitemporal databases

TLDR

Create a JSON database and resource
$ sirix-cli -l /tmp/mydb create json -r myresource -d '{"name": "Alice"}'
copy
Query a resource
$ sirix-cli -l /tmp/mydb query -r myresource
copy
Run a JSONiq expression ($$ is the document root)
$ sirix-cli -l /tmp/mydb query -r myresource '$$.name'
copy
Update and create a new revision
$ sirix-cli -l /tmp/mydb update -r myresource '{"team": "engineering"}' -im as-first-child
copy
Query a previous revision
$ sirix-cli -l /tmp/mydb query -r myresource -rev 1
copy
Show revision history for a resource
$ sirix-cli -l /tmp/mydb resource-history myresource
copy

SYNOPSIS

sirix-cli -l path COMMAND [ARGS] [OPTIONS]

DESCRIPTION

sirix-cli is the full-featured command-line interface for SirixDB, an embeddable, append-only, bitemporal database that stores every commit as a space-efficient snapshot via structural sharing. Unlike tools that overwrite current state, SirixDB keeps full history so any past revision can be opened as quickly as the latest.The CLI operates on a local database directory (-l), creating JSON (or XML) resources, running JSONiq/XQuery queries, applying updates that produce new revisions, and inspecting history. It complements sirix-shell (interactive query REPL) and the REST API / MCP server for remote and agent use.

PARAMETERS

-l path

Local database path (directory)
create type -r resource -d data
Create a database resource (for example json) with initial document data
query -r resource [expression]
Read the resource; optional JSONiq/XQuery expression; -rev selects a revision
update -r resource data -im mode
Apply an update that creates a new revision
resource-history resource
List revision history for a resource

CAVEATS

SirixDB requires a modern Java runtime (or a GraalVM native build of the CLI). Write concurrency is one writer per resource; readers are snapshot-isolated. Paths and storage layout are managed by SirixDB under the database directory—do not manually edit those files while the database is open.

HISTORY

SirixDB is an open-source bitemporal storage system maintained by Johannes Lichtenberger and contributors; sirix-cli is the Kotlin CLI module in the main sirix repository.

SEE ALSO

sirix-shell(1), java(1), jq(1)

RESOURCES

Copied to clipboard
Kai