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

attack-shark-x11-driver

v1.0.1

Published

A TypeScript driver for the Attack Shark X11 gaming mouse, supporting Linux and other platforms via Node.js/Bun and USB HID.

Readme

attack-shark-x11-driver

npm version license Bun Ask DeepWiki

A TypeScript driver for the Attack Shark X11 gaming mouse, providing cross-platform support (focused on Linux) to configure DPI, macros, lighting, and polling rates via USB HID.

The official software is Windows-only; this project provides a way to interact with the device on any platform supported by Node.js or Bun.

Features

  • DPI Configuration: Set stages and active stage.
  • Button Remapping: Fully customizable button behavior.
  • Macros: Support for custom macros and templates.
  • Lighting Control: Change modes and speeds.
  • Polling Rate: Support for 125 Hz to 1000 Hz.
  • Battery Status: Real-time battery monitoring.
  • Cross-platform: Works on Linux, macOS, and Windows.

Installation

bun add attack-shark-x11-driver
# or
npm install attack-shark-x11-driver

Quick Start

import { AttackSharkX11, ConnectionMode, Rate } from 'attack-shark-x11-driver';

const driver = new AttackSharkX11({
  connectionMode: ConnectionMode.Adapter, // or Wired
  delayMs: 300 // Recommended safe delay between packets
});

try {
  await driver.open();

  // Set Polling Rate to 1000Hz (eSports)
  await driver.setPollingRate(Rate.eSports);

  // Configure DPI Stages
  await driver.setDpi({
    dpiValues: [800, 1600, 2400, 3200, 5000, 22000],
    activeStage: 2
  });

  // Get Battery Level
  const battery = await driver.getBatteryLevel();
  console.log(`Battery: ${battery}%`);

} catch (error) {
  console.error('Driver error:', error);
} finally {
  await driver.close();
}

Linux Setup (udev)

To access the device without root permissions on Linux, you need to create an udev rule:

  1. Create the rule file:
    sudo nano /etc/udev/rules.d/99-attack-shark-x11.rules
  2. Add the following lines:
    SUBSYSTEM=="usb", ATTR{idVendor}=="1d57", ATTR{idProduct}=="fa60", MODE="0666", GROUP="plugdev"
    SUBSYSTEM=="usb", ATTR{idVendor}=="1d57", ATTR{idProduct}=="fa55", MODE="0666", GROUP="plugdev"
  3. Reload rules:
    sudo udevadm control --reload-rules
    sudo udevadm trigger

Supported Hardware

| Device | Mode | Status | |------------------|-----------------|------------| | Attack Shark X11 | Wired | Supported | | Attack Shark X11 | 2.4GHz wireless | Supported | | Attack Shark X11 | Bluetooth | Not tested |

Note: Attack Shark R1 might be compatible but hasn't been verified yet.

Important Warnings ⚠️

  • Packet Delay: Sending configuration packets too quickly can cause the firmware to hang. Always maintain at least a 250 ms (500 ms recommended) delay between commands.
  • Recovery: If the mouse stops responding, switch it to Bluetooth mode for a few seconds, then back to 2.4 GHz/Wired.

Contributing

This project is a reverse-engineering effort. Contributions such as protocol documentation, new features, or testing with different hardware are very welcome.

  • Protocol Docs: See docs/ for packet analysis.
  • Tools used: Wireshark, USBPcap.

License

MIT © HarukaYamamoto0


Disclaimer: This project is not affiliated with Attack Shark. Use at your own risk.