nostrdb

an unfairly fast embedded nostr database backed by lmdb
git clone git://jb55.com/nostrdb
Log | Files | Refs | Submodules | README | LICENSE

commit dceb01fe80bf075f82add63da3cff10a71756852
parent 39c3cd6dfb970a76508e77fcaafdd08104371ec8
Author: William Casarin <jb55@jb55.com>
Date:   Fri,  1 Dec 2023 10:48:18 -0800

readme: update to mention ndb tool

Diffstat:
MREADME.md | 37+++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -24,3 +24,40 @@ functionality (yet?) The API is *very* unstable. nostrdb is in heavy development mode so don't expect any of the interfaces to be stable at this time. + +## CLI + +nostrdb comes with a handy `ndb` command line tool for interacting with nostrdb +databases. The tool is relatively new, and only supports a few commands. + +### Usage + +``` +usage: ndb [--skip-verification] [-d db_dir] <command> + +commands + + stat + search <fulltext query> + import <line-delimited json file> + +settings + + --skip-verification skip signature validation + -d <db_dir> set database directory +``` + +### Building + +```bash +$ make ndb +``` + +### Fulltext Queries + +nostrdb supports fulltext queries. You can import some test events like so: + +``` +$ ndb --skip-validation import testdata/many-events.json +$ ndb search 'nosy ostrich' +```