Skip to content

Repository files navigation

Focusmate Planner

Turn your Super Productivity task list into a structured day of deep-focus Focusmate sessions — plan, prioritize, and book automatically.

This repo has two parts:

  • Plugin (sp-focusmate-planner/) — Super Productivity plugin that plans your day as 25/50/75-minute sessions and exports a booking plan.
  • Server (focusmate-booking-server/) — Node/Playwright automation that consumes the plan and books sessions on Focusmate.

Credits

Parts of this plugin is forked from super-productivity/auto-plan. Many core features like priority engine, time maps, task splitting, booking export are inspired by auto-plan.

License

Do No Harm License © raisely/NoHarm

Plugin

Super Productivity host plugin (manifest v1, min SP 14.0.0).

Empty plan
Empty Plan
Session suggestions
Session Suggestions
Tasks
Tasks
Timemaps
Timemaps
Sessions
Sessions

Setup

  1. Open Super Productivity → Settings → Plugins → Load unpacked plugin
  2. point it at the zipped package:

How to zip the plugin

The max plugin size for index.html is 100 kb. This script minifies the index.html and zip the plugin.

cd sp-focusmate-planner
bash build-zip.sh
# install sp-focusmate-planner.zip

Features

  • Task pool — add, load from Super Productivity, drag to reorder
  • Session planning — stack 25/50/75-minute sessions with automatic breaks
  • Priority engine — configurable urgency scoring (duration, oldness, deadline, tags, projects) with auto-adjust when oversubscribed
  • Time maps — define focus windows per day/project/tag; multiple named maps
  • Booking flow — Book button opens modal, editable title, optional AI auto-summarize via OpenAI-compatible endpoint (OpenAI, Ollama, llama.cpp, LM Studio)
  • Plan persistence — save/load plans by date, download/copy JSON for the booker
  • Drag reorder — manual pool order feeds into auto-assign priority; time-based tasks keep their scheduled times

API (exposed to iframe / booker)

window.FocusmatePlannerAPI includes: getTasks, getConfig, saveConfig, autoAssign, computeUrgency, savePlan, loadPlan, exportPlan, getOpenAiSettings, saveOpenAiSettings, getTimeMapConfig, saveTimeMapConfig, etc.

Server

Playwright automation for Focusmate booking.

Setup

cd focusmate-booking-server
cp .env.example .env
npm install
npm run prepare

Usage

npm run inspect   # opens Focusmate booking page for selector inspection
npm run book      # runs a sample booking using a plan
npm run server    # start local booking API on port 8787

Notes

  • STATE_FILE persists browser cookies between runs
  • Update selectors in src/booking/focusmate.booker.ts if the Focusmate UI changes
  • Set HEADLESS=false for debugging

How they connect

  1. Plan your day in the Super Productivity plugin
  2. Click auto-prioritize session or manually put tasks in session. Each session has a book button.
  3. Run the server before booking
  4. also, you can export/download the plan JSON (or save it via the plugin)
  5. The booking server (book.ts / /book endpoint) consumes the plan and creates Focusmate sessions

Requirements

  • Super Productivity >= 14.0.0
  • Node.js >= 18
  • Playwright browsers (npm run prepare)

About

A super productivity plugin to plan, organize, and book your Focusmate sessions for the tasks.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages