Skip to content
Closed
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:

- name: Install tools
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.60.1
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4
go install mvdan.cc/gofumpt@v0.6.0

- name: Format check (gofumpt)
Expand Down
20 changes: 4 additions & 16 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
version: 2
version: "2"

run:
timeout: 3m
tests: true

linters:
disable-all: true
disable:
- errcheck
- unused
default: none
enable:
- govet
# revive and errcheck disabled to keep CLI glue concise
# - revive
# - errcheck
linters-settings:
revive:
rules:
- name: unused-parameter
disabled: true
- name: package-comments
disabled: true

issues:
exclude-use-default: false
max-issues-per-linter: 0
max-same-issues: 0
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,13 @@ chmod 600 ~/.config/eightctl/config.yaml
# check pod state
EIGHTCTL_EMAIL=you@example.com EIGHTCTL_PASSWORD=your-password eightctl status

# set temperature level (-100..100)
# set temperature level (-100..100); without --side, applies to all discovered sides/users
eightctl temp 20

# target a specific side when the household is split
eightctl temp -40 --side right
eightctl on --side left

# run daemon with your YAML schedule (see docs/example-schedule.yaml)
eightctl daemon --dry-run
```
Expand All @@ -47,6 +51,13 @@ eightctl daemon --dry-run

Use `--output table|json|csv` and `--fields field1,field2` to shape output. `--verbose` enables debug logs; `--quiet` hides the config banner.

## Household Targeting
- `status` shows discovered household targets by default when available, including `left` / `right` or inferred `solo`.
- `on`, `off`, and `temp` apply to all discovered household targets by default.
- Use `--side left|right|solo` to target one household side.
- Use `--target-user-id <id>` when you want to address a specific discovered user directly.
- For split households, `eightctl status --output json` is the quickest way to inspect available sides and user IDs.

## Configuration
Priority: flags > env vars (`EIGHTCTL_*`) > config file.

Expand Down
7 changes: 5 additions & 2 deletions docs/spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,22 +63,25 @@ Travel:
- `travel flight-status --flight`

Household:
- `household summary|schedule|current-set|invitations`
- `household summary|schedule|current-set|invitations|devices|users|guests`

Audio/temperature data helpers:
- `tracks`, `feats` remain for backward compatibility.

## Output & UX
- Output formats: table (default), json, csv via `--output`; `--fields` to select columns.
- Logs via charmbracelet/log; `--verbose` for debug; `--quiet` hides config notice.
- `status` should prefer discovered household targets when available and display `left` / `right` or inferred `solo`.
- `on`, `off`, and `temp` should default to all discovered household targets unless narrowed with `--side` or `--target-user-id`.
- `temp` accepts negative positional levels such as `temp -40` without requiring `--`.

## Daemon Behavior
- Reads YAML schedule (time, action on|off|temp, temperature with unit), minute tick, executes once per day, PID guard, SIGINT/SIGTERM graceful stop.
- Optional state sync compares expected schedule state vs device and reconciles.

## Testing & Quality Gates
- `go test ./...` (fast compile checks) — run before handoff.
- Formatting via `gofmt`; prefer `gofumpt`/`staticcheck` later.
- Formatting via `gofumpt`; lint via `golangci-lint` with `govet` enabled in repo config.
- Live checks: `eightctl status`, `metrics summary`, `tempmode nap status` with test creds to validate auth + userId resolution.

## Prior Work (references)
Expand Down
Loading