Skip to content
chunkdbPublic

About

Go CLI for chunkdb with chunk:// and chunks:// support, core protocol commands, and an interactive shell.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

chunk-cli

CI

chunk-cli is the command-line client for chunkdb, a database for grid data. Run a CQL statement from your terminal or open an interactive shell. You need a chunkdb server that supports protocol 3. Installing from source requires Git and Go 1.25.6 or later.

Install

git clone https://github.com/chunkdb/chunk-cli.git
cd chunk-cli
go install ./cmd/chunk-cli

Add Go's binary directory to your PATH if chunk-cli is unavailable.

Quick start

On a fresh server, set CHUNKDB_URI and CHUNKDB_PASSWORD for an administrator as shown in Connection.

cat > world.cql <<'CQL'
-- migrate: create_world_cli
CREATE TABLE world_cli (kind u8, name text(16) NULL) CHUNK 2 x 2
CQL
chunk-cli --uri "$CHUNKDB_URI" migrate world.cql
chunk-cli --uri "$CHUNKDB_URI" "SET BLOCK 0 0 IN world_cli kind = 1, name = 'grass'"
chunk-cli --uri "$CHUNKDB_URI" "SET BLOCK 1 1 IN world_cli kind = 2, name = 'door'"
chunk-cli --uri "$CHUNKDB_URI" "GET BLOCK 1 1 FROM world_cli"
chunk-cli --uri "$CHUNKDB_URI" "GET AREA 0 0 TO 0 0 FROM world_cli"
create_world_cli applied
1
2
kind = 2
name = 'door'
chunk 0 0
  version = 2
  schema_version = 1
  commit_time_ms = <time-ms>
  present = 2 of 4 blocks

A block is a grid cell with named values. A chunk groups nearby blocks under one version. This table uses chunks of two by two blocks. GET BLOCK uses block coordinates and GET AREA uses chunk coordinates. The two writes print the resulting chunk versions, and <time-ms> stands for the server's commit timestamp in milliseconds.

Guides

  • Connection covers login, TLS and connection errors.
  • Commands covers options, output, the shell and chunk files.
  • Transactions covers reads and writes on one connection.
  • Feed covers watching changes and resuming a durable consumer.
  • Users covers passwords and table rights.
  • Migrations covers named schema changes.
  • Backup covers copying server data.
  • CQL statement families shows the server's statement syntax.

About

Go CLI for chunkdb with chunk:// and chunks:// support, core protocol commands, and an interactive shell.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages