A hard stop for your Mac. Define the work rhythm that fits your life — not only a standard job — and Curfew enforces its end with warnings, a full-screen overlay, and optional shutdown. No willpower required.
It's a commitment device, not a kernel-level lock: a determined user with a terminal can still get around it. The point is to make stopping the easy default, not to make it impossible.
Curfew is the first product from Hypertext Studio, a product design lab working under the motto mens et manus — mind and hand.
- Weekly schedule with per-day work-end/resume times, day-off support, hours-based modes, and three editable presets (9 to 5, Startup hours, Half day).
- Graduated warnings at T-30, T-15, T-5, T-2, T-1 with configurable intervals and per-stage notifications.
- Full-screen lockout across every display and Space, with keyboard-shortcut interception (⌘⇥, ⌘Q, ⌘⌥Esc, …).
- Extension budget — 3 × 15 min per week, hold-to-confirm so accidental taps don't burn a slot.
- "Convince me" overrides — 2 × 30 min per week, 5-min cooldown, 50-char minimum justification, persistent log.
- Optional auto-shutdown after lockout with retry-once semantics.
- This Week retrospective — lockouts held, extensions/overrides used, current streak.
curfew-ctlCLI (beta) — inspect local status, schedules, budgets, and recorded activity. Seecurfew-ctlusage below.curfew-mcpMCP server — AI assistants can negotiate with your focus rules from within a coding session. See MCP setup below.- User-confirmed reflections — optional morning intentions and evening retrospectives use user-editable prompts, stay on the Mac, and are available to AI only through read-only MCP/CLI access.
- WidgetKit widgets — small, medium, and large schedule/status views backed by the App Group.
- Authenticated privileged helper — a root-owned daemon preserves active deadlines and schedules shutdown if the app heartbeat disappears.
- Sparkle updates — signed updates from
https://thecurfew.app/appcast.xml. - Menu bar quick access + first-launch onboarding.
CloudKit sync and Calendar integration remain compiled for later releases but are hidden, dormant, and absent from the v0.1 Release entitlements.
- CloudKit multi-device sync and Calendar context, after provisioning and signed-device validation.
- Localization and additional enforcement hardening.
Morning intent and evening retrospective are available now. Midday check-ins and on-device AI-generated prompt suggestions remain future work; agents will never write a user's reflections.
curfew-mcp is a stdio MCP server bundled with Curfew. It lets AI assistants read your enforcement state and, with your approval, request extensions or time-based schedule changes.
Available tools:
| Tool | Type | What it does |
|---|---|---|
curfew_status |
read | App-observed phase and time remaining |
curfew_schedule |
read | Full weekly schedule |
curfew_budget |
read | Extensions and overrides remaining this week |
curfew_activity |
read | Recent activity log entries |
curfew_get_time_remaining |
read | Compact { minutes, phase, mode, trigger } payload |
curfew_get_weekly_summary |
read | Device-attributed weekly rollup |
curfew_get_reflections |
read | User-authored reflections only; agents cannot write them |
curfew_request_extension |
write* | Ask for a time extension |
curfew_set_schedule |
write* | Update a single weekday (cannot weaken today without cooldown) |
curfew_request_status |
read | Poll a queued write request for approval/denial |
curfew_declare_work |
write | Declare background work so shutdown waits (bounded; never moves the curfew) |
curfew_release_work |
write | Drop a work claim early |
Two transports: stdio (default, used by Claude Desktop) and loopback-only Streamable HTTP on 127.0.0.1:9847 (opt-in, Settings → Advanced).
* Write operations queue for user approval by default (configurable in Settings → Integrations → AI Consent Policy). curfew_declare_work and curfew_release_work are the exception: they postpone shutdown rather than weakening the curfew, so they apply immediately, expire on their own, and are capped by the deferral bound. Turn them off in Settings → Enforcement → Protected Work. See Documentation/protected-work.md.
Add to Claude Desktop:
Open Curfew → Settings → Integrations, click "Copy Claude Desktop Config", and paste into ~/Library/Application Support/Claude/claude_desktop_config.json under mcpServers.
Or manually:
{
"mcpServers": {
"curfew": {
"command": "/Applications/Curfew.app/Contents/Resources/curfew-mcp",
"args": []
}
}
}Restart Claude Desktop. Run curfew_status to verify.
The curfew-ctl CLI is in beta. Commands and output may change while we fix launch blockers. Check the app for authoritative enforcement and budget information.
Install the released app and its bundled commands with Homebrew.
brew install --cask thehypertextstudio/tap/curfew
curfew-ctl --helpRun this command to upgrade a Homebrew installation.
brew upgrade --cask thehypertextstudio/tap/curfewThe commands in the examples below ship in the next Curfew release. Use
curfew-ctl --help to see which commands your installed version includes.
The next Curfew release also provides Settings → Integrations → Install command line tool for direct-download installations. It installs the bundled command in ~/.local/bin and configures PATH for zsh, bash, or fish. It preserves other commands and shell settings. Repeated installation keeps existing links and settings unchanged. Open a new Terminal after installation. A source checkout and Swift are unnecessary.
# Current app-observed enforcement phase and time remaining
curfew-ctl status
curfew-ctl status --json
# This week's schedule
curfew-ctl schedule show
# Extension and override budgets
curfew-ctl budget
# Recent activity log
curfew-ctl activity
curfew-ctl activity --days 7
# Overrides require confirmation in the app
# Use "Need to get back in?" on the lockout screen.
# Request an extension and inspect its approval result
request_id=$(uuidgen)
curfew-ctl extension --reason "Finish saving my work" --id "$request_id" --json
curfew-ctl request status "$request_id" --json
# Preview a schedule change (beta)
curfew-ctl schedule set monday --lock 22:00 --dry-run
# Read recent audit events
curfew-ctl audit --days 7 --json
# Tell Curfew a long-running job is in flight so shutdown waits for it
curfew-ctl work claim --label "nightly build" --minutes 15
curfew-ctl work list
curfew-ctl work release <claim-id>
# Emergency release: stand root-level enforcement down for this lockout and
# cancel a /sbin/shutdown the privileged daemon already issued. Works over SSH.
sudo curfew-ctl break-glass --reason "daemon fired mid agent run; investigating"Background work survives lockout on purpose, not by accident: shutdown skips an
allowlist of terminal emulators and agent CLIs, and a declared claim postpones
it for a bounded window. break-glass is the way out when the privileged daemon
has already started a shutdown you cannot cancel from user space — read
Documentation/protected-work.md before
installing that daemon.
Pro adds features with ongoing infrastructure cost. Upgrade at thecurfew.app.
| Feature | Free | Pro |
|---|---|---|
| Schedule, warnings, lockout | ✓ | ✓ |
| Extension / override budgets | ✓ | ✓ |
| This Week retrospective | ✓ | ✓ |
curfew-ctl CLI |
✓ | ✓ |
curfew-mcp MCP server |
✓ | ✓ |
| WidgetKit widgets | — | ✓ |
| CloudKit multi-device sync | — | Not in v0.1 |
| Calendar integration | — | Not in v0.1 |
Pricing: $20 flat. License key is verified offline via Ed25519 — no account required after purchase.
Requires macOS 26+ and Xcode 26+ (Swift 6). The first release is Tahoe-only; supporting earlier macOS versions is a deliberate future product and compatibility decision.
git clone https://github.com/TheHypertextStudio/curfew
cd curfew
open Curfew.xcodeprojPress ⌘R to run. First launch opens Getting Started, which walks through schedule, budgets, and permissions.
Debug launches are safe by default — enforcement stays disarmed unless you set CURFEW_ENABLE_ENFORCEMENT=1. Release builds arm on launch.
Release-only validation for shutdown, WidgetKit, the privileged helper,
Sparkle, signing, and notarization is documented in
Documentation/RELEASE.md.
This repo uses just as a command runner — a simpler make that lets you run every common task without invoking xcodebuild directly.
brew install just swiftlint
./scripts/swiftformat.sh --version # verified SwiftFormat 0.64.1, shared user cache
just --list # show all recipes
just check # format + lint + tests + Debug build (CI gate)
just test # unit suite only
just format # apply SwiftFormat in place
just dev # build + launch
just kill # kill any running Curfew processjust check is the full ship-gate — same command CI runs on every push. All PRs must pass it.
Contributor expectations and the TDD workflow live in AGENTS.md.
CurfewKit/ Local Swift package (its own subfolder, so opening the repo
folder in Xcode resolves to Curfew.xcodeproj, not a package).
Curfew.xcodeproj links its CurfewKit library product into the
app, widget, and CLI tools — every consumer `import CurfewKit`.
Sources/CurfewKit/ Pure domain logic, storage, settings, and MCP queue types —
schedule engine, budget tracker, warning stages, override
policy, activity store. No UI; fully unit-tested.
Sources/curfew-ctl/ ArgumentParser CLI — inspects state and queues approved extension requests.
Sources/curfew-mcp/ MCP server (stdio transport, JSON-RPC 2.0).
Sources/curfew-daemon/ Root-enforced shutdown when the app dies mid-lockout.
Curfew/Core/Features/ App-only features that depend on Apple frameworks —
IdleWatcher, LicenseGate, CalendarMonitor, CloudKit sync.
Curfew/App/ @MainActor app model, routing, overlay coordinator, key interceptor,
shutdown workflow, notification bridge, MCP request monitor.
Curfew/UI/ SwiftUI views — main window, settings, lockout overlay, onboarding.
CurfewWidget/ WidgetKit extension. Links CurfewKit and imports the Domain/Storage/
Settings types it needs; enabled in the v0.1 shipping preset.
CurfewTests/ Unit tests covering every CurfewKit module and app model behavior.
Each directory has a *-module.md summary and every type carries doc comments.
MIT © Hypertext Studio.
Bug reports, design critique, and pull requests are welcome — open an issue.
Run ./bootstrap worktree prepare after creating a checkout. Codex runs this
command through the checked-in local environment. The pinned Studio engine
reuses native dependency caches and keeps installed dependencies and mutable
build outputs inside this checkout. Setup does not build applications or start
services. The first engine download requires GitHub CLI authentication with
access to the private TheHypertextStudio/bootstrap repository.
Run ./bootstrap worktree plan --json to inspect proposed actions or
./bootstrap worktree check to inspect readiness. Use --no-install to configure
cache reuse without resolving dependencies. Use --offline only when the engine
and dependency artifacts already exist locally; missing artifacts are reported.
Preserve shared caches when cleaning a checkout. Continue using the repository's
existing build and test commands.
The marketing frontend uses Astro in landing/; Mintlify source is web/docs/.
Node 24.20.0 and pnpm 11.9.0 are pinned in the independent frontend package.
The existing web/ backend workspace retains its own lockfile, and native
application setup continues through ./bootstrap worktree prepare.
The root package provides command shortcuts and the pinned Node runtime; it is
not a parent workspace. Website deployment tools belong to landing/hosting.
Keep the frontend and backend workspace boundaries separate so preparation can
install each frozen lockfile without treating either as a redundant nested lock.
pnpm --dir landing install --frozen-lockfile
pnpm dev
pnpm check
pnpm build
pnpm preview:worker
pnpm docs:config
pnpm docs:config:check
pnpm docs:dev
pnpm docs:checkAstro reads landing/src/ and landing/public/, then writes landing/dist/.
Native Wrangler commands use that output; no custom asset copier, candidate
assembler, parity script, or website lifecycle launcher is required. The signed
appcast publisher stages its feed in landing/public/ and builds before upload.
Shared private packages and their adopted registry lock remain unchanged.
The existing Mintlify project has published its first connected update. The
reserved /mcp guide fix is prepared in this branch; complete public proxy and
source identity acceptance remains open. Source retains HTML-guide mode until
that acceptance, independently of the current provider configuration. No provider
setting or publication is changed by this cleanup.
See website operations for native preview/deployment commands and publisher dependencies, and authoring for product MDX and shared generated configuration.