Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jeremy-code/50117d5b4f29e04fcbbb1f55e301b893 to your computer and use it in GitHub Desktop.

Select an option

Save jeremy-code/50117d5b4f29e04fcbbb1f55e301b893 to your computer and use it in GitHub Desktop.
Import/export Raycast preferences with GIt history

Raycast has a feature to import/export preferences in a .rayconfig file format. This isn't ideal for use in a dotfiles-esque Git repository since it would be difficult to compare changes with a compressed file. Also, unfortunately, syncing is only possible on a pro subscription and only through Raycast's cloud service.

To get a more useful JSON file from the .rayconfig (example shown in example.rayconfig.json), you will have to first have to export a decrypted version. Go to Settings > Extensions > Raycast > Export Settings & Data and under "Export Password," which by default is 12345678, you will want to delete that.

After that, run the "Export Settings & Data" command. You should be able to export all of the preferences (Settings, Extensions, Floating Notes, Script Directories, Snippets) except Quicklinks without setting a password.

Then, in terminal, run gzip --decompress --keep --suffix .rayconfig NAME_OF_FILE.rayconfig and you should get a JSON file similar to example.rayconfig.json.

After that, you can get it back into .rayconfig format using gzip --keep --suffix .rayconfig NAME_OF_FILE and then run "Import Settings & Data" command to get it back.

