The tc kv commands let you store, retrieve, list, and delete key-value data in your space directly from the terminal.
Commands
tc kv put
Store a value at a key.
| Option | Description |
|---|
--file <path> | Read value from a file |
--stdin | Read value from standard input |
Inline value
From file
From stdin
JSON output
$ tc kv put greeting "Hello, World!"
Stored: greeting (13 bytes)
$ tc kv put config/app --file ./config.json
Stored: config/app (1.2 KB)
$ echo '{"theme":"dark"}' | tc kv put user/settings --stdin
Stored: user/settings (16 bytes)
$ tc kv put greeting "Hello, World!" --json
{
"key": "greeting",
"size": 13,
"stored": true
}
tc kv get
Retrieve a value by key.
| Option | Description |
|---|
--raw | Output the raw value without formatting |
--output <path> | Write value to a file |
Human output
Raw output
Save to file
JSON output
$ tc kv get greeting
Key: greeting
Value: Hello, World!
Size: 13 bytes
$ tc kv get greeting --raw
Hello, World!
$ tc kv get config/app --output ./downloaded-config.json
Saved to ./downloaded-config.json (1.2 KB)
$ tc kv get greeting --json
{
"key": "greeting",
"value": "Hello, World!",
"size": 13,
"contentType": "text/plain"
}
tc kv list
List keys in your space.
| Option | Description |
|---|
--prefix <prefix> | Filter keys by prefix |
All keys
With prefix
JSON output
$ tc kv list
Keys in space:
config/app
greeting
user/profile
user/settings
4 keys total
$ tc kv list user/
Keys matching "user/":
user/profile
user/settings
2 keys total
$ tc kv list user/ --json
{
"prefix": "user/",
"keys": [
"user/profile",
"user/settings"
],
"count": 2
}
tc kv delete
Remove a key and its value.
$ tc kv delete greeting
Deleted: greeting
$ tc kv delete greeting --json
{
"key": "greeting",
"deleted": true
}
tc kv head
Get metadata for a key without retrieving its value.
$ tc kv head user/profile
Key: user/profile
Size: 248 bytes
Content-Type: application/json
Updated: 2026-03-07T14:22:00.000Z
$ tc kv head user/profile --json
{
"key": "user/profile",
"size": 248,
"contentType": "application/json",
"updatedAt": "2026-03-07T14:22:00.000Z"
}
Pipeline Examples
The CLI is designed to compose with standard Unix tools. When output is piped, it automatically switches to JSON.
# Capture system info
uname -a | tc kv put system/info --stdin
Use --raw with tc kv get when piping to other tools. This outputs the value directly without any formatting or metadata.