Files
anydb/README.md
Thomas von Dein 83f818450c lots of changes:
- added man command
- added unit tests
- fixed import+export file parameters (now -o and -r respectively)
- added README + License
- added ci pipelines
2024-12-18 18:44:23 +01:00

4.2 KiB
Raw Blame History

A personal key value store

Actions License Go Report Card

Anydb is a simple to use commandline tool to store anything you'd like, even binary files etc. It is a re-implementation of skate for the following reasons:

  • it's just fun to do
  • anydb uses bbolt instead of badger. bbolt has a stable file format, which doesn't change anymore. The badger file format on the other hand changes very often, which is not good for a tool intended to be used for many years.
  • more features

anydb can do all the things you can do with skate:

# Store something (and sync it to the network)
anydb set kitty meow

# Fetch something (from the local cache)
anydb get kitty

# Whats in the store?
anydb list

# Spaces are fine
anydb set "kitty litter" "smells great"

# You can store binary data, too
anydb set profile-pic < my-cute-pic.jpg
anydb get profile-pic > here-it-is.jpg

# Unicode also works, of course
anydb set 猫咪 喵
anydb get 猫咪

# For more info
anydb --help

# Do creative things with anydb list
anydb set penelope marmalade
anydb set christian tacos
anydb set muesli muesli

anydb list | xargs -n 2 printf '%s loves %s.\n'

However, there are more features than just that!

# you can assign tags
anydb set foo bar -t note,important

# and filter for them
anydb list -t important

# beside tags filtering you can also use regexps for searching
anydb list '[a-z]+\d'

# anydb also supports a wide output
anydb list -o wide
KEY     TAGS            SIZE    AGE             VALUE 
blah    important       4 B     7 seconds ago   haha 
foo                     3 B     15 seconds ago  bar  
猫咪                    3 B     3 seconds ago   喵   

# there are shortcuts as well
anydb ls -l
anydb /

# other outputs are possible as well
anydb list -o json

# you can backup your database
anydb export -o backup.json

# and import it somewhere else
anydb import -r backup.json

# it comes with a manpage builtin
anydb man

Installation

There are multiple ways to install anydb:

  • Go to the latest release page, locate the binary for your operating system and platform.

    Download it and put it into some directory within your $PATH variable.

  • The release page also contains a tarball for every supported platform. Unpack it to some temporary directory, extract it and execute the following command inside:

    sudo make install
    
  • You can also install from source. Issue the following commands in your shell:

    git clone https://github.com/TLINDEN/anydb.git
    cd anydb
    make
    sudo make install
    

If you do not find a binary release for your platform, please don't hesitate to ask me about it, I'll add it.

Documentation

The documentation is provided as a unix man-page. It will be automatically installed if you install from source. However, you can read the man-page online

Or if you cloned the repository you can read it this way (perl needs to be installed though): perldoc anydb.pod.

If you have the binary installed, you can also read the man page with this command:

anydb man

Getting help

Although I'm happy to hear from anydb users in private email, that's the best way for me to forget to do something.

In order to report a bug, unexpected behavior, feature requests or to submit a patch, please open an issue on github: https://github.com/TLINDEN/anydb/issues.

This software is licensed under the GNU GENERAL PUBLIC LICENSE version 3.

Authors

T.v.Dein

Project homepage

https://github.com/TLINDEN/anydb

Licensed under the GNU GENERAL PUBLIC LICENSE version 3.

Author

T.v.Dein