Skip to main content

CLI for managing and controlling Shelly devices

Project description

shelly

A fast CLI for discovering, monitoring, and controlling Shelly smart home devices.

CI crates.io License: MIT

Features

  • Auto-discovery of Shelly devices on the local network
  • Unified Gen1 + Gen2/Gen3 support (transparent protocol handling)
  • Interactive watch dashboard with live power, temperature, WiFi monitoring -- and switch control
  • Device health checks (temperature, WiFi signal, firmware, uptime)
  • Device groups with filter-based and name-based definitions
  • Firmware check and update across all devices
  • Device renaming from the CLI
  • Structured JSON output for scripting and AI agent integration
  • Shell completions (bash, zsh, fish, powershell)
  • Fuzzy device name matching with "did you mean?" suggestions
  • Color output with automatic detection

Install

uv (recommended)

uv tool install shelly-cli

pip

pip install shelly-cli

Cargo

cargo install shelly-cli

Homebrew (macOS/Linux)

brew install rvben/tap/shelly-cli

Pre-built binaries

Download from GitHub Releases.

From source

git clone https://github.com/rvben/shelly-cli.git
cd shelly-cli
cargo install --path .

Quick Start

# 1. Discover devices on your network
shelly discover --subnet 192.168.1.0/24

# 2. See what you found
shelly devices

# 3. Check device health
shelly health

Usage

Device control

shelly on "Kitchen Light"          # Turn on
shelly off "Kitchen Light"         # Turn off
shelly toggle -n "Living Room"     # Toggle
shelly status -n "Kitchen Light"   # Get status

Monitoring

shelly watch                       # Interactive dashboard
shelly health                      # Health check all devices
shelly power -a                    # Power usage for all devices

Device management

shelly rename -n "old-name" "New Name"    # Rename device
shelly firmware check -a                   # Check for updates
shelly firmware update -a                  # Update all firmware
shelly reboot -n "Kitchen Light"          # Reboot device

Groups

shelly group add lights "Kitchen" "Living Room" "Bedroom"
shelly group list
shelly -g lights off               # Turn off all lights
shelly -g lights status            # Status of all lights

Configuration

shelly config get -n "Kitchen"     # Get device config
shelly completions zsh             # Generate shell completions

Agent Integration

Designed for scripting and AI agent use with structured, machine-readable output.

# Structured JSON output (auto-enabled when piped)
shelly status -a | jq '.data'

# Consistent envelope: {"ok": true, "data": ...} or {"ok": false, "error": {...}}
shelly -n "nonexistent" status
# {"ok": false, "error": {"code": "DEVICE_NOT_FOUND", "message": "..."}}

# Machine-readable schema
shelly schema

Groups Configuration

Groups are defined in a TOML file:

# ~/.config/shelly-cli/groups.toml (Linux)
# ~/Library/Application Support/shelly-cli/groups.toml (macOS)

[groups]
lights = ["Kitchen Light", "Living Room Light", "Bedroom Light"]
gen1 = { filter = "gen1" }
gen3 = { filter = "gen3" }
all = { filter = "all" }

Or manage via CLI: shelly group add, shelly group remove, shelly group show.

Supported Devices

Generation Examples Status
Gen1 Shelly 1, 1PM, 2.5, Plug S, Dimmer Supported (switch, power, firmware)
Gen2 Shelly Plus 1, Plus 1PM, Plus 2PM Supported (switch, power, firmware)
Gen3 Shelly Mini 1PM G3, Plus series G3 Supported (switch, power, firmware)

License

MIT License -- see LICENSE file.

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

shelly_cli-0.1.0.tar.gz (44.1 kB view details)

Uploaded Source

Built Distributions

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

shelly_cli-0.1.0-py3-none-win_amd64.whl (2.5 MB view details)

Uploaded Python 3Windows x86-64

shelly_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl (2.5 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

shelly_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl (2.4 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

shelly_cli-0.1.0-py3-none-macosx_11_0_arm64.whl (2.3 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

shelly_cli-0.1.0-py3-none-macosx_10_12_x86_64.whl (2.4 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for shelly_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 df6087cb668b1604fd4df668222cab22cb368d04051eab54e80a19af160e081c
MD5 6dc6a36d703cae0cad0dc0416089f146
BLAKE2b-256 f2f53c927a8e7c091bd037a622ee662c3af7071404289baf830c3af2171d5633

See more details on using hashes here.

File details

Details for the file shelly_cli-0.1.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: shelly_cli-0.1.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for shelly_cli-0.1.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 981e136ccb3054e0dda14b7193731c60879454b1c2b3e2a8600ad44c139357a7
MD5 35fd02b16e61a40224c3eea0a68467f4
BLAKE2b-256 24c4d3e35bb1d7373c0a57ad4752a63348106e9c10237a404c86d4dda646fad3

See more details on using hashes here.

File details

Details for the file shelly_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for shelly_cli-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6e821fe58002f93268425ba3da903fa710266b62f8f35a148354991a8cff768e
MD5 1cfe3ef8e8a09bbaed9f01c499232893
BLAKE2b-256 7da8d9ed3825a431a733523475e4ea292e6a50553fee4e2a0e0918d97d4f05f6

See more details on using hashes here.

File details

Details for the file shelly_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for shelly_cli-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 282f434aeec2d52bddaf5d775ada7204b042d8fd5917a9a830df29622f13157b
MD5 e2ba6f4ce3411508c7ceb606acd6a953
BLAKE2b-256 161d425a066f9d873a24198ba4d8ae131a78b5abd048d3bad39a5d4437b18fbd

See more details on using hashes here.

File details

Details for the file shelly_cli-0.1.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for shelly_cli-0.1.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e28661ff6e1d7c97521eef349724474d64978e5a6ad87a80f4c4ca1620a2744e
MD5 0ac67a82543bb3975af804f7a2cf0b2b
BLAKE2b-256 23292e5b5d5692bc21c77ba149072ee1b2eb94b0782a456777df6d2b34dab3df

See more details on using hashes here.

File details

Details for the file shelly_cli-0.1.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for shelly_cli-0.1.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c554d921795af7a8f552adfec1da1fd827afdc103bf1b90378c89e2cc5b4c037
MD5 6c798da4077c4412d5c6ecfd578009c2
BLAKE2b-256 0c3d2987ac6401380b5ce5360ba71e1763c15f3d7f8d7a5aff9b70241141ba52

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