node package manager



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

Local, On-Disk Usage

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.

Remote Network Usage

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

Supported Operations

Adding a user

level-userdb-cli -e -p supersecret create

List all users

level-userdb-cli list

Modifying a user's data

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.

Checking a password

level-userdb-cli -e -p wrongpassword verify

Retrieve a user record

level-userdb-cli -e retrieve

Delete a user record

level-userdb-cli -e delete

Change a user's password

level-userdb-cli -e -p newPassword

Change a user's email address

level-userdb-cli -e -n