Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Favorites - Mass edit - Import and Export #598
Would it be possible to export favourites into an editable format that can be redistributed to others?
We purchased the team licence but it's very difficult to keep everyones favourites in sync. We have 20+ favourites on each machine and if a change is required it can get complicated very quickly.
What I would like to do is be able to export my list of favourites into a single file, mass edit and then pass that onto a colleague who can then import (ideally overwriting their existing setup)
We would need to include all fields, including the SSH connection settings. I could mass edit the file after to remove unwanted options (or excluding options could be a user option upon export)
Also the ability to mass highlight favourites for deletion :)
You can use the "Export Favorite" command to export favorites into files. The exported files are plist files, so you can edit them with plutil and a text editor.
If you want to mass-edit favorites, you could also edit the SQLite database where they are stored directly. (It's in Library/Containers/at.eggerapps.Postico/Data/Library/Application Support/Postico/Favorites.db) Make sure to do that only when Postico isn't running, though!
Postico also supports connection URLs which is another way to exchange connection details: https://eggerapps.at/postico/docs/v1.4.2/favorite-window.html
But all that isn't super convenient, and we're working on a better Favorite system. I'd love to get some feedback from people who actually need this. Would it be possible that I ask you a couple of questions privately via email? My email is firstname.lastname@example.org
Hey Jakob, thank you very much for responding so quickly.
I wasn't aware of the plutil utility. Seems to work well, thank you:
What I am very interested in is the connection URLs as I could possibly automate our entire workflow using this.
We use Vault to dynamically provide auth - https://www.vaultproject.io/docs/secrets/databases/postgresql.html
Using the connection URL I can wrap this in a script that can pull in the required auth and launch Postico... Awesome...but, we use an SSH key and I'm not sure if that connection parameter is supported. Without the ability to pass in the location to the SSH key I can't really do anything with this. Any ideas?
@sparkacus I've made some improvements to URL handling. The following arguments are now supported:
The big change is that you can now just use partial URLs, and Postico will automatically update favorites with details you provide in the URL. So for example, you can use this command:
Then Postico will look for a favorite named "Staging", update user & password, leave all other details as they were, and connect.
Regarding SSH Private keys: I've considered adding a
You can download a new build with those features here:
PS: you can use
Please let me know if any of this helps!
That looks brilliant. Liking the
I'll try to make some time tomorrow to test and I'll provide you with feedback.
Thanks for all your work.
So far so good.
connect_favorite: Seems to be false by default. I have to pass in this param and set to true to auto-connect
I don't know if this is a good idea, but putting it out there. Is it possible to create a template favourite that contains the SSH host, username, pass, key etc that other favourites can consume? e.g. each favourite can specify it's own SSH connection details or select a template
If the above is possible, that will negate the need for me set environment variables on each machine so that my script can gather the relevant SSH details.
I hope this makes sense.
Hi @sparkacus, I've continued to work on this. I've now implemented a
Here's a new build of Postico: Postico 4011.zip
I've also written extensive documentation for the feature. Here are the interesting bits about the supported query string parameters in connection URLs:
The changes are now released in Postico 1.5
Docs can be found here:
I'm closing this issue now; if you have any more feedback regarding this, feel free to reopen this issue, or create a new one!
@jakob Thank you very much for your hard work on this. The updates you've applied work really well for us so far.
Not sure if this should be a new issue or not, but are you able to expose the option to disable keychain? When creating a fav, keychain is automatically selected and our users may forget to uncheck.
Would it also be possible to expose the Color option? This would be very useful as I can automatically highlight production databases as red for example.