How to "save" collisions directly on a tileset


I’m working on a simple collision tileset that I want to use in different maps. I simply created a few basic red shapes in gimp:

At the moment, each time I create a new map, I have to import this tileset, then I must open each “shape” one by one in the collision editor and draw a rectangle or triangle for the collision.

Is it possible to save the tileset after I added the collisions so it’s already in a good shape next time I use it?
Or maybe is there a way to automate that procedure via scripts?

Yes. you can use the small “Export Tileset” button at the bottom to save the tileset to a .tsx file (or a .json file). Once exported, you can add this tileset to other maps using Map → Add External Tileset…

Unfortunately Tiled is not scriptable yet, but that is something I’d like to work on in the future (#949).