Skip to content

Repository files navigation

SMPlan

A native macOS daily time planner inspired by SuperMemo Plan. Built with SwiftUI for macOS 14+.

Features

  • Four activity types: Flexible, Fixed (F), Rigid (R), and Fixed+Rigid (FR)
  • Auto-rescheduling: When you start, finish, or skip an activity, the algorithm rebalances the rest of the day
  • Weight system: Higher weights resist compression when the day runs tight
  • Minimum-duration threshold: Activities compressed below 15 min are auto-skipped, with their time recycled to others
  • Menu bar resident: Always shows current activity and countdown
  • Global hotkeys: ⌘⌥B Begin · ⌘⌥T Terminate · ⌘⌥Space toggle window
  • Native notifications with sound on activity transitions
  • Obsidian export: One-way export to Daily notes as Markdown
  • Human-readable storage: One JSON file per day in data/YYYY-MM-DD.json

Requirements

  • macOS 14 Sonoma or later
  • Swift 6.0+ (Swift 6.2 verified)
  • Xcode Command Line Tools (for swift build)

Build

./build.sh

This compiles a Release binary, packages it into build/SMPlan.app, and applies an ad-hoc code signature for personal use. Copy the resulting .app to /Applications/ or run it in place.

For development:

swift build
swift run SMPlan
swift test

Project Layout

Sources/SMPlan/
├── SMPlanApp.swift          # @main entry point
├── AppState.swift           # Global @Observable state
├── Models/                  # Activity, DayPlan, enums (Codable + Sendable)
├── Algorithm/               # Pure-function scheduler
├── ViewModels/              # State + business logic orchestration
├── Views/                   # SwiftUI views (MenuBarExtra, Table, sheets)
├── Services/                # JSON storage, Markdown export, notifications, hotkeys
└── Utilities/               # Time conversion, vault path resolution

Tests/SMPlanTests/           # swift-testing suites
data/                        # Per-day JSON (runtime-created)
build/                       # .app bundle output (gitignored)

Activity Operations

Add, Delete, Insert, Split, Merge, Fix, Rigid, Weight, Adjust, Move, Rename, Begin, Terminate, Skip, Recalc.

See SPEC.md for the full implementation specification, scheduling algorithm, and data model.

Dependencies

Non-goals

  • No cloud sync (use iCloud Drive on the vault directory)
  • No multi-day or weekly views
  • No cross-platform support (macOS only)
  • No bidirectional Obsidian sync (export is one-way)

About

a plan like supermemo plan

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages