Skip to content

davidkirwan/usefuldb-gem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UsefulDB

A local, tag-searchable notebook for shell commands, URLs, and other snippets. Data is stored in YAML at ~/.usefuldb/db.yaml.

Requires Ruby 3.0+.

Install

gem install usefuldb

From source:

bundle install
make install

Usage

usefuldb help
usefuldb help search

Search

Find entries whose tags match all given terms (use --any for OR):

usefuldb search git push
usefuldb search git commit --value-only
usefuldb search docker --json

Manage entries

usefuldb list
usefuldb show 42
usefuldb count

usefuldb add --tags git,commit --value "git commit -m 'msg'" --description "Commit changes"
usefuldb add    # interactive prompts

usefuldb remove 42
usefuldb remove --tags git,push --value "git push origin main"

Export and import

usefuldb export backup.yaml
usefuldb export backup.json --format json
usefuldb export -o - --format yaml    # stdout

usefuldb import backup.yaml           # merge (default)
usefuldb import backup.yaml --replace # overwrite
usefuldb import -                     # read from stdin

Global options

usefuldb --db /path/to/db.yaml search git
usefuldb -q search git                # quiet
usefuldb -v search git                # verbose
usefuldb --version

Development

make build
make install
make clean

Or use the equivalent rake tasks (build, install, clean).

License

GPL-2.0-only. See COPYING.

About

usefuldb is a simple database which is designed to store useful commands and URLs

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors