Skip to content

Repository files navigation

eightctl 🛏️ — Control your sleep, from the terminal

CI Release Go License Homebrew

eightctl is an unofficial CLI for controlling Eight Sleep Pods and exporting sleep data. It is for people who want pod controls and metrics from a terminal or script.

Important

Eight Sleep does not publish a stable public API. eightctl uses the company's cloud endpoints, so provider changes and rate limits can interrupt commands; it does not provide local or Bluetooth control.

Install

With Homebrew:

brew install steipete/tap/eightctl

Prebuilt archives for macOS, Linux, and Windows on amd64 and arm64 are available from the latest GitHub release.

To build and install from source, use Go 1.26.5 or newer:

go install github.com/steipete/eightctl/cmd/eightctl@latest

Quick start

Set your Eight Sleep account credentials, then inspect and control the pod:

export EIGHTCTL_EMAIL="you@example.com"
export EIGHTCTL_PASSWORD="your-password"

eightctl status
eightctl temp 20
eightctl temp -40 --side right

status, on, off, and temp act on all discovered household sides unless you select one with --side left|right|solo or --target-user-id <id>.

Commands

Area Commands
Pod control status, on, off, temp, away
Sleep data sleep, presence, metrics
Pod features alarm, audio, base, device, schedule, tempmode
Account and travel household, autopilot, travel

Run eightctl <command> --help for flags and subcommands. The command specification covers the complete surface and current provider constraints.

Configuration

Flags take precedence over EIGHTCTL_* environment variables, which take precedence over ~/.config/eightctl/config.yaml:

email: "you@example.com"
password: "your-password"
timezone: "America/New_York"
output: "table"
schedule:
  - time: "22:30"
    action: "temp"
    temperature: "-20"

Keep the file readable only by your account with chmod 600 ~/.config/eightctl/config.yaml. The optional user_id is resolved after authentication, and the public app OAuth client is used unless client_id and client_secret are set.

Preview scheduled actions without changing the pod, then remove --dry-run when the schedule is ready:

eightctl daemon --config ~/.config/eightctl/config.yaml --dry-run

Structured output

Commands that return rows support table, JSON, and CSV output. Use --fields to select columns:

eightctl status --output json
eightctl sleep day --date 2026-08-01 --output csv
eightctl status --fields side,name,mode,level

Authentication and API behavior

eightctl authenticates against Eight Sleep's OAuth service and caches tokens in the operating system keyring, with a file-backed fallback. Reusing cached tokens reduces login traffic, but the provider can still return rate-limit errors.

The API is undocumented and cloud-only. The project specification records the current contract, while CHANGELOG.md tracks endpoint removals and compatibility changes.

Development

go build ./cmd/eightctl
go test ./...
make coverage
make lint

CI runs formatting, lint, tests, the core-package coverage gate, and a release-artifact smoke test.

License

MIT. See LICENSE.

About

Eight Sleep cli to fetch data and control your pods.

Topics

Resources

Stars

95 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages