@kentcdodds/raycast
Raycast launcher: stored execute commands via webhooks (canonical; do not use raycast-shortcuts).
AGENTS.md
96 lines · 3.0 KB · MarkdownCanonical 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
- Write an ESM module string with
export default async function main(params). - Prefer
kody:@…imports andkody.*capabilities (same as MCP execute). - Call
upsert-commandwithtitle,description,icon,code(optionalid). - 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
| Export | Import |
|---|---|
| webhook (router) | kody:@kentcdodds/raycast/webhook |
| list-commands | kody:@kentcdodds/raycast/list-commands |
| upsert-command | kody:@kentcdodds/raycast/upsert-command |
| delete-command | kody:@kentcdodds/raycast/delete-command |
| run | kody:@kentcdodds/raycast/run |
| list-packages | kody:@kentcdodds/raycast/list-packages |
| get-package | kody:@kentcdodds/raycast/get-package |
| invoke | kody:@kentcdodds/raycast/invoke |
Prefer imports for agent work. The Mac extension uses the single launcher
webhook only.
Webhooks
| name | export |
|---|---|
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 } }`,
})
}