Guides
Generated types
Type every query, saved query and recipe from your own account's kinds, with one command.
The SDK works without types, but with them your editor knows every kind, column, saved query and recipe in your account, and catches a misspelt column before you run anything.
npx @awesomate/sdk types --out awesomate.d.tsThen import the file once, anywhere in your project:
import './awesomate';
const { rows } = await db.query('job', { where: { status: 'booked' } });
rows[0].status; // 'open' | 'quoted' | 'booked' | 'done' | null
await db.call('book_job', { customer: contactId, title: 'Gutter clean' }); // arguments checkedWhich account
The command uses AWESOMATE_TOKEN when it is set. Otherwise it reads ~/.awesomate/credentials.json, the file the Awesomate MCP keeps, choosing the profile from --profile, then AWESOMATE_ACCOUNT, then its default. It prints the account it used, so a wrong one is obvious. Pass --base to point at another hub.
Keep them current
Run the command again after you add a kind, change an attribute, or save a query or recipe. The file is generated from what the account's token may read, so attributes not marked readable by AI are left out, and the file says how many.