Vicinae Extension Authoring
Overview
Follow the repo’s established Vicinae extension patterns for structure, caching, actions, and build workflow. Prefer the same defaults and shortcuts used across existing extensions.
Workflow
- •Identify scope and complexity (single command vs multi-module extension).
- •Choose structure from
references/extension-template.md. - •Define manifest + preferences in
package.jsonusing the Vicinae schema. - •Implement data access with React Query persistence using
persistQueryClient(seereferences/cache-patterns.md). - •Implement ActionPanel ordering and shortcuts (see
references/action-ux-standards.md). - •Add empty/loading/error states and toasts.
- •Run
pnpm -C <extension> lintandpnpm -C <extension> build. - •For dev sessions, run
pnpm -C <extension> dev.
Decision points
- •Single-file vs modular: use the expanded structure when you have API calls, caching, or >1 command.
- •Cache strategy: use Vicinae Cache when data should persist across sessions or is expensive to recompute; otherwise React Query alone is fine.
- •TTLs: keep Cache TTL and React Query
staleTimealigned unless there is a clear reason to diverge.
Manifest and structure rules
- •Match directory name with
package.jsonname. - •Include
extension_icon.png(512x512) inassets/. - •Include at least one command with
mode: "view". - •Use
@vicinae/apiin dependencies.
Local dev requirements
- •NodeJS >= 20 and a npm-compatible package manager (pnpm preferred in this repo).
Data and cache rules
- •Use React Query for fetches and local cache.
- •Prefer
persistQueryClientwith a Vicinae Cache-backed persister for cross-session persistence. - •Keep
gcTimealigned withpersistQueryClientmaxAge. - •Do not trigger toasts during render; use
useEffector queryonError.
Anti-patterns (never)
- •Never call
showToastduring render; it causes repeated toasts and jitter. - •Never leave debug logging in production commands.
- •Never mix manual Cache persistence with React Query persistence in the same command.
- •Never bind shortcuts for actions that are unavailable.
- •Never open external URLs without a success toast +
closeMainWindow().
References
Official Vicinae Documentation (in references/docs/src/app/extensions/):
- •Introduction & architecture:
references/docs/src/app/extensions/introduction/page.mdx - •Creating extensions:
references/docs/src/app/extensions/create/page.mdx - •File structure:
references/docs/src/app/extensions/file-structure/page.mdx - •Manifest format:
references/docs/src/app/extensions/manifest/page.mdx - •API reference:
references/docs/src/app/extensions/api/page.mdx - •View commands:
references/docs/src/app/extensions/view-command/page.mdx - •No-view commands:
references/docs/src/app/extensions/no-view-command/page.mdx - •Debugging:
references/docs/src/app/extensions/debug-raycast/page.mdx
Repo-specific patterns:
- •If creating a new extension or adding modules, read
references/extension-template.md. - •If implementing persistence or caching, read
references/cache-patterns.mdbefore coding. - •If adding or reordering actions/shortcuts, read
references/action-ux-standards.md.