Introducing “tinpig”


Years ago, I was a big fan of Sublime Text as an editor. It’s a great general purpose editor. There was one thing I missed though. Prior to that, I had mostly worked in dedicated, language/platform IDEs. These always had a “new project” functionality. They knew how to set up a new project in the language they were dedicated to. Because Sublime is a general purpose editor, it couldn’t really supply that functionality, because every type of project is different.

So, I wrote a plugin called STProjectMaker, now, just ProjectMaker. This allowed you to create a template for whatever language/platform you wanted, and create a new project from within Sublime. It actually became fairly popular, with over 6000 installs.

But about four years ago, I stopped using Sublime Text. So I stopped working on the plugin. Issues and PRs and feature requests piled up. Recently Ben Felder asked if the project was still alive and if he could help out getting it into shape. He’s been doing a great job cleaning things up and has brought the project back to life again, which I’m really excited about, and very grateful for.

But, personally, I’m still not using Sublime. So this got me thinking about recreating the basic functionality as a standalone project. Last Friday I sat down and wrote up a list of features I wanted in such a tool. And one week later, yesterday, I released v1.0 of a project codenamed “tinpig”.


The concept is pretty simple. You have templates, which are folders of files, potentially with replaceable tokens in them. You choose a template, specify a location and it copies the files over, replacing the tokens with values you define. Not rocket science.

There are other tools out there that are probably way more powerful. I think one of tinpig’s key features is its simplicity. The whole reason you would use a tool like this is to quickly spin up projects of different types. For prototyping, testing stuff, great for creative coding, etc. You don’t want to have to learn a whole new tool or templating language to do that. You can just create a project the way you like it, copy the files over into your templates directory and add a json file with a name and description, and you have a new template that lets you recreate that project anywhere you want within about 20 seconds.

But if you want, you can go in and add tokens and a few other power features to make the project even more powerful.

Just thinking… I should make a tinpig template template. A meta template that makes setting up a template even easier… Sorry, got sidetracked.

Anyway, try it out. If you want. Let me know if it’s useful. Tell me how it could be better.

Oh, if you come up with a useful template, feel free to do a PR in the tinpig-templates repo. Or just chuck it over to me and I’ll put it in there.