Skip to main content

CLI tool for Logitech Options+ device management on macOS

Project description

logi-cli

CLI tool for Logitech Options+ device management on macOS.

Communicates directly with the logioptionsplus_agent daemon via its Unix socket IPC protocol. No GUI needed — the agent runs independently as a system LaunchAgent.

Requirements

  • macOS with Logi Options+ installed (the agent must be running)
  • Python 3.9+
  • Tested with MX Master 3S

Install

pip install -e .

Or just run directly:

python3 logi.py status

Shell completion

# zsh
source completions/logi.zsh

# bash
source completions/logi.bash

Usage

Device status

logi status
MX Master 3S (Wireless Mouse MX Master 3S)
  State:      ACTIVE
  Connection: BLE
  Firmware:   22.0.3
  Battery:    55% [GOOD]
  Pointer:    speed=0.44 (~3632 DPI)
  SmartShift: mode=RATCHET sensitivity=82 enabled=True
  Scroll:     speed=0.62 dir=STANDARD smooth=False
  DPI Range:  200-8000 (step 50)

Configure settings

logi set dpi 1600                    # Set DPI
logi set speed 0.5                   # Pointer speed (0.0-1.0)
logi set smartshift free             # SmartShift: on/off/free
logi set smartshift-sensitivity 50   # SmartShift sensitivity (0-100)
logi set scroll-speed 0.8            # Scroll wheel speed
logi set scroll-direction natural    # Scroll direction: natural/standard

Button remapping

logi buttons                         # Show current assignments
logi button back undo                # Remap to preset action
logi button back "Cmd+Z"             # Remap to custom keystroke
logi button back "Ctrl+Shift+A"      # Any modifier combo
logi button back back                # Restore default

Available buttons: middle, back, forward, gesture

Available actions: back, forward, undo, redo, copy, paste, cut, screenshot, emoji, search, desktop, mission-control, launchpad, smart-zoom, close-tab, do-not-disturb, lookup, switch-apps, dictation

Per-app profiles

logi buttons --profile safari        # View Safari-specific buttons
logi button back undo --profile zoom # Set button for Zoom only
logi profiles                        # List all profiles

Config backup/restore

logi export config.json              # Export all settings
logi import config.json              # Restore settings

Thumb wheel

logi set thumb-direction natural     # Thumb wheel direction
logi set thumb-smooth off            # Thumb wheel smooth scrolling

Declarative config

logi apply config.toml               # Apply all settings from TOML file
logi daemon config.toml              # Auto-apply on device connect

See example.toml for the config format.

Real-time monitoring

logi watch                           # Watch device events (Ctrl+C to stop)

Multi-device

logi -d mx status                    # Select device by name
logi -d dev00000000 set dpi 1600     # Select device by ID

System info

logi info                            # Agent version, OS, etc.

Raw API access

logi raw GET /permissions
logi raw GET /battery/dev00000000/state
logi raw SET /mouse/dev00000000/pointer_speed --payload '{"active":{"value":0.5}}'

Acknowledgements

  • logiops — Unofficial Logitech HID++ driver for Linux. Inspired the idea of a CLI-first approach to Logitech device management. logiops communicates directly via HID++ protocol; logi-cli takes a different approach by talking to the Options+ agent via its IPC socket.

Protocol

See PROTOCOL.md for the reverse-engineered IPC protocol documentation.

83 extracted protobuf definitions are in extracted_protos/.

Architecture

┌──────────┐     Unix Socket (JSON)     ┌──────────────────────┐
│ logi CLI ├────────────────────────────►│ logioptionsplus_agent│
└──────────┘  /tmp/logitech_kiros_agent  │  (system daemon)     │
                                         │  RunAtLoad, KeepAlive│
                                         └──────────┬───────────┘
                                                     │ HID++ / BLE
                                                     ▼
                                              ┌──────────────┐
                                              │ MX Master 3S │
                                              └──────────────┘

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

logi_cli-0.1.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

logi_cli-0.1.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file logi_cli-0.1.0.tar.gz.

File metadata

  • Download URL: logi_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for logi_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 013f91b56758c7b37136a1e13c717bae1aa11997faca40a5ab8f100bcc810750
MD5 917f5abb88b8d5d35f05379f4a23a776
BLAKE2b-256 0570524d37dfed57577d91129884a0bd27cd397dbc1c5fce3f0342302c7b65a1

See more details on using hashes here.

File details

Details for the file logi_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: logi_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for logi_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2bd719daa67290d3f8d35beb1e34d891a6a3e5c7e14f6073617defce6fd6d7c
MD5 ec54e601b56af0d6cf200a868bb46a7c
BLAKE2b-256 bf3d1595244d5423180a65fd080bfe6888fa0604924cc8bf19cca9d4d64c2fed

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page