Skip to content
← Public packages

@kentcdodds/raycast

Raycast launcher: stored execute commands via webhooks (canonical; do not use raycast-shortcuts).

AGENTS.md

96 lines · 3.0 KB · Markdown

Canonical Raycast package

Use only @kentcdodds/raycast for Raycast launcher work. Do not create or revive @kentcdodds/raycast-shortcuts. Office Lutron scenes are stored commands that call kody:@kentcdodds/lutron directly via upsert-command.

@kentcdodds/raycast — agent notes

Human setup: README.md. Extension source: extension/. Never paste minted webhook URLs or tokens in chat.

When Kent asks for a Raycast command

  1. Write an ESM module string with export default async function main(params).
  2. Prefer kody:@… imports and kody.* capabilities (same as MCP execute).
  3. Call upsert-command with title, description, icon, code (optional id).
  4. Tell Kent to open Kody Commands in Raycast (SWR cache; Cmd+R to force refresh).
import upsertCommand from 'kody:@kentcdodds/raycast/upsert-command'

export default async function main() {
  return await upsertCommand({
    id: 'example-list-packages',
    title: 'List my Kody packages',
    description: 'Smoke: list-packages via execute',
    icon: 'Box',
    code: `import listPackages from 'kody:@kentcdodds/raycast/list-packages'
export default async function main() {
  return await listPackages()
}`,
  })
}

Icon: prefer a Raycast Icon key (Terminal, Hammer, SpeechBubble, Box, …) or a single emoji.

Imports

ExportImport
webhook (router)kody:@kentcdodds/raycast/webhook
list-commandskody:@kentcdodds/raycast/list-commands
upsert-commandkody:@kentcdodds/raycast/upsert-command
delete-commandkody:@kentcdodds/raycast/delete-command
runkody:@kentcdodds/raycast/run
list-packageskody:@kentcdodds/raycast/list-packages
get-packagekody:@kentcdodds/raycast/get-package
invokekody:@kentcdodds/raycast/invoke

Prefer imports for agent work. The Mac extension uses the single launcher webhook only.

Webhooks

nameexport
launcher./webhook

Router body:

POST <minted-launcher-url>
Content-Type: application/json
Idempotency-Key: raycast:<action>:<uuid>

{"params":{ "action": "list-commands" }}
{"params":{ "action": "run", "commandId": "…" }}

./webhook ignores GitHub-shaped payloads (legacy hop side effect) with { ok: true, ignored: true }.

Mac config: ~/.config/kody/raycast.json → { "webhookUrl": "…" }. Kent reveals/copies the URL from https://kody.codes/account/webhooks (or package settings when that UI lands). Never paste URLs in chat. Do not disable launcher after cutover; old per-export webhooks may be disabled once Kent has switched.

Smoke

import webhook from 'kody:@kentcdodds/raycast/webhook'
export default async function main() {
  return await webhook({ action: 'list-commands' })
}
import run from 'kody:@kentcdodds/raycast/run'
export default async function main() {
  return await run({
    code: `export default async function main() { return { ok: true, smoke: true } }`,
  })
}