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>" --grantto self-grant or request capabilities. - space — host / list spaces (space-hosting).
- kv —
get/put/list(incl.--spaceand--raw) over the KV service. - sql —
queryagainst 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/