kvu

Crates.iokvu
lib.rskvu
version0.1.3
sourcesrc
created_at2022-07-04 19:13:49.297273
updated_at2022-07-08 10:14:59.998865
descriptionThe simplest command line tool to manage key-value pair lines.
homepagehttps://github.com/jihchi/kvu
repositoryhttps://github.com/jihchi/kvu
max_upload_size
id619124
size28,546
Jihchi Lee (jihchi)

documentation

https://docs.rs/kvu

README

kvu

Workflows - CI crates.io version crates.io license crates.io downloads docs.rs

The simplest command line tool to manage key-value pair lines.

┌──────────────────────────┐                                         ┌──────────────────────────┐
│ DB_URI=postgres://db/kvu │         ┌─────────────────────┐         │ DB_URI=postgres://db/kvu │
│ DB_USERNAME=username     │──stdin─▶│ kvu DB_USERNAME=kvu │─stdout─▶│ DB_USERNAME=kvu          │
│ DB_PASSWORD=password     │         └─────────────────────┘         │ DB_PASSWORD=password     │
└──────────────────────────┘                                         └──────────────────────────┘

Installation

From binaries

The release page includes precompiled binaries for Linux, macOS and Windows.

From Cargo

With Rust's package manager cargo, you can install kvu via:

cargo install kvu

Note that rust version 1.62.0 or later is required.

Usage

Arguments without any flag works as upsert operation - create new pair if the key does not exist, or update the value of the key if the key does exist.

$ echo -e "BUCKET=public\nREGION=ap-southeast-1" | kvu TOKEN=348a1912 REGION=eu-north-1
BUCKET=public
REGION=eu-north-1
TOKEN=348a1912

-c/--create Create new pair

Does nothing when the key exists.

$ echo -e "BUCKET=public\nREGION=ap-southeast-1" | kvu --create REGION=eu-north-1
BUCKET=public
REGION=ap-southeast-1

-u/--update Update existing pair

Does nothing when the key does not exist.

$ echo -e "BUCKET=public\nREGION=ap-southeast-1" | kvu --update TOKEN=348a1912 
BUCKET=public
REGION=ap-southeast-1

-d/--delete Delete existing pair

Does nothing when the key does not exist.

$ echo -e "BUCKET=public\nREGION=ap-southeast-1" | kvu --delete REGION
BUCKET=public
Commit count: 40

cargo fmt