qbee-cli is a client library and a command line tool used to interact with qbee.io IoT/Linux device management platform.
Open the releases page, scroll down to Assets and download the latest version for your platform.
NOTE: The binary is not signed, so you might need to allow it to run in your system settings. For Windows, you need to add ".exe" to the binary name.
go build -o qbee-cli ./cmd
Currently, the only way to provide credentials is through environmental variables: QBEE_EMAIL
& QBEE_PASSWORD
.
If your account is configured with two-factor authentication, you will either be prompted for which of your configured
2FA providers you want to use, or you can set the QBEE_2FA_CODE
environment variable to provide a code for the
Google provider directly.
Please remember to rotate your credentials regularly.
go run go.qbee.io/client/cmd@latest
export QBEE_EMAIL=<email>
export QBEE_PASSWORD=<password>
qbee-cli connect -d <deviceID> -t <target>[,<target> ...]
Where:
deviceID
identifies to which device we want to connect (public key digest)target
defines a singe port forwarding target as[<localHost>:]<localPort>:<remoteHost>:<remotePort>
localHost
is optional and defaults to localhost to only listen on the loopback interfacelocalPort
is the local port on which tunnel will listen for connections/packetsremoteHost
must be set to localhostremotePort
is the remote port on which tunnel will connect to on the device
package demo
import (
"context"
"log"
"os"
"go.qbee.io/client"
)
func main() {
cli := client.New()
ctx := context.Background()
email := os.Getenv("QBEE_EMAIL")
password := os.Getenv("QBEE_PASSWORD")
if err := cli.Authenticate(ctx, email, password); err != nil {
log.Fatalf("authentication failed: %v", err)
}
}
We welcome contributions to this project! Please see Contribution License Agreement for more information.