Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ the device or its firmware.
## Quick start

```bash
uvx socketry login --email you@example.com --password 'yourpass'
uvx socketry get
uvx 'socketry[cli]' login --email you@example.com --password 'yourpass'
uvx 'socketry[cli]' get
```

Or install it once and use `socketry` directly:

```bash
uv tool install socketry
uv tool install 'socketry[cli]'
socketry login --email you@example.com --password 'yourpass'
socketry get
```
Expand Down Expand Up @@ -49,13 +49,16 @@ properties returned by newer firmware are displayed as raw key/value pairs.

```bash
# Install as a CLI tool
uv tool install socketry
uv tool install 'socketry[cli]'

# Or run directly without installing
uvx socketry --help
uvx 'socketry[cli]' --help

# Or install as a library
# Or install as a library only (no CLI dependencies)
pip install socketry

# Or install with CLI included
pip install 'socketry[cli]'
```

## CLI usage
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ authors = [
requires-python = ">=3.11"
license = "MIT"
dependencies = [
"typer>=0.9",
"aiomqtt>=2.0",
"aiohttp>=3.9",
"pycryptodome>=3.19",
]

[project.optional-dependencies]
cli = ["typer>=0.9"]

[project.scripts]
socketry = "socketry.cli:app"

Expand All @@ -24,6 +26,7 @@ build-backend = "uv_build"

[dependency-groups]
dev = [
"socketry[cli]",
"aioresponses>=0.7",
"mypy>=1.19.1",
"pre-commit>=4.5.1",
Expand Down
5 changes: 4 additions & 1 deletion src/socketry/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@
import sys
from datetime import datetime

import typer
try:
import typer
except ImportError:
raise SystemExit("socketry CLI requires the 'cli' extra: pip install socketry[cli]") from None

from socketry.client import Client
from socketry.properties import GROUP_TITLES, MODEL_NAMES, PROPERTIES, Setting, resolve
Expand Down
9 changes: 8 additions & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.