switchboard export
Zips the whole Library, or chosen macros and groups, into a .switchboard file, secrets optionally removed.
Details #
switchboard export <file.switchboard> writes a zip of the Library folder, with Library/ at its root. An existing file with that name is replaced.
switchboard export ~/Desktop/backup.switchboard
exported /Users/you/Library/Application Support/Switchboard/Library to ~/Desktop/backup.switchboard
--macro <id|name> and --group <name> (each can be given more than once) export only those, the way File › Export Macro… does: the macros as they are, the macros they run, and the group of each, in the same layout. switchboard import and File › Import… read it.
switchboard export ~/Desktop/clean-title.switchboard --macro "Clean title"
switchboard export ~/Desktop/web.switchboard --group Web
exported 2 macros in 2 groups to ~/Desktop/clean-title.switchboard (with Slugify, which it runs)
A password, token or key typed into a step's field goes into the file as it is. When the macros carry any, the command says so on stderr: switchboard: 1 secret in the file as written; add --strip-secrets to remove it. --strip-secrets (with --macro or --group) writes those macros as Share… does, with each secret left empty for the person who imports them to fill in. Your Library is not changed. File › Export Macro… asks the same question in a dialog.
switchboard export ~/Desktop/router.switchboard --macro "Sign in to the router" --strip-secrets
It runs locally and does not need the engine. The archive holds the macro files only: no ._* companion entries, even for files that carry extended attributes.
Parameters #
switchboard export <file.switchboard> [--macro <id|name>]… [--group <name>]… [--strip-secrets] zip the Library, or only those macros and groups (with the macros they run and their groups);
Gotchas #
--strip-secretsapplies to--macroand--groupexports. The whole-Library export always writes everything as it is.A name that matches more than one macro is refused; give the id (or its first characters) instead.
A called macro that isn't in the Library can't go in the file; the command says how many.