Manage multiple databases with Skate
main@database_name syntax. Databases are created automatically on demand.repository·main·Indexed 23 days ago
https://github.com/charmbracelet/skateA simple and powerful personal key-value store designed for local use. Skate supports strings, binary data, and Unicode, allowing users to organize data into multiple named databases. It provides a CLI for storing, retrieving, listing, and deleting key-value pairs, and is suitable for managing secrets or dynamic data within shell scripts.
@database_name syntax. Databases are created automatically on demand.You can install Skate using various package managers, downloading binaries/packages, or via Go.
# macOS or Linux
brew tap charmbracelet/tap && brew install charmbracelet/tap/skate
# Arch Linux (btw)
pacman -S skate
# Nix
nix-env -iA nixpkgs.skate
# Debian/Ubuntu
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install skate
# Fedora/RHEL
echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=1
gpgkey=https://repo.charm.sh/yum/gpg.key' | sudo tee /etc/yum.repos.d/charm.repo
sudo yum install skate
# Go
go install github.com/charmbracelet/skate@latestSkate is a personal key-value store. You can store strings, binary data, and Unicode characters. Note that as of v1.0.0, Skate operates locally and no longer syncs to the Charm Cloud.
# Store a value
skate set kitty meow
# Fetch a value
skate get kitty
# Store binary data using redirection
skate set profile-pic < my-cute-pic.jpg
skate get profile-pic > here-it-is.jpg
# Use Unicode keys/values
skate set 猫咪 喵
skate get 猫咪skate is a personal key-value store CLI. It allows you to store, retrieve, and list data within specific databases (spaces). You can specify a database using the @DB suffix on keys or as a standalone argument.
KEY@DB@DB is provided, skate uses the default database.set: Store a value.get: Retrieve a value.delete: Remove a key.list: View keys and values.list-dbs: See all available databases.delete-db: Remove an entire database.Skate is useful for managing secrets or dynamic data within shell scripts without hardcoding values.
# Example: Using a stored token in a curl command
skate set gh_token GITHUB_TOKEN
#!/bin/bash
curl -su "$1:$(skate get gh_token)" \
https://api.github.com/users/$1 \
| jq -r '"\(.login) has \(.total_private_repos) private repos"'The set command stores a value for a specific key. You can provide the value as a command-line argument or via standard input (useful for large files or binary data).
skate set KEY[@DB] [VALUE]
# Set a simple string value
skate set foo bar
# Set a value for a specific database
skate set foo@my-space bar
# Set a value by reading from a file via stdin
skate set foo < ./bar.txtThe list command iterates through the database. You can filter the output to show only keys, only values, or use a custom delimiter.
skate list [@DB]
-r, --reverse: List in reverse lexicographic order.-k, --keys-only: Only print keys; do not fetch values.-v, --values-only: Only print values.-d, --delimiter STRING: Delimiter to separate keys and values (default is \t).# List all key-value pairs (default delimiter: tab)
skate list
# List only keys in a specific database
skate list @my-space --keys-only
# List values in reverse order
skate list --reverse --values-only
# List keys and values using a colon as a delimiter
skate list -d ":"The get command retrieves the value associated with a key. If the value is binary and not valid UTF-8, it will be omitted in the terminal unless the --show-binary flag is used.
skate get KEY[@DB]
# Get value from default database
skate get foo
# Get value from a specific database
skate get foo@my-space
# Get value and show raw binary data
skate get foo@my-space --show-binarySkate organizes data into named databases (spaces). You can view all existing databases or delete one entirely.
Use list-dbs (alias ls-db) to see all available databases in your local storage.
skate list-dbsUse delete-db (aliases del-db, rm-db) to remove a database and all its contents. This command will prompt for confirmation.
# Delete the database named 'my-space'
skate delete-db my-spaceNote: If you mistype a database name, skate will attempt to suggest the closest match using Levenshtein distance.
The delete command removes a key and its associated value from the database. It supports aliases del and rm.
skate delete KEY[@DB]
# Delete key from default database
skate delete foo
# Delete key from a specific database
skate delete foo@my-spaceskate list to view contents. You can apply filters to change the output format.| Command | Aliases | Description |
|---|---|---|
set | Set a value for a key (optionally in a specific DB) | |
get | Get a value for a key | |
delete | del, rm | Delete a key |
list | ls | List key-value pairs |
list-dbs | ls-db | List all available databases |
delete-db | del-db, rm-db | Delete an entire database |