[PIGET] Save and share your projects

[PIGET] Save and share your projects

We are going to see how tu use git module to create your own modules.

Modules are a great way to works on your project on a Raspberry Pi.
You can save your project and make it available at the beginning of it and share all your scripts to automate tasks.

You can also use all availables modules on Piget , and works with anyone on it.

In this tutorial we are going to :

  • Install git module
  • Create an example module
  • Save this module

Install git module

You can easily create and save module using git module.

To install git module type :

/pi/install git

Git must know your username and email to identify you.
This information is not mandatory, but it is adviced to fill it.
To setup git type :


  • Enter your username on github
  • Enter your email on github
When you save a module, your password will be cached for 15 minutes before you need to enter it againr

Create a module

You can do all theses directly on Windows with samba module

We are going to create an example module.

  • Create /do/example folder

mkdir /do/example

Module name must be in lowercase
  • Create install script

nano /do/example/install

  • Make it executable (This also check compatibility)

/system/convertScript /do/example/install

A module always starts with a install script
The install script have all the commands needed to make the module works, When the module is installed, this command will be launch .

A good way to start a module is to copy all the commands from a tutorial inside this script, so you won’t need to go back back to it, and you can make and keep modifications.
Don’t forget to put a link to the tutorial, and his author name inside your script. This will help people to know where to find more information.

Try to avoid as much as possible user interactions in your install script. If you need to ask something to the user, put it inside a setup script

Since we have an install script, we can already upload it, so be can easily save it and get some help to make it.

Save your module

On github

  • Create a new repository


  • Put inside Repository name, the name of your module


  • Click on Create repository

In your terminal

  • Inside the module folder /do/example

cd /do/example

  • Type

/do/git/create username/example
/do/git/create benzaie/example

  • Enter your email (github)
  • Enter your password (github)

Your module is now available on github !

Some advice

  • No settings and password inside your module ! Use the folder /user/config/module_name instead !
  • Only put scripts in the main folder, put code / settings / documentations in subfolders.
  • Check out modules inside github.com/pigetnet (especially those who have a documentation)
  • We see how to document your scripts in another tutorial.
  • We see how to use system commands in another tutorial.

Others commands

Coming Soon!

Comments are closed.