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

rediseed

v1.0.0

Published

Blazing-fast Redis data seeder & loader from CSV, JSON, and line streams for k6 load testing, staging fixtures, and queue populating.

Readme

⚡ rediseed (seedx / redisx)

Blazing-fast Redis data seeder & loader from CSV, JSON, and line streams.
Built for k6 performance testing, unique token popping (SPOP), queue fixture populating, and instant Redis inspection.

npm version License: MIT


🚀 Key Features

  • 🏎️ High Throughput: Pipelined batch insertion processing 100k+ records/sec.
  • 🎯 Load-Testing Ready (k6 / Locust / JMeter): Pre-seed test users, auth tokens, or session IDs into Redis Sets for collision-free SPOP or SRANDMEMBER consumption.
  • 📁 Universal Input Formats: Auto-detects and loads CSV, TSV, JSON arrays, JSONL / NDJSON, and plaintext line streams.
  • 🗄️ All Redis Structures Supported:
    • Sets (SADD): Collision-free unique user/token pools.
    • Lists (RPUSH / LPUSH): FIFO order queues & worker queues.
    • Hashes (HSET): Structured records indexed by primary key column.
    • Sorted Sets (ZADD): Prioritized or timestamp-ordered items.
    • String Keys (SET): Individual key-values with optional TTL expiration.
  • 🧩 Dynamic Key & Value Templating: Define schema patterns like --key "user:{{tenant_id}}:{{user_id}}" or --value "{{email}}:{{token}}".
  • 🔍 Inspect & Verify: Check key data types, card/lengths, memory usage, and preview sample items in the terminal.
  • 📝 k6 Snippet Generator: Instantly generate ready-to-run xk6-redis load testing scripts.

📦 Installation

Run instantly via npx or install globally:

# Run directly with npx
npx rediseed --help
npx seedx --help
npx redisx --help

# Or install globally
npm install -g rediseed

⚡ Quick Usage Examples

1. 🎯 Load Test User Tokens into a Redis Set (for k6 SPOP)

Given a users.csv file:

id,username,token
1,alice,tok_live_948172
2,bob,tok_live_109283
3,charlie,tok_live_771920

Load all tokens into a Redis set k6:auth_tokens:

# Using the shortcut set command
seedx set k6:auth_tokens users.csv --column token --flush

# Or with custom Redis URL
seedx set k6:auth_tokens users.csv --column token --url redis://:[email protected]:6379/0

2. 🧩 Seed Hash Records with Dynamic Key Templating

Seed each row as an individual Redis Hash keyed by user ID:

seedx seed users.csv --structure hash --key "app:users:{{id}}" --flush

3. 🔍 Inspect Seeded Redis Keys

Verify the count, data type, memory footprint, and preview sample items:

seedx inspect k6:auth_tokens

Output:

🔍 Redis Key Inspector
  • Key: k6:auth_tokens
  • Type: SET
  • Total Items: 50,000
  • TTL: No Expiration
  • Memory Usage: 412.50 KB

Sample Items:
  • tok_live_948172
  • tok_live_109283
  • tok_live_771920

4. 📝 Generate k6 Load Test Script

Generate a ready-to-run k6 test script consuming the seeded tokens via xk6-redis:

seedx k6 k6:auth_tokens --structure set

Output:

import http from 'k6/http';
import { check, sleep } from 'k6';
import redis from 'k6/x/redis';

const client = new redis.Client('redis://localhost:6379');

export const options = {
  vus: 50,
  duration: '1m',
};

export default function () {
  // Pop unique token (guarantees NO collision between VUs)
  const uniqueToken = client.spop('k6:auth_tokens');

  if (!uniqueToken) {
    console.warn('Tokens exhausted!');
    return;
  }

  const res = http.get('https://api.example.com/v1/profile', {
    headers: { Authorization: `Bearer ${uniqueToken}` },
  });

  check(res, { 'status is 200': (r) => r.status === 200 });
  sleep(0.1);
}

🛠️ CLI Options Reference

Usage: rediseed [options] [command]

Options:
  -v, --version               Output current version
  -u, --url <url>             Redis connection URL (redis:// or rediss://)
  -h, --host <host>           Redis host (default: "127.0.0.1")
  -p, --port <port>           Redis port (default: "6379")
  -a, --password <password>   Redis password
  -n, --db <db>               Redis database index (0-15)
  --tls                       Enable TLS connection

Commands:
  seed [options] <file>       Seed CSV, JSON, or line file into Redis
  set [options] <key> <file>  Shortcut to load column into Redis Set
  inspect [options] <key>     Inspect type, item count, memory & samples
  k6 [options] <key>          Generate ready-to-run k6 test script

🛡️ License

MIT © authoritydmc