KAPLA-VOLUME(1)
π kapla-volume β the one where we manage Kapla store volumes
okay so hi bestie π«Ά welcome to KAPLA-VOLUME(1), straight out of the Kapla Manual. this is your little group chat for wrangling Kapla store volumes and honestly? it's giving infrastructure β¨
πΈ SYNOPSIS
kapla volume [COMMAND] β¦
so the Kapla store persists blocks of encoded content (yes, that's its whole thing π ). and the commands below? they let you inspect and manage that store. iconic behavior only.
π COMMANDS
create [--control=CONTROL_SOCKET] [--maximum-size=MAXIMUM_SIZE] [OPTION]β¦β make a brand new volume, slay πlist [--control=CONTROL_SOCKET] [OPTION]β¦β show me the volumes, all of them, no capretire [--control=CONTROL_SOCKET] [OPTION]β¦ UUIDβ retire a volume (it's not gone, it's justβ¦ retiring π )unlink [--control=CONTROL_SOCKET] [OPTION]β¦ UUIDβ unlink a volume, bye bestie π
π¦ STORE
a kapla store is literally made of:
- volumes β multiple CBOR sequences of blocks, each identified by UUIDs
- index β a listing of volumes plus the position of blocks within the volumes, which is what makes block retrieval efficient (main character energy tbh)
psst β the store location gets handed to the serve command with the --data option π
β VOLUMES
volumes are CBOR sequences holding blocks of encoded content. a Kapla store can have a bunch of volumes, and each one is in one of these states:
WRITEβ blocks get appended here. at any given time there's exactly one volume in this state. one. single. volume. πREAD_ONLYβ this one's for reading blocks, no further blocks get written to itRETIREDβ blocks accessed here (both storage and retrieval) get re-appended to the currentWRITEvolume
volumes have a maximum size (and yes, that max size lives in the index π). if the WRITE volume grows up to the maximum size, it transitions to READ_ONLY and a fresh WRITE volume is created. growth. periodt.
you can move volumes from READ_ONLY to RETIRED using the retire command π«Ά
π§ INDEX
the index keeps a list of blocks and where those blocks sit inside the volumes.
the index is an SQLite3 database, so you can peek at it with the sqlite utility. but β and this is important β when you're manually inspecting or manipulating the index, remember to activate the foreign key pragma so the database constraints actually get enforced, bestie π otherwise you're out here raw-dogging your own data.
like this:
PRAGMA foreign_keys = ON;
SELECT * FROM kapla_volume;
β¨ OPTIONS β¨
-c CONTROL_SOCKET,--control=CONTROL_SOCKETβ the Kapla control socket. when it's absent it resolves as$XDG_STATE_HOME/kapla/kapla.sock, then$HOME/.local/state/kapla/kapla.sock, then/var/lib/kapla/kapla.sockπ¦
π COMMON OPTIONS π
--color=WHEN(absent=auto) β colorize the output.WHENhas to be one ofauto,alwaysorneverπ--help[=FMT](default=auto) β show this help in the formatFMT.FMTmust be one ofauto,pager,grofforplain. withauto, the format ispagerorplainwhenever theTERMenv var isdumbor undefined π-q,--quietβ be quiet. this takes over-vand--verbosityπ€«-v,--verboseβ increase verbosity. repeatable, but more than twice doesn't bring more π--verbosity=LEVEL(absent=warningor theKAPLA_LOG_LEVELenv) β be more or less verbose.LEVELmust be one ofquiet,error,warning,infoordebug. takes over-vπ--versionβ show version information β
π STANDARDS
- RFC 8949 - Concise Binary Object Representation (CBOR) β
https://www.rfc-editor.org/rfc/rfc8949 - CBOR Serialization of ERIS Encoded Content β
https://eris.codeberg.page/eer/cbor.xml
π₯ EXIT STATUS
kapla volume exits with:
0β on success π123β on indiscriminate errors reported on standard error π124β on command line parsing errors π«125β on unexpected internal errors (bugs) π
π± ENVIRONMENT
these environment variables affect how kapla volume runs:
KAPLA_LOG_LEVELβ set the log level π
π SEE ALSO
okay that's the whole page bestie, go be great with it π«Άπ
Kapla 0.4.0 β mwah, that's the version and source, signed off with love from your favorite manual page β¨ππ¦
π¦ where this page comes from
- nixpkgs unstable: ocaml5.5.1-kapla 0.4.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms