Raycast extension foundation for Figa external API integrations.
apps/raycast.x-api-key stored in a required Raycast password preference.https://api.figa.cc.See ../../docs/raycast-extension-decision.md for the architecture note.
See ../../docs/raycast-ai-tools-spike.md for the decision to defer Raycast AI tools from the first public release.
See ../../apps/help/src/pages/developers/integrations/raycast.astro for customer setup docs, QA matrix, and release checklist.
Prerequisites:
From this directory:
npm install
npm run dev
From the monorepo root:
pnpm -F figa dev
pnpm -F figa build
pnpm -F figa lint
Raycast preferences:
API Key: a dedicated Figa workspace API key. Use read preset for read commands and write preset for mutation commands.Show Workspace Context: calls GET /api/v1/context, validates the configured key, and shows workspace context, plan tier, critical limits, context defaults, discovered capabilities, safe error states, and shortcuts to API key settings and developer docs.Search Expenses: calls GET /api/v1/context and GET /api/v1/expenses?year=YYYY&month=MM, gates on expenses.read when context v2 capabilities are present, and lists current-month expenses with all/unpaid/paid quick views, copy/paste actions, Figa deep links, and a selected-expense mark-paid action for keys with expenses.payments capability.Show Monthly Summary: calls GET /api/v1/context and GET /api/v1/expenses/monthly-totals, gates on expenses.read when available, and shows the same seven-month overview range used by the web app.Create Expense: calls GET /api/v1/context, GET /api/v1/categories, GET /api/v1/recipients, and POST /api/v1/expenses, gates on expenses.write when available, defaults currency from workspace context, uses live reference choices, and sends a UUID Idempotency-Key.Search Categories: calls GET /api/v1/context and GET /api/v1/categories, gates on categories.read when available, and lists global/workspace categories with copy/paste actions and Figa deep links.Search Recipients: calls GET /api/v1/context and GET /api/v1/recipients, gates on recipients.read when available, and lists global/workspace recipients with copy/paste actions and Figa deep links.Broader update/delete workflows are deferred until a dedicated low-risk Raycast UX is specified.
The client in src/api/client.ts:
x-api-key,User-Agent: FigaRaycast/0.1.0 (Raycast),schemaVersion: 2 capabilities/defaults while keeping the workspace context command compatible with schemaVersion: 1 responses,Do not log or render the raw API key. Do not include real workspace data or API keys in Store screenshots.
Raycast Store review uses npm, so keep package-lock.json committed for this package. Run npm run build before publishing.
npm run lint runs local ESLint and Prettier checks. Run npm run lint:store before publishing; it performs full Raycast metadata validation and currently requires the author value to match the real Raycast Store handle.
Use the help-page release checklist before Store submission. It covers versioning, command review, redacted screenshots, Store metadata, and supported paid-plan/API-key notes.
Use a non-production workspace or redact workspace data before creating screenshots. Never capture the raw API key.
Scenarios for #529/#540:
workspaces.read is required and links to API key settings/docs.Scenarios for #530:
Search Expenses shows current-month expenses, all/unpaid/paid quick views, formatted amounts, dates, copy/paste actions, and Figa expense links.Search Expenses shows an empty state with refresh, Figa expenses, preferences, and docs actions.Show Monthly Summary shows recent monthly total/paid/unpaid values using the workspace base currency.expenses.read: both read commands stop before calling expense endpoints and show an API-key permission state.Scenarios for #542:
categories.read or recipients.read: the relevant command stops before calling the reference endpoint and shows a permission state.Scenarios for #543:
Create Expense pre-fills workspace base currency, loads live categories and recipients, submits POST /api/v1/expenses with a UUID Idempotency-Key, shows a success toast, and exposes actions to open the expense/workspace in Figa or create another expense.expenses.write: the command stops before calling reference or create endpoints and shows a write-permission state.Scenarios for #531:
expenses.payments: an unpaid selected expense exposes Mark Expense Paid, confirms the action, reads current payment metadata, records a remaining-amount payment with a UUID Idempotency-Key, shows a success toast, and refreshes the expense list.