rpim v1.0.4
manage-raspberry-pi
CLI tool for easy setup and managing of Raspberry Pi's in the local network. List all Raspberry pi's, easily setup the SSH connection, read out type and model, configure a Raspberry pi as a kiosk or other...
platforms
Tested on Mac and Linux, if you find any issues please take the time to create a bug report for it on Github.
Installing
Run $ npm install rpim -g to install rpim globally on your computer.
Or when you only want to use it once or test it you can use npx, like so $ npx rpim ls
Sub commands
To perform a specific task you can instruct rpim to perform that sub command for you. Run $ rpim <sub-command> in your terminal. An example $ rpim ls lists all Raspberry pi's in the local network with their mac address.
The available sub commands are:
lsList all Raspberry pi's found on the local network with ip - and MAC address. This info may be outdated since it reads from the local connection cache. Run ping to update.shutdownShuts down the Raspberry piinfoShow detailed information about Raspberry pi'ssetup-sshConfigures the local machine and Raspberry pi's so that this machine has password-less SSH accessssh-configDisplay the SSH configuration that is used by this machineconfigureSet's up a Raspberry pi with a specified intention, kiosk mode or otherlogDisplay the management log from the Raspberry pipingPerform a mass ping to update the arp cache. This may help when Raspberry pi's can't be foundresetResets all configurations done by rpim (local SSH configurations done by rpim and remote authorized keys)set-hostnameSets the remote hostname(s)
Flags
You can provide rpim with information by providing flags. The available flags are:
verbose,vShow verbose feedback and debug datausername,uUsername to use when logging in to a Raspberry piipSelect this ip (or ip's) to perform a sub command on. If not set all found Raspberry pi's ip's are usedssh-key-fileLocal file name to store a generated SSH key in. File is added to the ~/.ssh directoryhostnameUse this in combination with the set-hostname sub command to set the remote hostname(s)ssh-prefixWhen generating SSH shorthand for Raspberry pi's use this prefix with the last numbers of the ipdefault-hostnameUse this as a value when checking if a Raspberry pi's hostname is changedhelp,hShow this help text
For instance to use my-user as a username when logging into a Raspberry pi you can use $ rpim info --username my-user or $ rpim info -u my-user. To provide rpim with multiple ip's you can repeat the --ip flag like so $ rpim setup-ssh --ip 192.168.0.1 --ip 192.168.0.2
Use
This NPM module is meant to be used as a globally installed module
$ npm i -g rpimor through npx to run specific sub commands
$ npx rpim ls