SDK quickstart
Two ways to interact with the ThaiHotelMinder workspace programmatically: the thm CLI, and the @thaihotelminder/sdk TypeScript package. Both use the same read-only API and the same workspace bearer token.
CLI
Install: npm install -g @thaihotelminder/cli
Configure: thm login (opens a browser to the workspace passwordless-login flow).
List modules: thm modules list
Fetch a pack: thm packs fetch pack_abc123 --format pdf --out ./pack.pdf
List parity breaches: thm parity list --unresolved
TypeScript SDK
Install: npm install @thaihotelminder/sdk
Import and use:
import { ThmClient } from '@thaihotelminder/sdk';
const thm = new ThmClient({ token: process.env.THM_TOKEN });
const modules = await thm.modules.list();
Rate limiting
Both CLI and SDK respect the 60/minute limit and back off automatically on 429 responses.
Support
Post issues to github.com/thaihotelminder/sdk or email dev@thaihotelminder.org.