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.1.tar.gz (44.2 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.1-py3-none-win_amd64.whl (5.1 MB view details)

Uploaded Python 3Windows x86-64

shelly_cli-0.1.1-py3-none-manylinux_2_28_x86_64.whl (5.1 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

shelly_cli-0.1.1-py3-none-manylinux_2_28_aarch64.whl (4.8 MB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARM64

shelly_cli-0.1.1-py3-none-macosx_11_0_arm64.whl (4.6 MB view details)

Uploaded Python 3macOS 11.0+ ARM64

shelly_cli-0.1.1-py3-none-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: shelly_cli-0.1.1.tar.gz
  • Upload date:
  • Size: 44.2 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.1.tar.gz
Algorithm Hash digest
SHA256 9b5ea383ac300398e0f255d7920b398c4f1fb94584e15318fdaf970cfd98a981
MD5 d89635f40245e27d3b16338a25994566
BLAKE2b-256 dba2a06899e1bf02199f0022a31383530c4b4f3f2cc6ad99b0bd0d0e5a6b714f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: shelly_cli-0.1.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 5.1 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.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 f7846df6da0fbdaa34b3b6896e73d9d6dc70e626c85380da405230d0533dffa3
MD5 47ff27eb5769dfc4ada56232accfa72a
BLAKE2b-256 13c7d7be9c93d37176c8f0f148c0e1851ff2df6bb9325aeb9a8bb75f0f94500d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shelly_cli-0.1.1-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 06b018a4c196434b4abea6ee36b10fc67c78a1bed0e087912b69503f0f76b3fc
MD5 e98d896b6a7e1834282f817321c98bfa
BLAKE2b-256 bdac5002a5df5832f4fd0f43d0e82bde3a0e2d925264acf902f918add776a160

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shelly_cli-0.1.1-py3-none-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0e2ff9c01dc635a2b5c7d879c42b72adbf6c88876fdb7d0e70a7c1897e57b571
MD5 2f7e031fa6c09dd7b37b55537cfc7e53
BLAKE2b-256 1c91cb72213b003ceb507c4845c28606f70f8bb9048f9faa170e51b1573b170f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shelly_cli-0.1.1-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d255ba41076458cd699d8f1dbfd9f6cc4cb6944de8d39854edd48ddb0eaa82d6
MD5 e7c7e7168b1c3bc64b68efd38e458b8b
BLAKE2b-256 b1faa56c490300149faf7cd964d25693ee983ccea32f7ec806f7db35e4b07dbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for shelly_cli-0.1.1-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 05d5260e7f3c6c69dacf6f7f9cb0d1df2eea3295c8276dd91af6fc8546aeb2e8
MD5 501a05825af16c4fa52bf2a987651811
BLAKE2b-256 573b7b7425721596b853495580e62a36bc4e88f37f97c0f5143e206705f87e30

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