Releasing your sketch on github?

Is there any current mechanism for getting your code back out of the build IDE other than copying and pasting the contents of every file by hand?
I want to start putting all the code into github but this seems like a non trivial task at the moment.
If there isn’t… what is the plan?

1 Like

Great question! And a very important issue for us. We’ve been working steadily towards some beautiful github integration. You are very, very right—it is a non-trivial task.

Here’s what’s already done toward this goal:

  • first we added app examples, which pull from github
  • then we added support for multiple files
  • then we made the preprocessor only run on the main .ino file, not all the .cpp files

We have internal work (heavy on both the front end and the back end) in progress to create a “community libraries” mechanism that integrates well with github. It is still very much in the works, but you can expect to see this rolled out sometime later in March.


There has been some talk about extending the command line interface to make pulling and pushing code to and from the build site easier as well. Is that a feature people would want as well?



Github integration, or some way to easily down/upload source code, is a feature that I’m eagerly awaiting. Is there an issue tracker somewhere where I could monitor the progress of this?

1 Like

I know library support will include pulling code from Github, where do you think the best place to track this would be @jgoggins?


Hey @azenk , good timing on asking this question!

We just released Spark Libraries today, this includes a GitHub integration to import code you can reuse across applications. More info here on this thread.

At some point, we’re also planning on building an “export” feature that let’s you export to GitHub or .zip file as well.

1 Like

i found that problem yesterday, pretty surprised you can’t export as a tarball or something, or even the dreaded “share” button you get on social networking. exporting to github i’m not so sure about as you’d have to hand over your api keys.

Hey @sej7278 , I could see the export feature meaning a couple of different things:

  1. export as .zip or tarball
  2. export to Gist
  3. commit to repository
  4. read-only share code via link (haven’t explored this yet; thanks for bringing it up :smile: )

I’m thinking we’ll first ship something that does #1 and/or #2, and hold off on #3 unless people are really clamoring for it.

For #4, the “dreaded share button” :smile: , I imagine you’re thinking of something where you hit the button and it brings up a little form to tweet/facebook/etc a message with a link to your application. A possessor of the link would be able to always see the most current version of the application. The UI would be trimmed down and everything would be read only. I can see a read-only view of a firmware app as being useful. Is this what you were thinking?

yup, the dreaded share button. i meant some type of readonly link, not necessarily social networks but maybe something you can post here or email to someone etc. bit like a private gist i guess.

maybe even share between IDE users - i.e. another user can “pull” your code into their IDE, we’re starting to duplicate github a bit now though…

Gotcha, a readonly link like a private gist that allows non-logged in users to view the code and logged-in users to hit a button to turn the sketch into a new flashable app in their own account! Each app would have a “viewable by others” setting that you could enable via a “share app” button, and disable in the app drawer.

Does that cover it? I think this would be be pretty sweet.

1 Like

Hi guys at Particle, any update on this in the present system? Would dearly love to version control my code

I would recommend that you try working locally. You can use Git on your computer to work with GitHub repositories, and use Particle Dev or particle-cli to get code onto your device(s). If you are on Mac or Linux, you can use po-util to easily compile code locally on your computer and flash firmware over USB to your device(s) using dfu-util.

1 Like

Reworking the IDEs and new library support is the prime focus for the dev team currently, so nothing new yet, but stay tuned.

Thanks guys, looking forward to a possible git integration!