Project

usefuldb

0.0
Low commit activity in last 3 years
A long-lived project that still receives updates
Accessible through a command-line script, UsefulDB lets you store and search useful commands and URLs by tag.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 4.0
~> 13.0

Runtime

>= 1.6
 Project Readme

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.