As far as I know, for lua You've got 2 options: You could get the student/teacher software and do it from there. Unfortunately this approach costs real moneys (
), but you get an IDE-like environment with an emulator and all. On the other hand, you could get a third party tool (like Luna, for example) which will convert and package your lua files into a .tns file. This article on hackspire gives a pretty nice rundown of the methods you could use and also links to a page with documentation of all the API's on the nspire:
https://hackspire.org/index.php?title=Lua_Programming. If you are new to programming in lua, I'd also recommend you to first do some tutorials on a computer instead of jumping straight into the nspire. There's a lot of really nice lua tutorials on the internet. Aside from that, you will also need to learn about how event-based programming works, since this is the model that the nspire API uses.
Good luck with your program!