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

miray-cli

v2.0.4

Published

MIRAY CLI - Interactive command-line interface for MIRAY

Readme

miray-cli

MIRAY CLI - Interactive command-line interface for MIRAY server.

Installation

Global Install (Recommended)

npm install -g miray-cli

After installation, you can run:

miray-cli

Local Install

npm install miray-cli

Then run with:

npx miray-cli

Usage

Connect to Server

# Default (localhost:7779)
miray-cli

# Custom host and port
miray-cli --host localhost --port 7779

# Short flags
miray-cli -h localhost -p 7779

Interactive Session

$ miray-cli
MIRAY CLI - Memory In-memory Rapid Async Yield
Connecting to localhost:7779...
Connected!

> PING
PONG

> PUSH user:123 "John Doe" 5m
OK

> GET user:123
"John Doe"

> TTL user:123
298

> KEYS user:*
1) "user:123"

> INFO
MIRAY Server v2 (WAL + Binary)

# Storage
keys: 1
memory: ~100 bytes
reads: 1
writes: 1
...

> FLUSH
OK

> exit
Goodbye!

Commands

Connection

  • PING - Test server connectivity
  • INFO - Get server information and statistics

Data Operations

  • PUSH key value [ttl] - Store a key-value pair
    • TTL formats: 30s, 5m, 2h, 1d
  • GET key - Retrieve a value
  • REMOVE key - Delete a key

Key Management

  • KEYS pattern - List keys matching pattern
    • * - All keys
    • user:* - Keys starting with "user:"
    • *:active - Keys ending with ":active"
  • TTL key - Get remaining time-to-live in seconds
    • Returns: seconds remaining, -1 (no expiration), or -2 (key not found)

Administrative

  • FLUSH - Clear all data (use with caution!)

Examples

Store User Data

> PUSH user:1 '{"name":"John","age":30}' 1h
OK

> GET user:1
{"name":"John","age":30}

Session Management

> PUSH session:abc '{"userId":123,"token":"xyz"}' 30m
OK

> TTL session:abc
1799

> GET session:abc
{"userId":123,"token":"xyz"}

Cache Management

> PUSH cache:api:users '[{"id":1,"name":"John"}]' 5m
OK

> KEYS cache:*
1) "cache:api:users"

> REMOVE cache:api:users
1

Pattern Matching

> PUSH user:1 "John"
OK
> PUSH user:2 "Jane"
OK
> PUSH product:1 "Laptop"
OK

> KEYS *
1) "user:1"
2) "user:2"
3) "product:1"

> KEYS user:*
1) "user:1"
2) "user:2"

Options

  • --host, -h: Server host (default: localhost)
  • --port, -p: Server port (default: 7779)

Exit

To exit the CLI:

  • Type exit or quit
  • Press Ctrl+C
  • Press Ctrl+D

Features

  • 📝 Interactive REPL
  • 🎨 Syntax highlighting for responses
  • ⌨️ Command history (use arrow keys)
  • 🔄 Auto-reconnect on connection loss
  • 📊 Server statistics via INFO command

Tips

  1. Use Quotes for Values with Spaces

    > PUSH key "value with spaces"
  2. JSON Data

    > PUSH user '{"name":"John","active":true}'
  3. Check Before Flush

    > INFO
    keys: 1000
    
    > FLUSH
    OK
  4. TTL Monitoring

    > PUSH temp "data" 10s
    OK
    
    > TTL temp
    9
    
    # Wait a bit...
    > TTL temp
    -2

Related Packages

License

MIT