pi-connect

command module
v0.0.0-...-2143914 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2022 License: MIT Imports: 1 Imported by: 0

README

🥧 Pi-connect

Connect to your Pi without mDNS

This module is built for connection to your raspberry pi without using mDNS. This is useful in cases where

  1. You are setting up your pi in headless mode.
  2. The IP address of your raspberry pi changes constantly.
  3. Broadcasts do not work reliably on your network for mDNS.
  4. Finding your pi's IP is time-consuming (No access to router / large subnet).

⚡ Quick start

Install
go install github.com/andylolu2/pi-connect
Usage
Set environment variables
Option 1:

Add MONGODB_URI=value to .env file.

echo 'MONGODB_URI=mongodb+srv://<connection_str>' >> .env
Option 2:

Set MONGODB_URI directly.

export MONGODB_URI='mongodb+srv://<connection_str>'
Option 3

Pass MONGODB_URI to command.

MONGODB_URI='mongodb+srv://<connection_str>' pi-connect postip
Help
pi-connect -h
# Posts and gets the ip address of the hosts to mongodb. Can be used to find the local ip address of raspberry pi in headless setup.

# Usage:
#   pi-connect [flags]
#   pi-connect [command]

# Available Commands:
#   completion  Generate the autocompletion script for the specified shell
#   getip       Get the specified host machine's ip address from a mongodb document.
#   help        Help about any command
#   postip      Post the host machine's ip address to a mongodb document.
#   ssh         Start ssh session to the specified host machine's name.

# Flags:
#   -h, --help   help for pi-connect

# Use "pi-connect [command] --help" for more information about a command.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL