TinyStore
Command line / status and logs
On this page

Command line / status and logs

status and logs

status says what a store holds and who serves it. logs prints the application's logs, and follows them as they arrive with -f. Both read beside the program or server that holds the directory, without stopping it and without writing a byte (contract CLI-01).

status

sh
tinystore status ./data
tinystore status ./data --json
○ data  not served

  sql/shop  88 KiB
  ────────────────
  total     88 KiB

A served store adds who serves it, its clients and its memory; a node adds its files, its links and how far behind its copies are. A directory no server holds says so and exits 0. --json gives one document, for a health check or a script.

logs

sh
tinystore logs ./data -f
tinystore logs ./data --since 1h --level warn
tinystore logs ./data --stream api --grep "connection reset"
log
19:42:24.252 ERROR worker  json  level=error msg=boom code=7
19:42:24.252 WARN  worker  level=warn msg="disk low" free=3
FlagDoes
-ffollow new lines as they come, until Ctrl+C
-n <count>how many of the last lines to print first; 20 unless --since
--level <level>trace, debug, info, warn or error, and above
--since <span>lines from the last span: 30s, 15m, 1h, 2d
--grep <text>lines that hold the text, in any case
--stream <name>one stream, as api
--jsonone JSON object a line

logs prints a line as the logger's console does, in the same bytes every language prints, so -f in a terminal reads like the program's own output. -f is a tail: a reader slower than the writers is told how many lines it skipped.

In a script

sh
tinystore status ./data --json | jq '.files[] | select(.bytes > 1e9)'
tinystore logs ./data --since 1h --level error --json | jq -r '.msg' | sort | uniq -c

A terminal gets colour and words, a pipe gets plain lines, and --json gives what a script parses. Colour appears only on a terminal, never under NO_COLOR.

See also

Edit this page on GitHub Updated 19 October 2026

esc
↑↓ navigate ↵ open ⇥ filter 0 results