1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
# Skate
<p>
<img src="https://stuff.charm.sh/skate/skate-header.png?2" width="480" alt="A nice rendering of a roller skate with the words ‘Charm Skate’ next to it"><br>
<a href="https://github.com/charmbracelet/skate/releases"><img src="https://img.shields.io/github/release/charmbracelet/skate.svg" alt="Latest Release"></a>
<a href="https://github.com/charmbracelet/skate/actions"><img src="https://github.com/charmbracelet/skate/workflows/build/badge.svg" alt="Build Status"></a>
</p>
A personal key-value store. 🛼
Skate is simple and powerful. Use it to save and retrieve anything you’d
like—even binary data. It’s fully encrypted, backed up to the cloud (that you
can self-host if you want) and can be synced with all your machines.
```bash
# Store something (and sync it to the network)
skate set kitty meow
# Fetch something (from the local cache)
skate get kitty
# What’s in the store?
skate list
# Pull down the latest data
skate sync
# Spaces are fine
skate set "kitty litter" "smells great"
# You can store binary data, too
skate set profile-pic < my-cute-pic.jpg
skate get profile-pic > here-it-is.jpg
# Unicode also works, of course
skate set 猫咪 喵
skate get 猫咪
# For more info
skate --help
# Do creative things with skate list
skate set penelope marmalade
skate set christian tacos
skate set muesli muesli
skate list | xargs -n 2 printf '%s loves %s.\n'
```
## Installation
Use a package manager:
```bash
# 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
echo 'deb [trusted=yes] https://repo.charm.sh/apt/ /' | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install skate
# Fedora
echo '[charm]
name=Charm
baseurl=https://repo.charm.sh/yum/
enabled=1
gpgcheck=0' | sudo tee /etc/yum.repos.d/charm.repo
sudo yum install skate
```
Or download it:
* [Packages][releases] are available in Debian and RPM formats
* [Binaries][releases] are available for Linux, macOS, and Windows
Or just install it with `go`:
```bash
go install github.com/charmbracelet/skate@latest
```
[releases]: https://github.com/charmbracelet/skate/releases
## Other Features
### Databases
Sometimes you’ll want to separate your data into different databases:
```bash
# Database are automatically created on demand
skate set secret-boss-key@work-stuff password123
# Most commands accept a @db argument
skate set "office rumor"@work-stuff "penelope likes marmalade"
skate get "office rumor"@work-stuff
skate list @work-stuff
# Wait, what was that db named?
skate list-dbs
# Oh no, the boss is coming!
skate reset @work-stuff
```
### Linking
One of the most powerful features of Skate is its ability to link two machines
together so they have access to the same data. To link two machines together
just run:
```bash
skate link
```
And follow the instructions. Keep in mind that you'll need access to both
machines.
### Syncing
When you run `skate set`, data is encrypted and synced to the network. When
you `get`, however, data is loaded from the local cache. To fetch any new data
from the server just run `skate sync`.
## Examples
Here are some of our favorite ways to use `skate`.
### Keep secrets out of your scripts
```bash
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"'
```
### Keep passwords in their own database
```bash
skate set github@password.db PASSWORD
skate get github@password.db
```
### Use scripts to manage data
```bash
#!/bin/bash
skate set "$(date)@bookmarks.db" $1
skate list @bookmarks.db
```
What do you use `skate` for? [Let us know](mailto:vt100@charm.sh).
## Self-Hosting
Skate is backed by the Charm Cloud. By default it will use the Charm hosted
cloud, but it’s incredibly easy to self-host, even if that’s just on your
local network. For details, see the [Charm docs][selfhost].
[selfhost]: https://github.com/charmbracelet/charm#self-hosting
## Hey, Developers
Skate is built on [charm/kv](https://github.com/charmbracelet/charm#charm-kv). If
you’d like to build a tool that includes a user key value store, check it out.
Skate has the same functionality as `charm kv`, but it uses a separate database.
## FAQ
Skate is built off of [Charm FS][charm].
Refer to [its FAQ][faq] for more info.
[charm]: https://github.com/charmbracelet/charm
[faq]: https://github.com/charmbracelet/charm#faq
## Feedback
We’d love to hear your thoughts on this project. Feel free to drop us a note!
* [Twitter](https://twitter.com/charmcli)
* [The Fediverse](https://mastodon.technology/@charm)
* [Slack](https://charm.sh/slack)
## License
[MIT](https://github.com/charmbracelet/skate/raw/main/LICENSE)
***
Part of [Charm](https://charm.sh).
<a href="https://charm.sh/"><img alt="The Charm logo" src="https://stuff.charm.sh/charm-badge.jpg" width="400"></a>
Charm热爱开源 • Charm loves open source
|