3 unstable releases

new 0.2.1 May 25, 2024
0.2.0 May 25, 2024
0.1.0 Sep 2, 2022

#87 in Authentication

Download history 12/week @ 2024-02-26 21/week @ 2024-04-01 241/week @ 2024-05-20

241 downloads per month

MIT license

16KB
63 lines

Konpeito

Konpeito is a personal key-value store CLI that can be used to store anything securely to/from the system's keyring.

Crates.io License

How it works

Konpeito uses the Secret Service API (provided by the keyring crate) to store items. This means that the items are stored in the system's keyring, which is a secure(ish) way to store items. The keyring is encrypted and can only be accessed by the user that created it.

This mean that Konpeito is not an actual database, but a wrapper around the keyring API to store tokens, passwords, or any other kind of data and easily retrieve it for CLI usage or scripting. It also means that Konpeito relies on an existing keyring implementation, which means security is not guaranteed as the encryption is done by the keyring implementation, which varies depending on the OS, as follows:

OS Keyring implementation
Linux Linux keyutils, GNOME Keyring, or KWallet
macOS macOS Keychain
Windows Windows Credential Manager

Konpeito reads and writes values using Base64 encoding, this means that you can store any kinds of data, not limited to just text.

Usage

To store items:

konp set key value

If you want to store a file or something from stdin:

konp set key < file

To retrieve items:

konp get key

To delete keys:

konp delete key

Installation

Simply install this crate

From source:

cargo install --path .

From crates.io:

cargo install konpeito

Dependencies

~5–6.5MB
~120K SLoC