Skip to main content

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

Most kv subcommands accept these flags:

Commands

put

Store a value at the given path.
Flags:

get

Retrieve a value. If no output file is given (or - is given), prints to stdout. If stdout is a terminal and the data appears to be binary, an error is returned.
Flags:

ls

List the contents of a directory in the key-value store.
Flags:

mkdir

Create a directory.

rm

Remove one or more entries.
Flags:

mv

Move or rename an entry.
Create a symbolic link within the key-value store.
Print the target of a symbolic link.

get-usage

Show storage usage for the current user (or team with --team).

rest

Start a local loopback REST API server for the key-value store. Useful for integrating FOKS with scripts or tools that speak HTTP.

Roles

Entries and directories have read and write roles. The role hierarchy is:
The 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: