How to use one agent function on multiple projects without copy paste

We have a whole bunch of functions used for formatting data into the HTML string in the agent,we also have a number of different projects, is there anyway to put these functions into a “library” of some kind so each agent. An reuse the functions without having to copy and paste every time we update them

Yes, you want to do local includes. See either the Mac squinter project or the sublime text plugin (that uses builder to pull in dependencies).

Links:

https://discourse.electricimp.com/discussion/2869/mac-users-squinter-utility-for-managing-device-agent-code-and-libraries/p1

Is it possible to include files on github or rawgit.com in an imp agent or device?

At this point, that’s not possible, @kitty. It’s a cut’n’paste task for the time being - or use one the tools @Hugo mentioned to include the locally sync’d copy of the code.