bedtime-device-guard
Bedtime Device Guard
Use the bundled UserPromptSubmit hook to reject Codex prompts during a configured local-time window. The hook evaluates the clock locally, prints nothing during allowed hours, and therefore adds no model context or token usage.
This guard applies only to Codex surfaces that load and trust user hooks. Treat it as one layer alongside operating-system restrictions, scheduled shutdown, router rules, and phone controls. Do not claim it blocks another app or prevents a determined administrator from removing it.
Device-level schedules
The optional native schedules are broader than the Codex hook and can discard unsaved work. Confirm that the user wants forced shutdown before installing them. Each scheduled action re-checks the live local window before acting, so a job released late after sleep or coalescing does nothing after the configured end time.
macOS installs three user LaunchAgents: a warning before the start, a shutdown request at the start, and a forced GUI logout two minutes later if the Mac is still running. Install or manage them with:
bash skills/bedtime-device-guard/scripts/install-device-macos.sh install \
--start HH:MM --end HH:MM --timezone local --warning-minutes 10
bash skills/bedtime-device-guard/scripts/install-device-macos.sh verify
bash skills/bedtime-device-guard/scripts/install-device-macos.sh uninstall