Skip to content

Instantly share code, notes, and snippets.

@dnnsmnstrr
Created March 6, 2026 15:35
Show Gist options
  • Select an option

  • Save dnnsmnstrr/7727d2f01c7b20b016e59f33618a5030 to your computer and use it in GitHub Desktop.

Select an option

Save dnnsmnstrr/7727d2f01c7b20b016e59f33618a5030 to your computer and use it in GitHub Desktop.
Raycast Snippets to Alfred
import fs from 'fs'
const RCSnippets = JSON.parse(fs.readFileSync('./snippets.json', 'utf-8'))
if (!fs.existsSync('./output')) {
fs.mkdirSync('./output')
}
RCSnippets.forEach(sn => {
const data = {
alfredsnippet: {
snippet: sn.text,
uid: crypto.randomUUID(),
name: sn.name,
keyword: sn.keyword,
}
}
fs.writeFileSync(`./output/${sn.name}.json`, JSON.stringify(data, null, 2))
})
@dnnsmnstrr
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment