# ed lid-awake

> ed lid-awake controls every part of the Lid Awake extension from the shell. Running it without a subcommand is the same as ed lid-awake status.

- Canonical URL: https://getedith.pro/docs/cli/lid-awake
- Updated: 2026-12-02

`ed lid-awake` controls every part of the Lid Awake extension from the shell.
Running it without a subcommand is the same as `ed lid-awake status`.

| Command | What it does |
| --- | --- |
| [`ed lid-awake status`](https://getedith.pro/docs/cli/lid-awake/status) | Show active state, session, remaining time, battery policy and helper state |
| [`ed lid-awake on`](https://getedith.pro/docs/cli/lid-awake/on) | Preview turning Lid Awake on indefinitely |
| `ed lid-awake on --for 15m --yes` | Turn it on for 15 minutes |
| `ed lid-awake on --for 30m --yes` | Turn it on for 30 minutes |
| `ed lid-awake on --for 1h --yes` | Turn it on for one hour |
| `ed lid-awake on --for 2h --yes` | Turn it on for two hours |
| `ed lid-awake on --until-lid-reopens --yes` | Stop after the lid closes and opens again |
| [`ed lid-awake off`](https://getedith.pro/docs/cli/lid-awake/off) | Restore normal lid-close sleep |
| [`ed lid-awake battery 20`](https://getedith.pro/docs/cli/lid-awake/battery) | Pause below 20 percent battery |
| `ed lid-awake battery off` | Disable battery auto-pause |
| [`ed lid-awake restore-on-quit true`](https://getedith.pro/docs/cli/lid-awake/restore-on-quit) | Restore normal sleep when the menu bar app quits |

Confirmed `on`, `off` and live `status` use the running menu bar app. They wait
for the same engine used by the shelf and extension popup, so a successful
command means the system setting was actually applied. `on` previews without
side effects unless `--yes` is present, then enables the extension if needed.
The first activation opens System Settings when macOS still needs approval for
Edith's background helper. Turn on the Edith item that affects all users once,
then run the command again. Later changes use that helper without asking for the
administrator password again. Edith does not fall back to a password dialog.

## Commands

- [`ed lid-awake status`](https://getedith.pro/docs/cli/lid-awake/status)
- [`ed lid-awake on`](https://getedith.pro/docs/cli/lid-awake/on)
- [`ed lid-awake off`](https://getedith.pro/docs/cli/lid-awake/off)
- [`ed lid-awake battery`](https://getedith.pro/docs/cli/lid-awake/battery)
- [`ed lid-awake restore-on-quit`](https://getedith.pro/docs/cli/lid-awake/restore-on-quit)

## JSON

Every command accepts `--json`. `status`, confirmed `on`, and `off` return the
same full state object:

```json
{
  "active": true,
  "appRunning": true,
  "applying": false,
  "batterySuspended": false,
  "batteryThreshold": 20,
  "extensionEnabled": true,
  "helperStatus": "enabled",
  "lastError": null,
  "remainingSeconds": 1799.5,
  "requestedActive": true,
  "restoreOnQuit": true,
  "session": "thirtyMinutes"
}
```

`remainingSeconds` and `lastError` are always present in state JSON and are `null`
when there is no deadline or failure. `helperStatus` is `enabled`,
`awaitingApproval`, `notRegistered`, `notFound` or, when the app is closed,
`unavailable`. `battery` returns only `batteryThreshold`, and
`restore-on-quit` returns only `restoreOnQuit` after applying. Preview JSON from
`on` and disabling `restore-on-quit` always contains `operation`, `performed`,
`requiresConfirmation`, `summary`, `warning`, `session`, and `restoreOnQuit`.

Persistent values are also available through `ed config`:

```bash
ed config get lidAwakeActive
ed config set lidAwakeEnabled true
ed config set lidAwakeSession oneHour
ed config set lidAwakeBatteryThreshold 20
ed config set lidAwakeRestoreOnQuit true
```

`lidAwakeActive` is read only because changing a preference cannot change the
system power state. Use `ed lid-awake on` and `ed lid-awake off` for that.
The other four keys are persistent settings, but changing them does not perform
a runtime action. In particular, bare `ed lid-awake on` previews an indefinite
session. It does not reuse `lidAwakeSession`; pass `--for` or
`--until-lid-reopens` to select a different session, then `--yes` to start it.

## Exit codes

| Code | Meaning |
| --- | --- |
| 0 | The request completed, or a disruptive action was previewed without applying it |
| 1 | The helper or `pmset` rejected the change, or a value was invalid |
| 2 | The command syntax was invalid |
| 4 | A confirmed runtime action did not get an answer from Edith |

[Back to the CLI index](https://getedith.pro/docs/cli)

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
