rpim
v1.0.4
Published
Automation library for easy setup and managing of Raspberry Pi's in the local network
Downloads
2
Maintainers
Readme
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:
ls
List 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.shutdown
Shuts down the Raspberry piinfo
Show detailed information about Raspberry pi'ssetup-ssh
Configures the local machine and Raspberry pi's so that this machine has password-less SSH accessssh-config
Display the SSH configuration that is used by this machineconfigure
Set's up a Raspberry pi with a specified intention, kiosk mode or otherlog
Display the management log from the Raspberry piping
Perform a mass ping to update the arp cache. This may help when Raspberry pi's can't be foundreset
Resets all configurations done by rpim (local SSH configurations done by rpim and remote authorized keys)set-hostname
Sets the remote hostname(s)
Flags
You can provide rpim with information by providing flags. The available flags are:
verbose
,v
Show verbose feedback and debug datausername
,u
Username to use when logging in to a Raspberry piip
Select this ip (or ip's) to perform a sub command on. If not set all found Raspberry pi's ip's are usedssh-key-file
Local file name to store a generated SSH key in. File is added to the ~/.ssh directoryhostname
Use this in combination with the set-hostname sub command to set the remote hostname(s)ssh-prefix
When generating SSH shorthand for Raspberry pi's use this prefix with the last numbers of the ipdefault-hostname
Use this as a value when checking if a Raspberry pi's hostname is changedhelp
,h
Show 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 rpim
or through npx to run specific sub commands
$ npx rpim ls