8000 GitHub - oxio/kvf: Simple file based Key-Value command line tool, that works with concurrent read and writes
[go: up one dir, main page]

Skip to content
/ kvf Public

Simple file based Key-Value command line tool, that works with concurrent read and writes

License

Notifications You must be signed in to change notification settings

oxio/kvf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kvf - Key Value File CLI tool

Super simple file based Key-Value command line tool that works with concurrent R/W operations.

Installation

go install

go install github.com/oxio/kvf@latest

wget

wget https://github.com/oxio/kvf/releases/latest/download/kvf
chmod +x kvf
mv kvf /usr/local/bin/

Usage

kvf set /path/to/file.kv KEY_ONE value
kvf set /path/to/file.kv KEY_TWO "value with spaces"

kvf get /path/to/file.kv KEY_ONE
kvf get /path/to/file.kv KEY_TWO
Output
value⏎
value with spaces⏎
Note
The keys are case-sensitive.

Getting values from multiple files

The value from last file in which the key is found will be returned.

Set different values for two files
kvf set .env       APP_ENV prod
kvf set .env.local APP_ENV dev
Get the value from first and second file in that order
kvf get .env .env.local APP_ENV
Output
dev⏎

Setting values for multiple files

Set the value for both files
kvf set .env .env.local APP_PORT 8000
Get from first file
kvf get .env APP_PORT
Output
8000
Get the value from second file
kvf get .env.local APP_PORT
Output
8000

Syntax

The syntax of the supported file is mostly compatible with .env files syntax.

# Comments
key=value
key = value
key="value"
key='value'

Features

  • ✓ Support for single and double quotes in values

  • ✓ Support for simple full-line comments (line must start with # character)

  • ✓ Concurrent R/W operations

  • ✓ Reading multiple files with single command

  • ❏ Support for multi-line values

About

Simple file based Key-Value command line tool, that works with concurrent read and writes

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0