Skip to content

Instantly share code, notes, and snippets.

@letam
Last active October 7, 2025 18:36
Show Gist options
  • Save letam/65fd4ebb9ae93f10759a19eb93a16eb8 to your computer and use it in GitHub Desktop.
Save letam/65fd4ebb9ae93f10759a19eb93a16eb8 to your computer and use it in GitHub Desktop.
Obsidian Shell Commands Plugin - Settings import/export

Backup of Settings for Obsidian Shell Commands plugin

There's this cool (potentially dangerous) plugin for Obsidian to execute system commands and scripts via hotkeys, command palette, automated events, and execution via URI links:

How to backup or restore settings for shellcommands plugin

Export/import the file at $OBSIDIAN_VAULT/.obsidian/plugins/obsidian-shellcommands/data.json

How to restore hotkeys

Copy hotkeys from hotkeys-shellcommands.json to $OBSIDIAN_VAULT/.obsidian/hotkeys.json

TODO

  • Create script to backup config
  • Create script to restore it

Credits

{
"settings_version": "0.23.0",
"debug": false,
"obsidian_command_palette_prefix": "Execute: ",
"preview_variables_in_command_palette": true,
"show_autocomplete_menu": true,
"working_directory": "",
"default_shells": {},
"environment_variable_path_augmentations": {},
"show_installation_warnings": true,
"error_message_duration": 20,
"notification_message_duration": 10,
"execution_notification_mode": "disabled",
"output_channel_clipboard_also_outputs_to_notification": true,
"output_channel_notification_decorates_output": true,
"enable_events": true,
"approve_modals_by_pressing_enter_key": true,
"command_palette": {
"re_execute_last_shell_command": {
"enabled": true,
"prefix": "Re-execute: "
}
},
"max_visible_lines_in_shell_command_fields": false,
"shell_commands": [
{
"id": "giz9dmd254",
"platform_specific_commands": {
"default": "date +\"%Y-%m-%d %H:%M:%S \" | tr -d \"\\n\""
},
"shells": {},
"alias": "print timestamp",
"icon": null,
"confirm_execution": false,
"ignore_error_codes": [],
"input_contents": {
"stdin": null
},
"output_handlers": {
"stdout": {
"handler": "current-file-caret",
"convert_ansi_code": true
},
"stderr": {
"handler": "notification",
"convert_ansi_code": true
}
},
"output_wrappers": {
"stdout": null,
"stderr": null
},
"output_channel_order": "stdout-first",
"output_handling_mode": "buffered",
"execution_notification_mode": null,
"events": {},
"debounce": null,
"command_palette_availability": "enabled",
"preactions": [],
"variable_default_values": {}
},
{
"id": "cmbyyxkjdg",
"platform_specific_commands": {
"default": "date +\"%H:%M:%S \" | tr -d \"\\n\""
},
"shells": {},
"alias": "print time-only stamp",
"icon": null,
"confirm_execution": false,
"ignore_error_codes": [],
"input_contents": {
"stdin": null
},
"output_handlers": {
"stdout": {
"handler": "current-file-caret",
"convert_ansi_code": true
},
"stderr": {
"handler": "notification",
"convert_ansi_code": true
}
},
"output_wrappers": {
"stdout": null,
"stderr": null
},
"output_channel_order": "stdout-first",
"output_handling_mode": "buffered",
"execution_notification_mode": null,
"events": {},
"debounce": null,
"command_palette_availability": "enabled",
"preactions": [],
"variable_default_values": {}
}
],
"prompts": [],
"builtin_variables": {},
"custom_variables": [],
"custom_variables_notify_changes_via": {
"obsidian_uri": true,
"output_assignment": true
},
"custom_shells": [],
"output_wrappers": []
}
{
"obsidian-shellcommands:shell-command-giz9dmd254": [
{
"modifiers": [
"Alt",
"Shift"
],
"key": ";"
}
],
"obsidian-shellcommands:shell-command-cmbyyxkjdg": [
{
"modifiers": [
"Alt",
"Shift"
],
"key": "'"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment