npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

valenciash

v0.3.0

Published

ValenciaDB Shell.

Readme

valenciash (ValenciaDB Shell and import/export tools)

NPM version

Commands installed:

  • valenciash. ValenciaDB Shell.
  • valenciaexp. ValenciaDB export tool.
  • valenciaimp. ValenciaDB import tool.

Install

npm install -g valenciash

valenciash

valenciash is the ValenciaDB Shell, similar to the Node.js shell. We can print its help as follows:

valenciash

To connect to a database instance:

$ valenciash -e http://localhost:46000 -u root -p valencia
Connecting as root at http://localhost:46000...
root@http://localhost:46000>

Once connected, you can use the .help command to print the internal commands:

root@http://localhost:46000> .help
.break    Sometimes you get stuck, this gets you out
.clear    Break, and also clear the local context
.db       Print db object help
.editor   Enter editor mode
.exit     Exit the repl
.help     Print this help message
.load     Load JS from a file into the REPL session
.save     Save all evaluated commands in this REPL session to a file
root@http://localhost:46000>

db object

The db object/variable contains the entry point to use. Its help is printed with .db:

root@http://localhost:46000> .db
db.store.count()         Number of documents.
db.store.exists(filter)  Does document exist?
db.store.find(filter)    Return document(s).
db.store.findAll()       Return all documents.
db.store.findOne(filter) Return one document.
db.store.insert(doc)     Insert a document.
db.store.remove(filter)  Remove document(s).
db.store.replace(doc)    Replace a document.
db.store.truncate()      Remove all documents.
root@http://localhost:46000>

Example of use:

root@http://localhost:46000> db.bands.findAll()
[ { pk: 'sad-lovers-and-giants', name: 'Sad Lovers & Giants' },
  { pk: 'the-chameleons', name: 'The Chameleons' } ]
root@http://localhost:46000>

valenciexp

valenciaexp is the tool for exporting data. Its help can be printed as follows:

$ valenciaexp

Exporting data from stores

To export documents from user stores, we can use the valenciaexp data command. Help with:

$ valenciaexp data

Example:

$ valenciaexp data -e http://localhost:46000 -u root -p valencia -o bkDir --verbose 2
Connecting as root at http://localhost:46000...
Creating bkDir if needed...
Exporting db.bands to bkDir/bands.json...
Exporting db.albums to bkDir/albums.json...
Data export performed.
$

If you want to export some stores, use the -l option. Example:

$ valenciaexp data -e http://localhost:46000 -u root -p valencia -l bands albums -o bkDir --verbose 2
Connecting as root at http://localhost:46000...
Creating bkDir if needed...
Exporting db.bands to bkDir/bands.json...
Exporting db.albums to bkDir/albums.json...
Data export performed.
$

If you need to export system stores, use the -l option.

valenciaimp

valenciaimp is the tool for importing data. To print its help:

$ valenciaimp

Importing data to stores

To import data to stores, we can use the valenciaimp data command. Help with:

$ valenciaimp data

Example:

$ valenciaimp data -e http://localhost:46000 -u root -p valencia -s bkDir --verbose 2 -t
Connecting as root at http://localhost:46000...
Reading bkDir...
Truncating db.albums...
Reading bkDir/albums.json...
Inserting 0 document(s) into db.albums...
Truncating db.bands...
Reading bkDir/bands.json...
Inserting 2 document(s) into db.bands...
Data import performed.
$

Important. The stores must already exist.