Choose the layer
tc secrets
tc secrets stores values in the literal secrets space by default and supports logical scopes with --scope.
--space.
Read and write options
tc secrets manage opens Secret Manager at https://secrets.tinycloud.xyz.
A secret that does not exist yet
tc secrets get on a missing name exits 4 with NOT_FOUND. The hint is a
Secret Manager link for that name, scope, and space, so the owner can add the
value in the browser without it passing through the terminal or an agent.
CLI 1.1.0 beta links straight to the add form with the name filled in.
Give an agent read access to a secret
An agent reads named secrets through its own profile, with a scoped OpenKey login that the owner approves. The manifest names exactly the secrets the agent may read:secrets: { NAME: true }requestskv/geton that one secret,capabilities/readon thesecretsspace, and decrypt on the owner’s default secrets network.--owneris thedid:pkhof the account that will approve. The secrets network belongs to the owner, so a fresh profile needs it; without it the login fails withOWNER_DID_UNKNOWN.- Device login (
--device) cannot grant secrets. Use--pasteor the browser flow. - Run headless without a grant for the name, a secrets command fails fast with
PERMISSION_DENIED(exit5). With a missing or expired session it fails withAUTH_REQUIRED(exit3) and names the scoped login to run.
secrets.listAll() returns every secret name the session can
see, global and scoped, as { name, scope? } entries. It never returns values.
Match an app manifest
An app manifest’ssecrets field and tc secrets address the same encrypted
vault entries when their names and scopes match:
A scoped secret is a separate entry from a global secret with the same name;
TinyCloud does not fall back from one to the other. The manifest declares the
access an app requests during sign-in, while the CLI or SDK writes the value.
See the complete app manifest and resolved path mapping
for a copyable browser-app example.
tc vault
tc vault is the lower-level encrypted KV layer. It requires a private key.
tc vars
tc vars stores plaintext configuration in the variables/ prefix and also requires a private key.
Private keys
UseTC_PRIVATE_KEY or --private-key for vault and vars. secrets can use the active authenticated profile, but it also accepts a private key override.
The CLI source treats
tc secrets network init as the way to create or reuse the default secrets encryption network, and tc secrets doctor as the quickest access check.