Skip to content

Commit f466257

Browse files
committed
feat: add Agent Skills support for AI coding assistants
Add SKILL.md following the AgentSkills.io specification to enable AI assistants (Claude Code, Cursor, Codex, etc.) to effectively use lametric-cli. Install with: npx skills add dedene/lametric-cli
1 parent 6b06940 commit f466257

2 files changed

Lines changed: 298 additions & 12 deletions

File tree

Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
name: lametric-cli
3+
description: Control LaMetric TIME/SKY smart displays from the command line. Use when sending notifications, controlling device brightness/volume, managing timers, or displaying data on LaMetric devices. Triggers on "LaMetric", "smart display", "notification to device", "set timer", "send alert to clock".
4+
license: MIT
5+
metadata:
6+
author: dedene
7+
version: "1.0.0"
8+
---
9+
10+
# LaMetric CLI
11+
12+
CLI tool for controlling LaMetric TIME/SKY devices. Send notifications, control settings, manage timers, and stream content.
13+
14+
## Prerequisites
15+
16+
### Installation
17+
18+
```bash
19+
# Homebrew (macOS/Linux)
20+
brew install dedene/tap/lametric
21+
22+
# Or Go install
23+
go install github.com/dedene/lametric-cli/cmd/lametric@latest
24+
```
25+
26+
### Setup
27+
28+
1. Get API key from LaMetric mobile app: Device Settings > API Key
29+
2. Run setup wizard:
30+
31+
```bash
32+
lametric setup
33+
```
34+
35+
Or configure manually:
36+
37+
```bash
38+
# Store API key securely
39+
lametric auth set-key --device=living-room
40+
41+
# Or use environment variables
42+
export LAMETRIC_API_KEY=your-api-key
43+
export LAMETRIC_DEVICE=192.168.1.100
44+
```
45+
46+
Config file location: `~/.config/lametric-cli/config.yaml`
47+
48+
## Core Workflows
49+
50+
### Sending Notifications
51+
52+
**Simple notification:**
53+
```bash
54+
lametric notify "Hello World"
55+
```
56+
57+
**With icon and sound:**
58+
```bash
59+
lametric notify "Build passed" --icon=checkmark --sound=positive1
60+
```
61+
62+
**Critical alert (wakes device, plays alarm):**
63+
```bash
64+
lametric notify "ALERT: Server down" --priority=critical --sound=alarm1
65+
```
66+
67+
**Progress indicator:**
68+
```bash
69+
lametric notify "Upload progress" --goal=75/100 --icon=upload
70+
```
71+
72+
**Sparkline chart:**
73+
```bash
74+
lametric notify "CPU Usage" --chart=10,25,50,30,45,80,60
75+
```
76+
77+
**From stdin (for pipelines):**
78+
```bash
79+
echo "Build complete" | lametric notify
80+
git log -1 --format="%s" | lametric notify --icon=github
81+
```
82+
83+
**Wait for user dismissal:**
84+
```bash
85+
lametric notify "Confirm deployment?" --wait
86+
```
87+
88+
### Device Control
89+
90+
**Get device info:**
91+
```bash
92+
lametric device
93+
```
94+
95+
**Display brightness:**
96+
```bash
97+
lametric display get
98+
lametric display brightness 50 # Set to 50%
99+
lametric display mode auto # Auto brightness
100+
```
101+
102+
**Audio volume:**
103+
```bash
104+
lametric audio get
105+
lametric audio volume 30 # Set to 30%
106+
```
107+
108+
**Bluetooth:**
109+
```bash
110+
lametric bluetooth get
111+
lametric bluetooth on
112+
lametric bluetooth off
113+
```
114+
115+
### Built-in Apps
116+
117+
**Timer:**
118+
```bash
119+
lametric app timer set 5m # Set 5 minute timer
120+
lametric app timer set 1h30m # Set 1 hour 30 minutes
121+
lametric app timer start
122+
lametric app timer pause
123+
lametric app timer reset
124+
```
125+
126+
**Stopwatch:**
127+
```bash
128+
lametric app stopwatch start
129+
lametric app stopwatch pause
130+
lametric app stopwatch reset
131+
```
132+
133+
**Radio:**
134+
```bash
135+
lametric app radio play
136+
lametric app radio stop
137+
lametric app radio next
138+
lametric app radio prev
139+
```
140+
141+
**App navigation:**
142+
```bash
143+
lametric app list # List installed apps
144+
lametric app next # Switch to next app
145+
lametric app prev # Switch to previous app
146+
```
147+
148+
### Streaming
149+
150+
Stream images or video to the display:
151+
152+
```bash
153+
lametric stream start # Start streaming session
154+
lametric stream image logo.png # Send static image
155+
lametric stream gif animation.gif # Send animated GIF
156+
lametric stream stop # End streaming
157+
```
158+
159+
**Pipe from ffmpeg:**
160+
```bash
161+
ffmpeg -i video.mp4 -vf "scale=37:8" -f rawvideo -pix_fmt rgb24 - | lametric stream pipe
162+
```
163+
164+
### Discovery
165+
166+
Find LaMetric devices on your network:
167+
168+
```bash
169+
lametric discover
170+
lametric discover --timeout=10s
171+
```
172+
173+
## Common Patterns
174+
175+
### Build/CI Notifications
176+
177+
```bash
178+
# Success
179+
lametric notify "Build #123 passed" --icon=checkmark --sound=positive1
180+
181+
# Failure
182+
lametric notify "Build #123 failed" --icon=error --sound=negative1 --priority=warning
183+
184+
# Deployment
185+
lametric notify "Deployed to prod" --icon=rocket --sound=positive2
186+
```
187+
188+
### System Monitoring
189+
190+
```bash
191+
# CPU alert
192+
lametric notify "High CPU: 95%" --priority=warning --icon=warning
193+
194+
# Disk space
195+
lametric notify "Disk: 85% full" --goal=85/100 --icon=harddrive
196+
```
197+
198+
### Pomodoro Timer
199+
200+
```bash
201+
lametric app timer set 25m && lametric app timer start
202+
```
203+
204+
### Meeting Reminder
205+
206+
```bash
207+
lametric notify "Meeting in 5 min" --icon=calendar --sound=alarm3 --priority=warning
208+
```
209+
210+
## Quick Reference
211+
212+
### Popular Icons
213+
214+
| Alias | Description |
215+
|-------|-------------|
216+
| `checkmark` | Success/complete |
217+
| `error` | Error/failure |
218+
| `warning` | Warning/caution |
219+
| `info` | Information |
220+
| `rocket` | Deploy/launch |
221+
| `github` | GitHub |
222+
| `slack` | Slack |
223+
| `mail` | Email |
224+
| `calendar` | Calendar/meeting |
225+
| `download` | Download |
226+
| `upload` | Upload |
227+
228+
Run `lametric icons` for full list.
229+
230+
### Popular Sounds
231+
232+
| Sound | Category |
233+
|-------|----------|
234+
| `positive1-5` | Success sounds |
235+
| `negative1-5` | Error sounds |
236+
| `alarm1-13` | Alarm sounds |
237+
| `notification1-4` | Gentle notifications |
238+
239+
Run `lametric sounds` for full list.
240+
241+
### Global Flags
242+
243+
| Flag | Description |
244+
|------|-------------|
245+
| `-d, --device` | Device name or IP |
246+
| `-j, --json` | Output JSON |
247+
| `--plain` | Output TSV (for scripting) |
248+
| `-v, --verbose` | Verbose logging |
249+
250+
## Troubleshooting
251+
252+
### Connection Failed
253+
254+
1. Verify device IP: `lametric discover`
255+
2. Check device is on same network
256+
3. Ensure API key is correct: `lametric auth get-key --device=NAME`
257+
258+
### Authentication Error
259+
260+
```bash
261+
# Re-set API key
262+
lametric auth set-key --device=living-room
263+
264+
# Or use environment variable
265+
export LAMETRIC_API_KEY=your-api-key
266+
```
267+
268+
### Device Not Found
269+
270+
```bash
271+
# Discover devices
272+
lametric discover --timeout=10s
273+
274+
# Add to config
275+
lametric setup
276+
```

