TypeScript SDK
Use the @fatcalendar/core client in TypeScript, Node, Cloudflare Workers or React Native to call the fatcalendar API with typed responses.
Install
npm install @fatcalendar/core
@fatcalendar/core on npm is a portable package: it uses only fetch and has no DOM or Node dependencies, so it runs unchanged in browsers, Node 18+, Cloudflare Workers and React Native (Hermes).
First call
import { createClient } from '@fatcalendar/core/client';
const fc = createClient({ baseUrl: 'https://fatcalendar.com' });
const day = await fc.day({ tradition: 'telugu', lang: 'en', date: '2026-11-08', place: 'Hyderabad' });
console.log(day.panchang.tithi.value, day.windows.map((w) => w.label));
Methods
month, week, year, day, festivals, panchang, places, traditions, languages - each mirrors the REST endpoint of the same name and returns the typed response from @fatcalendar/core/api-types (MonthResponse, DayResponse, DayCell, FestivalItem ...).
Types
import type { MonthResponse, DayCell } from '@fatcalendar/core/api-types';
import type { TraditionId, LangId } from '@fatcalendar/core/types';
Without the SDK
Any HTTP client works: see the REST API reference or generate a client from /openapi.json with openapi-generator, openapi-typescript or similar.
Command line
There is no separate CLI package; use curl (see REST API) or the MCP server through an MCP-capable client.