Tinylib
DiscoverDocsSign in
Sign in
Tinylib
AboutDiscoverDocsMake an appPricingTermsPrivacyDeveloper TermsContact

Start

  • Quickstart
  • How Tinylib works

Guides

  • Data
  • Rooms and rules
  • Games
  • Friends
  • Places and links
  • Reminders and notifications
  • Publishing
  • Errors and offline
  • Platforms

Client API

  • tinylib
  • tinylib.data
  • tinylib.rooms
  • tinylib.invitations
  • tinylib.friends
  • tinylib.places
  • tinylib.reminders
    • set()
    • daily()
    • weekly()
    • monthly()
    • list()
    • cancel()
    • Reminder
    • ReminderOptions
    • Repeat
    • Day
  • Types
  • tinylib-sdk/kits

Rules API

  • Kinds
  • ctx

Reference

  • tinylib.json
  • Command line
  • Limits

Plain text

  • llms.txt
  • llms-full.txt

tinylib.reminders

Your app schedules reminders for its own user, outside any room, and Tinylib shows each one as a notification when it's due. Each reminder has a name, unique to the user in your app. Every call works offline, and Tinylib syncs the reminders to the user's other devices. Platforms says how reminders go off on each device.

Setting a reminder needs "reminders" in your app's uses.

tinylib.reminders.set()

tinylib.reminders.set(name: string, options: ReminderOptions): Promise<void>
Sets the reminder name, replacing any reminder with that name, and resolves once this device has saved it. While your app's Reminders switch is off, the reminder is kept but doesn't go off.
JavaScript
await tinylib.reminders.set('evening', { title: 'Journal', repeat: tinylib.reminders.daily('18:00') })

Parameters

namestring
The reminder's name, up to 64 characters.
optionsReminderOptions
What the reminder says, when it goes off, and where it opens.

Rejects with

refused
  • When name, title, text, or address is too long, or at is a date that doesn't exist, such as '2026-02-30T10:00'.
  • When your app's uses lacks "reminders".
limit
When the user already has 32 of your app's reminders. Setting a name already in use doesn't count again.
ended
When the user deleted their data in your app.
TypeError
When name or title is empty, options doesn't have exactly one of at and repeat, at is in the wrong form, address starts with /, or a field has the wrong type.

Caveats

  • An at that has already passed sets nothing, cancels any reminder with that name, and still resolves.
  • A repeating reminder first goes off at the next time its schedule matches, and can't be set to start later.

tinylib.reminders.daily()

tinylib.reminders.daily(time: string): Repeat
Makes a schedule for every day at time.
JavaScript
tinylib.reminders.daily('18:00') // { every: 'day', time: '18:00' }

Parameters

timestring
'HH:MM' on a 24-hour clock, in the device's time zone.

Returns

Repeat
The schedule, for repeat in tinylib.reminders.set.

Throws

TypeError
When time isn't 'HH:MM'.

tinylib.reminders.weekly()

tinylib.reminders.weekly(days: Day[], time: string): Repeat
Makes a schedule for each of days at time.
JavaScript
tinylib.reminders.weekly(['mon', 'tue', 'wed', 'thu', 'fri'], '09:30')

Parameters

daysDay[]
The days of the week, each once, from 'mon' to 'sun'.
timestring
'HH:MM' on a 24-hour clock, in the device's time zone.

Returns

Repeat
The schedule, for repeat in tinylib.reminders.set.

Throws

TypeError
When days is empty, lists a day twice, or holds something that isn't a day, or when time isn't 'HH:MM'.

tinylib.reminders.monthly()

tinylib.reminders.monthly(day: number, time: string): Repeat
Makes a schedule for day day of every month at time. In a month without that day, the reminder goes off on the month's last day.
JavaScript
tinylib.reminders.monthly(31, '09:00') // the last day of every month

Parameters

daynumber
The day of the month, from 1 to 31.
timestring
'HH:MM' on a 24-hour clock, in the device's time zone.

Returns

Repeat
The schedule, for repeat in tinylib.reminders.set.

Throws

TypeError
When day isn't an integer from 1 to 31, or time isn't 'HH:MM'.

tinylib.reminders.list()

tinylib.reminders.list(): Promise<Reminder[]>
Lists the user's reminders in your app that will go off again. The user can cancel reminders from your app's page in Tinylib, so read the list each time you show it.
JavaScript
const evening = (await tinylib.reminders.list()).find((reminder) => reminder.name === 'evening')

Returns

Promise<Reminder[]>
The reminders, each a Reminder.

tinylib.reminders.cancel()

tinylib.reminders.cancel(name: string): Promise<void>
Cancels the reminder name. Resolves without doing anything when there's none.
JavaScript
await tinylib.reminders.cancel('evening')

Parameters

namestring
The reminder's name.

Reminder

interface Reminder
One of the user's reminders, as tinylib.reminders.list() resolves with it.

Properties

namestring
The name it was set under.
titlestring
The notification's title.
textstring | null
The notification's text, or null when it has none.
addressstring
The address your app opens at when the user taps the reminder. '' is the start screen.
atstring | number | null
For a one-time reminder, the at it was set with: a local date and time such as '2026-10-06T18:00', or milliseconds on Tinylib's clock. Null for a repeating reminder.
repeatRepeat | null
For a repeating reminder, its schedule. Null for a one-time reminder.
timeZonestring
The IANA time zone the reminder was set in, such as 'Europe/London'.
nextnumber | null
When the reminder next goes off, in milliseconds on Tinylib's clock, or null once it won't go off again.

ReminderOptions

interface ReminderOptions
What a reminder says, when it goes off, and where it opens. Give exactly one of at and repeat.

Properties

titlestring
The notification's title, up to 80 characters.
textstringoptional
The notification's text, up to 200 characters.
atstring | numberoptional
For a one-time reminder, when it goes off: a local date and time, 'YYYY-MM-DDTHH:MM' with optional :SS, in the device's time zone, or milliseconds on Tinylib's clock, such as tinylib.now() plus a delay.
repeatRepeatoptional
For a repeating reminder, its schedule, made with daily, weekly, or monthly.
addressstringoptional
The address your app opens at when the user taps the reminder, without a leading /, up to 100 characters. Defaults to '', the start screen.

Repeat

type Repeat = | { every: 'day'; time: string } | { every: 'week'; days: Day[]; time: string } | { every: 'month'; day: number; time: string }
A repeating reminder's schedule, made with tinylib.reminders.daily, weekly, or monthly. time is 'HH:MM' in the time zone where the reminder was set, wherever the user goes.

Day

type Day = 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat' | 'sun'
A day of the week, for tinylib.reminders.weekly.
Previoustinylib.placesNextTypes

On this page

  • set()
  • daily()
  • weekly()
  • monthly()
  • list()
  • cancel()
  • Reminder
  • ReminderOptions
  • Repeat
  • Day