README.md

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
1-
# lametric-cli
1+
# 📟 lametric-cli - control LaMetric from your terminal
22

33
CLI tool for LaMetric TIME/SKY devices. Control your device from the command line.
44

5+
## Agent Skills
6+
7+
Use with AI coding assistants:
8+
9+
```bash
10+
npx skills add dedene/lametric-cli
11+
```
12+
13+
Works with Claude Code, Cursor, Codex, and [35+ agents](https://github.com/vercel-labs/skills#supported-agents).
14+
515
## Installation
616

717
### Homebrew (macOS/Linux)
@@ -157,13 +167,13 @@ lametric icons
157167

158168
## Global Flags
159169

160-
| Flag | Description |
161-
|------|-------------|
162-
| `-d, --device` | Device name or IP (env: `LAMETRIC_DEVICE`) |
163-
| `-j, --json` | Output JSON |
164-
| `--plain` | Output plain TSV (for scripting) |
165-
| `--no-color` | Disable colors (env: `NO_COLOR`) |
166-
| `-v, --verbose` | Verbose logging |
170+
| Flag | Description |
171+
| --------------- | ------------------------------------------ |
172+
| `-d, --device` | Device name or IP (env: `LAMETRIC_DEVICE`) |
173+
| `-j, --json` | Output JSON |
174+
| `--plain` | Output plain TSV (for scripting) |
175+
| `--no-color` | Disable colors (env: `NO_COLOR`) |
176+
| `-v, --verbose` | Verbose logging |
167177

168178
## Configuration
169179

@@ -183,11 +193,11 @@ API keys are stored securely in your system keyring.
183193
184194
## Environment Variables
185195
186-
| Variable | Description |
187-
|----------|-------------|
196+
| Variable | Description |
197+
| ------------------ | --------------------------- |
188198
| `LAMETRIC_API_KEY` | API key (overrides keyring) |
189-
| `LAMETRIC_DEVICE` | Default device IP or alias |
190-
| `NO_COLOR` | Disable colored output |
199+
| `LAMETRIC_DEVICE` | Default device IP or alias |
200+
| `NO_COLOR` | Disable colored output |
191201

192202
## License
193203

0 commit comments

Comments
 (0)