Skip to content

Almanac

Almanac is a pure schedule core for host authors. Most people want Oyster to run Apps or Shiitake to run Agents.

  • @fungi.computer/almanac
  • v0.2.0
  • MIT

Fastest path

  1. Install

    Add it to your project with npm, pnpm, Yarn or Bun. Needs Node.js >=24.0.0.

    TERMINAL
    npm install @fungi.computer/almanac
  2. Find the next occurrence

    Compute the next UTC occurrence. Your host owns the timer, storage and work.

    home.ts
    import { nextOccurrence } from "@fungi.computer/almanac";
    import * as Result from "effect/Result";
    const next = nextOccurrence(
    { expression: "0 9 * * *", timeZone: "UTC" },
    Date.parse("2026-10-11T08:00:00Z"),
    );
    if (Result.isFailure(next)) throw new Error(next.failure.message);
    console.log(new Date(next.success).toISOString());