Skip to content

Black Friday

Annual Pro is $90 for the first year, normally $120. Or start monthly at $6 for two months, then $12.

Ends Dec 4, 11:59 PM PT.

Create an account
← Public packages

@tannerlinsley/imessage

Read, search, draft, and explicitly send iMessages on a Mac, using only built-in macOS tools.

FollowFork

Files

index.ts

14 lines · 667 B · TypeScript
import { native, object } from "./core.ts";
import type { Status } from "./types.ts";
/**
 * Check whether this Mac can read Messages before using history or search.
 * @param input - An empty object. Run on a Mac execution context with host commands enabled.
 * @returns macOS version, database readiness, and permission instructions if needed. Does not prompt for Automation or return messages.
 * @example
 * import status from 'kody:@tannerlinsley/imessage';
 * const readiness = await status({});
 */
export default async function status(input: Record<string, never> = {}): Promise<Status> {
  object(input, []);
  return native<Status>({ action: "status" });
}