@redis-dev-panel/cli 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +96 -0
  2. package/package.json +2 -2
  3. package/src/index.js +10 -1
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # @redis-dev-panel/cli
2
+
3
+ > Zero-install CLI for Redis Dev Panel. Run with `npx` — no global install needed.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@redis-dev-panel/cli?color=D93B30)](https://npmjs.com/package/@redis-dev-panel/cli)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@redis-dev-panel/cli)](https://npmjs.com/package/@redis-dev-panel/cli)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/your-org/redis-dev-panel/blob/main/LICENSE)
8
+ [![Node.js](https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen)](https://nodejs.org)
9
+
10
+ Launch a full visual Redis debugger from your terminal in one command. No installation, no config files, no Docker.
11
+
12
+ ---
13
+
14
+ ## Usage
15
+ ```bash
16
+ npx @redis-dev-panel/cli start
17
+ ```
18
+
19
+ Opens the panel at `http://127.0.0.1:5174`.
20
+
21
+ ---
22
+
23
+ ## Commands
24
+
25
+ ### `start` — Launch the panel
26
+
27
+ | Option | Default | Description |
28
+ |--------|---------|-------------|
29
+ | `--url <url>` | `redis://localhost:6379` | Redis connection URL |
30
+ | `--port <port>` | `5174` | Port to run the panel on |
31
+ | `--host <host>` | `127.0.0.1` | Host to bind to |
32
+ | `--token <token>` | — | Bearer token to protect the panel |
33
+ | `--open` | `false` | Auto-open browser on start |
34
+ ```bash
35
+ npx @redis-dev-panel/cli start
36
+ npx @redis-dev-panel/cli start --url redis://:password@localhost:6379
37
+ npx @redis-dev-panel/cli start --url rediss://myhost:6380
38
+ npx @redis-dev-panel/cli start --port 8080 --open
39
+ npx @redis-dev-panel/cli start --token supersecret
40
+ ```
41
+
42
+ ### `check` — Test Redis connectivity
43
+
44
+ Tests the connection and exits. Exit codes: `0` = reachable, `1` = failed.
45
+ ```bash
46
+ npx @redis-dev-panel/cli check
47
+ npx @redis-dev-panel/cli check --url redis://staging.internal:6379
48
+ npx @redis-dev-panel/cli check && npm run dev
49
+ ```
50
+
51
+ ---
52
+
53
+ ## Environment variables
54
+ ```bash
55
+ REDIS_URL=redis://localhost:6379
56
+ PORT=5174
57
+ HOST=127.0.0.1
58
+ AUTH_TOKEN=your-secret
59
+ NODE_ENV=development
60
+ ```
61
+
62
+ ---
63
+
64
+ ## What you get
65
+
66
+ | Feature | Description |
67
+ |---------|-------------|
68
+ | 🔍 Key Explorer | Browse all key types — string, hash, list, set, zset, stream |
69
+ | 📡 Live Monitor | Stream every Redis command in real-time |
70
+ | 🔔 Pub/Sub Inspector | Subscribe to channels, publish test messages |
71
+ | ⏱ Expiring Keys | See keys about to expire with a TTL heatmap |
72
+ | 📊 Metrics | Live memory, ops/sec, hit rate charts |
73
+ | 🔗 Multi-Connection | Switch between Redis instances at runtime |
74
+
75
+ ---
76
+
77
+ ## Security
78
+
79
+ - Binds to `127.0.0.1` — not reachable from the network
80
+ - Blocked when `NODE_ENV=production`
81
+ - Use `--token` on shared machines
82
+
83
+ ---
84
+
85
+ ## Related
86
+
87
+ - [`@redis-dev-panel/server`](https://npmjs.com/package/@redis-dev-panel/server) — embed the panel in your Node.js app
88
+ - [`@redis-dev-panel/core`](https://npmjs.com/package/@redis-dev-panel/core) — Redis abstraction engine
89
+
90
+ [GitHub](https://github.com/your-org/redis-dev-panel) · [Issues](https://github.com/your-org/redis-dev-panel/issues)
91
+
92
+ ---
93
+
94
+ ## License
95
+
96
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redis-dev-panel/cli",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "CLI for Redis Dev Panel — npx redis-dev-panel",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "commander": "^12.1.0",
26
26
  "ioredis": "^5.9.3",
27
- "@redis-dev-panel/server": "1.0.0"
27
+ "@redis-dev-panel/server": "1.0.3"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=18.0.0"
package/src/index.js CHANGED
@@ -3,7 +3,16 @@
3
3
 
4
4
  import { program } from 'commander';
5
5
  import { startRedisPanel } from '@redis-dev-panel/server';
6
- import pkg from '../package.json';
6
+ import { readFileSync } from 'fs';
7
+ import { fileURLToPath } from 'url';
8
+ import path from 'path';
9
+
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = path.dirname(__filename);
12
+
13
+ const pkg = JSON.parse(
14
+ readFileSync(path.join(__dirname, '../package.json'), 'utf-8')
15
+ );
7
16
 
8
17
  program
9
18
  .name('redis-dev-panel')