02. Catnip Installation‐Uninstallation - ElectronicCats/CatSniffer GitHub Wiki

Installation instructions

Windows

[!Important] Catnip installer requires administrator rights to install on your system.

  1. Download the installer catnip-x.x.x.x.exe from the releases section of the CatSniffer Tools repository.

  2. Run the installer and follow the installation wizard. Allow the installation of the USB driver if prompted.

  1. Complete the installation by clicking the "Finish" button to exit the installer.

Catnip is now available system-wide and as an app in your start menu and desktop if you selected these two options during the installation.


macOS

  • System requirements:
    • macOS 11 (Big Sur) or newer
    • Intel or Apple Silicon (M1, M2, M3) Mac
    • At least 100 MB of free disk space

You need to first verify the architecture of your MAC with the command:

uname -m

The command will return any of the following, depending on the Mac architecture

Once you know your architecture, continue with the instructions according to your variant.

Intel Macs(x86_64)

1.Download the installer catnip-x.x.x.x-x86_64.pkg from the from the releases section of the CatSniffer Tools repository.

2.Open a new terminal session in the path where the installer is located.

3.Run the command:

sudo installer -allowUntrusted -pkg catnip-x.x.x.x-x86_64.pkg -target /

Replace the Catnip name to match the actual name of the Catnip installer file.

Apple Silicon Macs (Apple M processors)

1.Download the installer catnip-x.x.x.x-arm64.pkg from the from the releases section of the CatSniffer Tools repository.

2.Open a new terminal session in the path where the installer is located.

3.Run the command:

sudo installer -allowUntrusted -pkg catnip-x.x.x.x-arm64.pkg -target /

Replace the Catnip name to match the actual name of the Catnip installer file.

Post-Installation (macOS)

After installation, you may need to run the following commands to allow your user to access the serial ports:

1.Add your user to the necessary groups.

sudo dseditgroup -o edit -a $(whoami) -t user dialout

2.Install udev-like rules (for serial port access).

sudo catnip setup-env

These commands will:

  • Install udev rules for CatSniffer devices
  • Add your user to the dialout and bluetooth groups
  • Configure permissions for serial ports

3.Log out and log back in for group changes to take effect.


Linux

Debian/Ubuntu (.deb)

  • System Requirements
    • Debian 11+ or Ubuntu 20.04+
    • sudo privileges
    • At least 100 MB of free disk space

1.Download the installer catnip-x.x.x.x.deb from the from the releases section of the CatSniffer Tools repository.

2.Open a new Terminal session in the installer file location.

3.Run the command:

sudo dpkg -i catnip-x.x.x.x.deb

Replace the Catnip name to match the actual name of the Catnip installer file.

4.Install the dependencies, if any are missing, by running the command:

sudo apt-get install -f

[!Note] You can verify Catnip is installed by running the command:

catnip --version

Arch Linux (.pkg.tar.zst)

  • System Requirements
    • Arch Linux (or derivatives like Manjaro)
    • sudo privileges
    • Base-devel package group (for building from source)

1.Download the latest version of the installer package.

URL=$(curl -s https://api.github.com/repos/ElectronicCats/catsniffer-tools/releases/latest | grep "browser_download_url.*pkg.tar.zst" | cut -d '"' -f 4) && wget "$URL"

2.Install the package by running the command.

sudo pacman -U catnip-x.x.x.x.pkg.tar.zst

Replace the Catnip name to match the actual name of the Catnip installer file.

[!Note] You can verify Catnip is installed by running the command:

catnip --version

Arch Linux (Installation from AUR)

If you prefer using an AUR helper:

# Using yay
yay -S catnip

# Using paru
paru -S catnip

Install from Source (All Linux Distributions)

1.Clone the repository.

git clone https://github.com/ElectronicCats/catsniffer-tools.git

2.Navigate to the catnip folder.

cd catsniffer-tools/catnip

3.Install the dependencies.

  • Debian:

     sudo apt-get update
     sudo apt-get install python3 python3-pip python3-venv libusb-1.0-0 libmagic1
    
  • Arch Linux:

    sudo pacman -S python python-pip python-virtualenv libusb file
    

4.Create and activate a virtual environment (recommended).

python3 -m venv venv
source venv/bin/activate

5.Install Python dependencies.

pip install -r requirements.txt

6.Install the package in development mode.

pip install -e .

7.Make the script executable.

chmod +x catnip.py

8.Create a symlink (optional).

sudo ln -s $(pwd)/catnip.py /usr/local/bin/catnip

Post-Installation (All Linux installations)

1.Run the setup command to configure udev rules and user permissions.

sudo catnip setup-env

This command will

  • Install udev rules for CatSniffer devices
  • Add your user to the dialout and bluetooth groups
  • Configure permissions for serial ports

2.Log out and log back in for group changes to take effect.

Extra functions

Shell Completion (macOS and Linux systems)

Install tab completion for your shell.

1.Run the following command.

catnip completion install

[!Note] If you are using a specific shell, you can specify explicitly,e.g.:

catnip completion install --shell bash
catnip completion install --shell zsh
catnip completion install --shell fish

2.Restart your shell.


VHCI Bridge (Linux Only)

1.Check VHCI prerequisites.

catnip vhci check

2.Load kernel module.

sudo modprobe hci_vhci

3.Start the VHCI bridge.

catnip vhci start

Uninstallation instructions

Windows

1.Go to Settings → Apps → Installed Apps → CatSniffer Tools version X.X.X.X.

2.Click on the 3-dot button on the right side and click on Uninstall.

Or run the installer again and select "Remove".


macOS

1.Remove the package receipts.

sudo pkgutil --forget com.electroniccats.catnip

2.Delete the installed files.

sudo rm -rf /usr/local/bin/catnip
sudo rm -rf /usr/local/lib/python3.*/dist-packages/catnip/
sudo rm -rf /usr/local/lib/python3.*/dist-packages/protocol/

Linux

1.Run the command in the Terminal:

sudo dpkg -r catnip
  • Arch Linux:

    sudo pacman -R catnip