node package manager


CLI interface to level-userdb and level-userdb-server databases


CLI interface to databases produced by level-userdb.

This tool can either work against on-disk level-userdb databases, or over the network to a standalone level-userdb-server instance.

LeveDB databases can only be locked by a single process at a time, so level-userdb-server effectively allows administration of a live database.

npm install -g level-userdb-cli

Usage: level-userdb-cli -d [database] -r [server:port] -e [email] -p [password] <COMMAND>
  -d, --database   Path to database location
  -e, --email      email address
  -n, --new-email  new email address
  -p, --password   password
  create  Create a new user with email & password
  delete  Delete a user by email
  edit  Edit a user's data field with $EDITOR
  email  Update a user's email address
  list  List all users
  password  Update a user's password by email
  retrieve  Fetch an existing user by email
  verify  Check password

To operate against a local, on-disk level-userdb database supply the -d [path to database] flag. Note that only a single application can access a LevelDB database at a time, so this must be offline. To access an online database, consider using level-userdb-server.

To connect to a remote level-userdb-server instance, supply the -r host:port flag. For example:

level-userdb-cli -r localhost:9998 -e retrieve

level-userdb-cli -e -p supersecret create

level-userdb-cli list

level-userdb-cli -e modify

This will start $EDITOR so you can edit the JSON in your favourite editor. When you exit the new data will be saved.

level-userdb-cli -e -p wrongpassword verify

level-userdb-cli -e retrieve

level-userdb-cli -e delete

level-userdb-cli -e -p newPassword

level-userdb-cli -e -n