Another Redis Desktop Manager

repository·master·Indexed 12 days ago

https://github.com/qishibo/anotherredisdesktopmanager

A high-performance, stable desktop client for managing Redis databases, compatible with Windows, Linux, and macOS. Version 1.1.1 supports handling massive keys, custom viewer scripts for content formatting, and CLI-based connection configuration including SSH and Cluster modes.

Tokens
3.2K
Snippets
12
Records
13
Agent score
49%

What's inside Another Redis Desktop Manager

  1. Build and Package the Application

    master

    To create distributable packages for different platforms, use the following commands:

    1. Prepare: Run npm run pack:prepare before building.
    2. Windows (64-bit): npm run pack:win
    3. Windows (32-bit): npm run pack:win32
    4. Mac: npm run pack:mac
    5. Linux: npm run pack:linux
    npm run pack:prepare
    npm run pack:win
    npm run pack:win32
    npm run pack:mac
    npm run pack:linux
  2. Install Another Redis Desktop Manager on Mac

    master

    You can install Another Redis Desktop Manager on macOS using these methods:

    1. DMG: Download the latest .dmg package from GitHub releases or Gitee and double-click to install.
    2. Homebrew: Use the command brew install --cask another-redis-desktop-manager.
    3. App Store: Purchase and install via the Mac App Store to support the developer.

    Troubleshooting: If the application fails to open after installation via brew or dmg, run the following command to remove the quarantine attribute and then reopen the app: sudo xattr -rd com.apple.quarantine /Applications/Another\ Redis\ Desktop\ Manager.app

    brew install --cask another-redis-desktop-manager
    sudo xattr -rd com.apple.quarantine /Applications/Another\ Redis\ Desktop\ Manager.app
  3. Configure a Custom Viewer script

    master

    When the default viewer is insufficient, you can create a custom script to format Redis content.

    Setup Steps:

    1. Pull down the viewer list to the bottom.
    2. Click Custom -> Add.
    3. Configure the following fields:
    • Name: A custom identifier for your viewer.
    • Command: The executable (e.g., ./script.py, /bin/node, /bin/bash). If using a direct script path, ensure it has execute (x) permissions.
    • Params: Arguments passed to the command. Use placeholders to inject Redis data:
      • {KEY}: The Redis key.
      • {VALUE}: The Redis value.
      • {HEX}: The hexadecimal string of the value (useful for binary data). If the HEX string exceeds 8000 characters, it is written to a temporary file.
      • {HEX_FILE}: The path to the temporary file containing the large HEX string.

    Important Note: Your script must output the formatted content using standard output methods like print, console.log, or echo (supporting strings or JSON strings).

    ### Example: Using a Python decoder with HEX
    | Command | Params |
    | ------ | ------ |
    | `/home/qii/pickle_decoder.py` | `{HEX}` |
    
    ### Example: Using Node.js without execute permission
    | Command | Params |
    | ------ | ------ |
    | `/bin/node` | `/home/qii/node_decoder.js {HEX} --key={KEY}` |
  4. Start Another Redis Desktop Manager via CLI

    master

    You can launch the application from the command line and pass connection arguments directly. This is useful for automating connections or passing specific configurations like SSH or Cluster modes.

    Platform-specific launch commands:

    • Linux: ./Another Redis Desktop Manager.AppImage
    • Mac: open /Applications/Another\ Redis\ Desktop\ Manager.app --args
    • Windows: "D:\xxxx\Another Redis Desktop Manager.exe" (followed by arguments)
    # Example: Connect to a local instance with authentication and a custom name
    ./Another\ Redis\ Desktop\ Manager.AppImage --host 127.0.0.1 --port 6379 --auth 123 --name tmp_connection
    
    # Example: Connect to a Cluster via SSH
    ./Another\ Redis\ Desktop\ Manager.AppImage --ssh-host 192.168.0.110 --ssh-username root --ssh-password 123 --cluster
  5. Install Another Redis Desktop Manager on Windows

    master

    You can install Another Redis Desktop Manager on Windows using several methods:

    1. Direct Download: Download the latest .exe package from the GitHub releases or Gitee and double-click to install.
    2. Chocolatey: Use the command choco install another-redis-desktop-manager.
    3. Winget: Use the command winget install qishibo.AnotherRedisDesktopManager.
    4. Microsoft Store: Purchase and install via the Windows Store to support the developer.
    choco install another-redis-desktop-manager
    winget install qishibo.AnotherRedisDesktopManager
  6. Install Another Redis Desktop Manager on Linux

    master

    You can install Another Redis Desktop Manager on Linux using these methods:

    1. AppImage: Download the latest AppImage from GitHub releases or Gitee, run chmod +x <filename>, and double-click to run.
    2. Snap: Use the command sudo snap install another-redis-desktop-manager.

    Note for Snap users: If you encounter a 'permission denied' error when selecting a private key, grant access to your ~/.ssh folder by running: sudo snap connect another-redis-desktop-manager:ssh-keys

    sudo snap install another-redis-desktop-manager
    sudo snap connect another-redis-desktop-manager:ssh-keys
  7. Build the Dev Version (Linux or Mac)

    master

    To build and run the development version on Linux or Mac, follow these steps:

    1. Clone the repository: git clone https://github.com/qishibo/AnotherRedisDesktopManager.git --depth=1
    2. Navigate to the directory: cd AnotherRedisDesktopManager
    3. Install dependencies: npm install (If Electron download fails, use ELECTRON_MIRROR="https://npmmirror.com/mirrors/electron/" npm install)
    4. Start the development server with hot reload at localhost:9988: npm start
    5. In a new terminal tab, build the desktop client: npm run electron

    Linux Dependency: If you encounter a fontconfig/fontconfig.h: No such file or directory error, install the development library: sudo apt install libfontconfig1-dev

    git clone https://github.com/qishibo/AnotherRedisDesktopManager.git --depth=1
    cd AnotherRedisDesktopManager
    npm install
    npm start
    npm run electron
  8. Build the Dev Version (Windows)

    master

    To build and run the development version on Windows, follow these steps:

    1. Clone the repository: git clone https://github.com/qishibo/AnotherRedisDesktopManager.git --depth=1
    2. Navigate to the directory: cd AnotherRedisDesktopManager
    3. Install dependencies (using win32 platform): npm install --platform=win32 (If Electron download fails, use npm config set ELECTRON_MIRROR https://npmmirror.com/mirrors/electron/ then run npm install --platform=win32)
    4. Start the development server with hot reload at localhost:9988: npm start
    5. In a new terminal tab, build the desktop client: npm run electron
    git clone https://github.com/qishibo/AnotherRedisDesktopManager.git --depth=1
    cd AnotherRedisDesktopManager
    npm install --platform=win32
    npm start
    npm run electron
  9. Troubleshoot Redis Cluster connections in internal networks

    master

    To connect to a Redis Cluster located in an internal network (e.g., Docker, LAN, or AWS), use the SSH + Cluster approach:

    1. Use SSH to tunnel into the internal network.
    2. Provide the internal IP of the Redis host in the --host field.
    3. Enable the --cluster flag.

    How to find the internal IP: Connect via SSH without the Cluster option enabled, open the console, and execute the command CLUSTER NODES. Select any IP address from the resulting output to use as your host.

  10. Configure the production build settings

    master

    The build configuration object defines how the application is bundled for production.

    Key behaviors:

    • Assets: The output directory is defined by assetsRoot (defaults to ../dist) and the public path is set to ./ for relative pathing.
    • Source Maps: productionSourceMap is set to false by default.
    • Gzip: productionGzip is false by default. To enable it, you must install compression-webpack-plugin.
    • Bundle Analysis: You can trigger a bundle analyzer report by running the build command with the --report argument, or by setting the bundleAnalyzerReport key via the environment variable process.env.npm_config_report.
    // Example of how build settings are structured in config/index.js
    module.exports = {
      build: {
        index: path.resolve(__dirname, '../dist/index.html'),
        assetsRoot: path.resolve(__dirname, '../dist'),
        assetsSubDirectory: 'static',
        assetsPublicPath: './',
        productionSourceMap: false,
        productionGzip: false,
        productionGzipExtensions: ['js', 'css'],
        bundleAnalyzerReport: process.env.npm_config_report
      }
    }
  11. Configure the development server settings

    master

    The dev configuration object controls the behavior of the local development server. You can override the host and port using environment variables process.env.HOST and process.env.PORT respectively. If the specified port is already in use, the server will automatically determine a free port.

    // Example of how dev settings are structured in config/index.js
    module.exports = {
      dev: {
        host: 'localhost', // can be overwritten by process.env.HOST
        port: 9988,        // can be overwritten by process.env.PORT
        autoOpenBrowser: false,
        errorOverlay: true,
        notifyOnErrors: true,
        poll: false,
        devtool: 'cheap-module-eval-source-map',
        cacheBusting: true,
        cssSourceMap: true
      }
    }
  12. Reference: CLI Arguments for Connection Configuration

    master

    The following command-line arguments are available for configuring connections at startup.

    #### Common
    | Args | Description |
    | ------ | ------ |
    | --host | Redis host*
    | --port | Redis port|
    | --auth | Password |
    | --name | Custom name|
    | --separator | Key separator |
    | --readonly | Enable readonly mode|
    | --username | Username(Redis6 ACL)|
    | --save| Enable saving, one-time link by default|
    
    #### SSH
    | Args | Description |
    | ------ | ------ |
    | --ssh-host | SSH host*
    | --ssh-port | SSH port(default:22)|
    | --ssh-username | Username*
    | --ssh-password | Password|
    | --ssh-private-key | Path of private key |
    | --ssh-passphrase | Password of private key|
    | --ssh-timeout | SSH timeout(s) |
    
    #### CLUSTER
    | Args | Description |
    | ------ | ------ |
    | --cluster | Enable CLUSTER mode |
    
    #### SSL
    | Args | Description |
    | ------ | ------ |
    | --ssl | Enable SSL*
    | --ssl-key | SSL Private Key Pem|
    | --ssl-ca | SSL Certificate Authority |
    | --ssl-cert | SSL Public Key Pem|
    
    #### SENTINEL
    | Args | Description |
    | ------ | ------ |
    | --sentinel-master-name | Name of master group*,like 'mymaster'
    | --sentinel-node-password | Password of Redis node |