Protocol / SDK / CLI
shippedLayer 1 · Protocol

CLI

The tc command-line interface — sign in, host spaces, request capabilities, and read/write KV/SQL/secrets directly from a terminal.

CLI

The tc CLI is the terminal interface to a TinyCloud node: it wraps the SDK so a user or script can sign in, host spaces, request/grant capabilities, and read/write KV/SQL and secrets without writing code.

Shape

Built on @tinycloud/node-sdk (packages/cli/). Representative command areas:

  • auth — sign-in, tc auth request --cap "<cap-string>" --grant to self-grant or request capabilities.
  • space — host / list spaces (space-hosting).
  • kvget/put/list (incl. --space and --raw) over the KV service.
  • sqlquery against a space SQL database (--db, --space).
  • secrets — manage secrets + a doctor flow.

Mechanics

The CLI holds its own session and signs invocations like any SDK client; cap-strings use the service:space:path:actions form. It is the tool the Feed explorer uses to read Listen data via self-granted read capabilities.

Relationships

A thin client over the SDK and data-apis; uses cap-strings; exercises space-hosting, kv, sql, secrets-sharing; the bare-tc access pattern is demonstrated in example-listen.

Status & drift

Shipped. Recently gained space-hosting, auth-request, and secrets-doctor flows; the SDK packages remain the source of truth for behavior.

Sources

  • js-sdk: packages/cli/src/index.ts, packages/cli/src/commands/