As for syncing, I am not sure of a way to do it. Deeplinks may be a path but it still requires some input from the user (raycast://extensions/raycast/raycast/export-settings-data and raycast://extensions/raycast/raycast/import-settings-data). Let me know if you have any thoughts

{
"builtin_package_typingPractice": {
"provider_schemaVersion": 1
},
"builtin_package_default": {
"provider_schemaVersion": 1,
"didMigrateQuicklinkFallbackSearch": true,
"disabledSiriShortcutIds": [],
"installedNativeExtensionIdentifiers": ["builtin_package_media"],
"disabledSiriShortcutNames": [],
"enabledFallbackSearchIdentifiers": [
"builtin_command_fileSearch_fallbackSearch",
"builtin_command_extensionStore_fallbackSearch",
"builtin_command_searchSnippets_fallbackSearch",
"raycastQuicklink_9ACA6BC2-5986-429A-965B-79704979028E",
"builtin_command_dictionary_defineWord_fallbackSearch",
"builtin_command_translate_fallbackSearch",
"builtin_command_searchEmoji_fallbackSearch",
"builtin_command_open-ai-chat-gpt_fallbackSearch",
"raycastQuicklink_7F5188EF-A84E-4A62-BF17-AF1752169F8B",
"builtin_command_searchMenuItems_fallbackSearch"
],
"didMigrateWebSearches": true
},
"builtin_package_raycastAccount": {
"provider_schemaVersion": 1
},
"builtin_package_floatingNotes": {
"provider_schemaVersion": 1
},
"builtin_package_fileSearch": {
"provider_schemaVersion": 1
},
"builtin_package_github": {
"provider_schemaVersion": 1
},
"builtin_package_quick-ai": {
"provider_schemaVersion": 1
},
"builtin_package_calendar": {
"provider_schemaVersion": 1
},
"builtin_package_dictionary": {
"provider_schemaVersion": 1
},
"builtin_package_scriptCommands": {
"provider_schemaVersion": 1
},
"builtin_package_emoji": {
"provider_schemaVersion": 1
},
"builtin_package_snippets": {
"snippets": [],
"provider_schemaVersion": 1
},
"builtin_package_raycastExtensions": {
"provider_schemaVersion": 1,
"extensions": []
},
"builtin_package_navigation": {
"pinnedMenuItems": [],
"provider_schemaVersion": 1
},
"builtin_package_linear": {
"provider_schemaVersion": 1
},
"raycast_onboarding": {
"completedTaskIdentifiers": [],
"provider_schemaVersion": 1,
"showOnboardingItem": true
},
"builtin_package_clipboardHistory": {
"provider_schemaVersion": 1
},
"raycast_version": "1.79.1",
"builtin_package_webSearches": {
"provider_schemaVersion": 1
},
"builtin_package_browserBookmarks": {
"provider_schemaVersion": 1
},
"builtin_package_url": {
"provider_schemaVersion": 1
},
"builtin_package_reminders": {
"provider_schemaVersion": 1
},
"builtin_package_calculator": {
"provider_schemaVersion": 1
},
"builtin_package_contacts": {
"provider_schemaVersion": 1
},
"builtin_package_asana": {
"provider_schemaVersion": 1
},
"builtin_package_translator": {
"provider_schemaVersion": 1
},
"builtin_package_rootSearch": {
"rootSearch": [
{
"frecencyDate": 749857956.5999999,
"searchTerms": "export",
"key": "builtin_command_configurationExport",
"openedAt": 744105261.879,
"type": "command"
}
],
"provider_schemaVersion": 1
},
"builtin_package_nodeExtension": {
"provider_schemaVersion": 1
},
"builtin_package_developer": {
"provider_schemaVersion": 1
},
"builtin_package_gSuite": {
"provider_schemaVersion": 1
},
"builtin_package_raycastPreferences": {
"preferencesAdvanced": {
"mainWindowCaptureCopyToClipboard": true,
"navigationCommandStyleIdentifierKey": "macos",
"mainWindowCaptureOpenQuickAccessOverlay": false,
"raycastAPIOptions": 0,
"keepWindowVisibleOnResignKey": false,
"popToRootTimeout": 90,
"useHyperKeyIcon": false,
"mainWindowCaptureShowInFinder": false,
"raycastWindowPresentationMode": 0
},
"preferencesGeneral": {
"raycastAlternativeEscape": false,
"raycastGlobalHotkey": "Option-49"
},
"preferencesAppearance": {
"statusBarIsVisible": true,
"raycastUI_preferredTextSize": "medium",
"raycastPreferredWindowMode": "default",
"showFavoritesInCompactMode": true
},
"provider_schemaVersion": 1
},
"builtin_package_organizations": {
"provider_schemaVersion": 1
},
"raycast_user_activity": {
"activities": [
{
"type": "appOpen",
"date": "2024-07-31T07:54:16.269Z",
"id": 1
},
{
"id": 2,
"type": "openRaycastCommand",
"infoId": 1,
"date": "2024-07-31T07:54:21.879Z"
},
{
"type": "appOpen",
"date": "2024-07-31T07:54:29.432Z",
"id": 3
},
{
"id": 4,
"date": "2024-07-31T07:54:35.940Z",
"type": "appClose"
},
{
"id": 5,
"type": "appOpen",
"date": "2024-07-31T07:54:47.765Z"
},
{
"type": "appClose",
"date": "2024-07-31T07:54:50.017Z",
"id": 6
},
{
"type": "appOpen",
"date": "2024-07-31T07:54:54.218Z",
"id": 7
},
{
"date": "2024-07-31T07:54:58.181Z",
"id": 8,
"type": "appClose"
},
{
"date": "2024-07-31T07:55:32.687Z",
"id": 9,
"type": "appOpen"
},
{
"id": 10,
"date": "2024-07-31T07:55:36.659Z",
"type": "appOpen"
},
{
"type": "appClose",
"date": "2024-07-31T07:55:39.686Z",
"id": 11
},
{
"type": "appOpen",
"date": "2024-07-31T07:55:43.646Z",
"id": 12
},
{
"type": "appOpen",
"id": 13,
"date": "2024-07-31T07:55:46.001Z"
},
{
"type": "appClose",
"date": "2024-07-31T07:55:51.255Z",
"id": 14
},
{
"type": "appOpen",
"id": 15,
"date": "2024-07-31T07:56:28.785Z"
},
{
"id": 16,
"type": "appOpen",
"date": "2024-07-31T07:56:50.962Z"
},
{
"type": "appClose",
"id": 17,
"date": "2024-07-31T07:57:29.094Z"
},
{
"date": "2024-07-31T07:57:38.838Z",
"type": "appOpen",
"id": 18
},
{
"date": "2024-07-31T07:57:43.118Z",
"id": 19,
"type": "appOpen"
}
],
"activityInfo": [
{
"key": "builtin_command_configurationExport",
"title": "Export Settings & Data",
"id": 1
}
],
"provider_schemaVersion": 1,
"aiChatActivities": []
},
"raycast_app_defaults": {
"firstKnownVersion": "1.79.1",
"installationDate": "2024-07-31T07:53:51Z",
"provider_schemaVersion": 1,
"anonymousId": "9F6FF498-786B-4D66-90A9-15FE0698274D"
},
"builtin_package_systemCommands": {
"provider_schemaVersion": 1
},
"builtin_package_jira": {
"provider_schemaVersion": 1
},
"builtin_package_screenshots": {
"provider_schemaVersion": 1
},
"builtin_package_zoom": {
"provider_schemaVersion": 1
}
}
@malpern
Copy link

malpern commented Feb 7, 2025

I'm finding Raycast REQUIRES me to provide a password.

image

Any idea how to decrypt it if I provide one?

@jeremy-code
Copy link
Author

Sorry friend, I spent some time trying to figure it out but couldn't figure out an elegant way to do it. I switched to Alfred which has reasonable configuration settings. I used gz at the time to decompress it — there are online tools to decompress with gzip if you have the plaintext.

@malpern
Copy link

malpern commented Feb 8, 2025

Got it. Thanks for publishing your findings and responding to my feedback. I left this note in the Raycast Slack Channel:

I'd love a way to export all my Raycast Notes so I can edit them in other tools and reimport/round trip.

  • How I tried to hack around the limitations to do this today:
  • For a shining moment I thought I could do this with the Settings Export... command which includes Raycast notes. Folks in the community talked about exporting without a password and then uncompressing to access the raw JSON. eg https://gist.github.com/jeremy-code/50117d5b4f29e04fcbbb1f55e301b893.
  • However, as of now Raycast REQUIRES a password to encrypt it, and I haven't found a way to decrypt the files.
➜  raycast-export openssl enc -d -aes-256-cbc -a -in "Raycast 2025-02-07 09.18.28.rayconfig" -out decrypted_config.gz -pass pass:12345678

error reading input file

I've been unable to find a way to access the raw JSON in an encrypted rayconfig file even if I know the password, so I think I'm stuck until Raycast build an explicit bulk export/import feature. 😞

@christippett
Copy link

christippett commented Aug 5, 2025

You almost had it @malpern!

INPUT_FILE="raycast.rayconfig"
PASSWORD="secret"
OUTPUT_FILE="$(basename "$INPUT_FILE" .rayconfig).json"

openssl enc -d -aes-256-cbc -nosalt -in "$INPUT_FILE" -k "$PASSWORD" 2>/dev/null | tail -c +17 | gunzip > "$OUTPUT_FILE"

@jeremy-code
Copy link
Author

jeremy-code commented Aug 14, 2025

@christippett Awesome! Tried it out and it worked for me. Looks like the JSON structure is the same as it was previously.

For reference, these were the files I used:

raycast.rayconfig: https://files.catbox.moe/h6v5pk.rayconfig
raycast.json: https://files.catbox.moe/ok3m74.json

EDIT: With password 12345678

@halo
Copy link

halo commented Aug 22, 2025

@christippett Thank you!

I managed to convert .json back to .rayconfig and import it in the app.

# Save the header from a pristine export for later use 
head -c 16 some-raycast-export.rayconfig > header.bin

# Use the .json file ($OUTPUT_FILE) to produce a .rayconfig file again ($INPUT_FILE)
cat "$OUTPUT_FILE" | gzip | cat header.bin - | openssl enc -e -aes-256-cbc -nosalt -in /dev/stdin -k "$PASSWORD" -out "$INPUT_FILE"

@christippett
Copy link

Nice one @halo. I found that encrypting the json file isn't required for the import to work (I guess to be backwards compatible before they introduced encryption). You do still need to gzip the file though.

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