| name | tc-cli |
| description | Stores, retrieves, and shares data on TinyCloud using the tc CLI or @tinycloud/node-sdk. Use when the user wants to store key-value data, create sharing links, manage delegations, or interact with a TinyCloud node. |
TinyCloud CLI
Setup
npm install -g @tinycloud/cli
tc init
tc init --paste
tc init --key-only
Creates profile at ~/.tinycloud/profiles/default/ with key, config, and session.
Authentication
tc auth login
tc auth login --paste
tc auth status
tc auth whoami
tc auth logout
Key-Value Storage
tc kv put mykey "value"
tc kv put config '{"k":"v"}'
tc kv put doc --file ./data.txt
echo "data" | tc kv put notes --stdin
tc kv get mykey
tc kv get mykey --raw
tc kv get mykey --raw -o out.txt
tc kv list
tc kv list --prefix "logs/"
tc kv head mykey
tc kv delete mykey
Sharing
tc share create --path kv/mykey --actions kv/get --expiry 7d --web-link
tc share receive "eyJ0eXAi..."
tc share list
tc share revoke shr_abc123
For detailed command reference and all options, see REFERENCE.md.
For programmatic usage with @tinycloud/node-sdk, see SDK.md.
Common Patterns
tc kv put report "$(cat report.json)" && \
tc share create --path kv/report --actions kv/get --expiry 7d --web-link
curl -s https://api.example.com/data | tc kv put snapshot --stdin
tc kv get snapshot --raw | jq '.results'
Exit Codes
| Code | Meaning |
|---|
| 0 | Success |
| 1 | General error |
| 2 | Usage error |
| 3 | Auth required |
| 4 | Not found |
| 5 | Permission denied |
| 6 | Network error |
| 7 | Node error |