soske

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 1, 2023 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Soske

Soske (Stephen's Old-School Key Engine, pronounced sos·kay) is a command-line key-value store written in Go 1.20 by Stephen Malone. It's designed to be a simple, portable plaintext data-dumpster.

# TODO: A slick Asciinema demo.

Installation

Install Soske with go install...

go install github.com/wirehaiku/soske@latest

...or download the latest release for your platform.

Configuration

Soske stores all its data in a single SQLite database in either $XDG_CONFIG_HOME or %APPDATA%, depending on your platform. The database itself is an open standard and there are commands to easily import and export your data.

Commands

Soske's syntax uses the form soske <command> <args...> and is always variadic, meaning you can include multiple final arguments to apply the command multiple times. On success, commands print the requested data or nothing; on failure they print an error message in the form of Error: <error>..

lst SUBSTRINGS...

List all existing keys containing a substring, or all keys if no arguments are provided. Arguments starting with ! list keys that don't contain the substring, multiple arguments apply multiple filters.

$ soske lst
alpha
bravo
charlie

$ soske !alpha !rav
charlie
get KEYS...

Print the value of each key if it exists, or do nothing:

$ soske get alpha
Aye aye aye! 
set KEY VALUES...

Set the value of a new or existing key. Multiple arguments are combined into a single newline-separated value.

$ soske set alpha one two three
$ soske get alpha
one
two
three
del KEYS...

Delete each key if it exists, or do nothing:

$ soske del alpha
exp FILES...

Export the entire database as pretty-printed JSON to each file.

# TODO: Decide export format.
imp FILES...

Import each JSON file into the database.

# TODO: Decide import format.

Contributing

  • Please submit bug reports and feature requests to the issue tracker.
  • Soske's only dependencies are SQLite and Testify.
  • The extra directory contains helper scripts for building and testing Soske.

Documentation

Overview

Soske: Stephen's Old-School Key Engine.

Directories

Path Synopsis
soske
comms
Package comms implements high-level command functions.
Package comms implements high-level command functions.
tools/clui
Package clui implements command-line user interface functions.
Package clui implements command-line user interface functions.
tools/data
Package data implements low-level database functions.
Package data implements low-level database functions.
tools/defs
Package defs implements program constants and definitions.
Package defs implements program constants and definitions.
tools/sqls
Package sqls implements SQL schema definitions.
Package sqls implements SQL schema definitions.
tools/test
Package test implements unit-testing helper functions.
Package test implements unit-testing helper functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL