Overview
The FOKS key-value store lets you store secrets, configuration, and files with end-to-end encryption. The namespace uses a filesystem-like hierarchy with paths like/secrets/api-key or /configs/db.json.
Data is encrypted on your machine before being sent to the server. The server never sees file names or contents.
Common flags
Mostkv subcommands accept these flags:
| Flag | Description |
|---|---|
--team <team> / -t <team> | Act on behalf of a team. Defaults to operating as the logged-in user. |
--mkdir-p / -p | Create parent directories automatically |
--read-role <role> / -r | Minimum role required to read (owner, admin, member, member(n), reader) |
--write-role <role> / -w | Minimum role required to write |
Commands
put
| Flag | Description |
|---|---|
--file / -f | Treat the value argument as a filename to read from (use - for stdin) |
--force | Overwrite an existing entry |
--read-role / -r | Read role for the entry |
--write-role / -w | Write role for the entry |
--mkdir-p / -p | Create parent directories |
get
- is given), prints to stdout. If stdout is a terminal and the data appears to be binary, an error is returned.
| Flag | Description |
|---|---|
--force | Overwrite existing output file |
--force-output | Output to terminal even if data looks binary |
--mode <octal> | File permissions for the output file (e.g. 0600) |
ls
| Flag | Description |
|---|---|
-F / --classify | Append / to directory names |
-l / --long | Long format with entry type and modification time |
-U / --unix-time | Print timestamps as Unix milliseconds |
mkdir
rm
| Flag | Description |
|---|---|
-r / --recursive | Remove a directory and all its contents |
mv
symlink
readlink
get-usage
--team).
rest
Roles
Entries and directories have read and write roles. The role hierarchy is:member role carries a signed integer sub-level n in the range -16384 to 16384 (default 0). Sub-levels are linearizable, so member(1) is higher privilege than member(0), which is higher than member(-1). Plain member is shorthand for member(0).
When you create an entry with --read-role member, only team members with the member(0) role or higher can decrypt it. To restrict to a higher sub-level, use e.g. --read-role member(1). Write permissions are enforced by the server; read permissions are enforced cryptographically.
Paths
Paths are Unix-style hierarchical paths starting with/. Example: