KAPLA(1)

πŸ“¦ version 0.4.0, in nixpkgs unstable

KAPLA(1) πŸ’…βœ¨

okay so welcome to the Kapla Manual bestie, this is the whole vibe 🫢


πŸŽ€ NAME πŸŽ€

kapla β€” ERIS block store and transport. that's it, that's the whole name, slay.


✨ SYNOPSIS ✨

kapla [COMMAND] …

so like, Kapla is a tool for making content more robustly available over computer networks. it can be used for sharing files. no cap.

it provides a store for blocks, mechanisms for connecting to remote peers, and an interface for encoding and decoding content. it's giving infrastructure icon πŸ‘‘


πŸ’– COMMANDS πŸ’–

  • decode [--output=OUTPUT] [--socket=ERIS_UNIX_SOCKET] [OPTION]… READ_CAPABILITY β€” decode content. that's the whole job, she just decodes.
  • encode [OPTION]… [INPUT] β€” Encode content using ERIS. the main character command fr.
  • fcgi [--port=PORT] [--socket=ERIS_UNIX_SOCKET] [OPTION]… β€” Serve ERIS blocks and content over HTTP by starting a FastCGI responder. she serves, literally.
  • info [--socket=ERIS_UNIX_SOCKET] [OPTION]… READ_CAPABILITY β€” Get information from read capability (block size and length of encoded content). the little gossip session πŸ—£οΈ
  • ls [--socket=ERIS_UNIX_SOCKET] [OPTION]… READ_CAPABILITY β€” List entries in an encoded ERIS-FS index. window shopping but make it filesystem.
  • peer [COMMAND] … β€” Manage Kapla peers. your friends, your network, your circle πŸ«‚
  • serve [--data=DATA_DIR] [--socket=ERIS_UNIX_SOCKET] [--state=STATE_DIR] [OPTION]… β€” Start the Kapla server and make blocks available over TCP/IP and Unix sockets. the moment she steps on stage 🌟
  • sqlite [COMMAND] … β€” Read blocks from an SQLite database. yes bestie, sqlite, we love a crossover episode.
  • volume [COMMAND] … β€” Manage Kapla store volumes. the storage organization era πŸ“¦

πŸ¦‹ COMMON OPTIONS πŸ¦‹

these apply all over the place, memorize them, they're iconic:

  • --color=WHEN (absent=auto) β€” Colorize the output. WHEN must be one of auto, always or never. aesthetics are serious business πŸ’…
  • --help[=FMT] (default=auto) β€” Show this help in format FMT. The value FMT must be one of auto, pager, groff or plain. With auto, the format is pager or plain whenever the TERM env var is dumb or undefined. she reads the room.
  • -q, --quiet β€” Be quiet. Takes over -v and --verbosity. shhh 🀫
  • -v, --verbose β€” Increase verbosity. Repeatable, but more than twice does not bring more. ok so like diminishing returns bestie, two is the limit that matters.
  • --verbosity=LEVEL (absent=warning or KAPLA_LOG_LEVEL env) β€” Be more or less verbose. LEVEL must be one of quiet, error, warning, info or debug. Takes over -v. she's got opinions on volume.
  • --version β€” Show version information. the "who are you" moment πŸ’β€β™€οΈ

🌸 USAGE 🌸

Start a Kapla server that makes blocks available over a Unix socket:

kapla serve

Encode some content:

echo "Hello ERIS!" | kapla encode -
urn:eris:B4AFSFHHUHVPUYLL3V7GEPXI6HE55LY5BJONMMJUNHIQ3ELG5AESVFSC2U4SFHBCM2BIUJXKTEVPEL4TIC5OZ3GKOKSW7XM4RN34R35Q5U

Decode the content:

kapla decode urn:eris:B4AFSFHHUHVPUYLL3V7GEPXI6HE55LY5BJONMMJUNHIQ3ELG5AESVFSC2U4SFHBCM2BIUJXKTEVPEL4TIC5OZ3GKOKSW7XM4RN34R35Q5U
Hello ERIS!

Encode a file.txt:

kapla encode file
urn:eris:B4APR75ZVQDPWSN5H5X5IGWQRYSHENJ5NMSGDSXLP3YBE2A2RRWB2ZC4PGQNWPTJB64SPBHLZXMP6ZYGH24NMF7ZIQH5CXEJRBJXW6XOCU

look at her go 😭 she's literally doing it


🌈 EXIT STATUS 🌈

kapla exits with:

  • 0 β€” on success. we love a win πŸŽ‰
  • 123 β€” on indiscriminate errors reported on standard error. messy but valid.
  • 124 β€” on command line parsing errors. you typed it wrong bestie, it happens.
  • 125 β€” on unexpected internal errors (bugs). not her fault, i promise πŸ’€

πŸ“ ENVIRONMENT πŸ“

These environment variables affect the execution of kapla:

  • KAPLA_LOG_LEVEL β€” Set the log level. she's listening to her environment, as she should.

🧚 EXAMPLES 🧚

You can connect to a remote ERIS block store via SSH port forwarding. Assuming that a Kapla server is running on the remote host remote:

ssh -L ~/.state/local/eris.sock:~/.state/local/eris.sock user@remote

This will forward connections to the local eris.sock to the remote eris.sock. The kapla encode or decode commands will use the remote store.

ngl that's kind of a flex. tunnel era πŸš‡βœ¨


πŸ‘‘ STORE πŸ‘‘

The Kapla store persists blocks of encoded content in multiple CBOR sequences called volumes. Volumes can be removed allowing the store to only keep recently used blocks and operate with bound storage. so like, she forgets on purpose, and that's a feature πŸ’œ

See the help on the volume subcommand (kapla volume --help) for more information.


⭐ SEE ALSO ⭐

kapla-decode(1), kapla-encode(1), kapla-peer(1), kapla-serve(1), kapla-volume(1)

the whole friend group fr 🫢


πŸ’€ FILES πŸ’€

  • eris.sock β€” Unix socket used to connect with block store.
  • kapla.sock β€” Unix socket used to control the Kapla server.

two sockets, two moods, both essential πŸ”₯


πŸŽ€ STANDARDS πŸŽ€

Kapla uses the Encoding for Robust Immutable Storage (ERIS) β€” a scheme for encoding content into uniformly sized and encrypted blocks as well as a short identifier called the read capability. Content can be decoded from the blocks and the read capability.

For more information on ERIS see also:

The Constrained Application Protocol (CoAP) is used for communication between server and frontend as well as to remote peers. See also:

Blocks are stored in CBOR sequences. See also:

the RFC deep dive is real and honestly? obsessed πŸ“šπŸ’…


πŸ’œ LICENSE πŸ’œ

Kapla is Free Software and is available under the terms of the AGPL-3.0-or-later.

free software, free her πŸ¦‹


ok that's the whole page bestie, go forth and encode πŸ’–

Kapla 0.4.0 β€” that's the version, and this was the KAPLA(1) manual, mwah, bye πŸŽ€βœ¨

πŸ“¦ where this page comes from