Command-Line Interface for FlexiHub DevKit

The FlexiHub DevKit library comes with a command-line utility for controlling the FlexiHub service: listing the devices on different computers, connecting/disconnecting, sending connection invites, etc.

Usage

fhcld [COMMAND] [OPTIONS...]

Available Commands

Run help COMMAND to get detailed help on a specific command.

ID_DEVICE

All commands that perform actions on devices require ID_DEVICE – a two-part argument of the form {ID_COMP}-{IDx} that uniquely identifies the device and the computer that hosts it. Here:

  • ID_COMP is the ID of the computer;
  • IDx is the real ID of the device or the hash thereof.

ID_DEVICE can be determined by running the show-local, show-remote or show-invite commands and checking the value in their output’s leftmost column. For instance, for show-local you may get:

41      Local computer: 'my-computer' (3 devices)
        Devices:
41-59       USB-PS/2 Optical Mouse – LOCKED
41-66       USB Multimedia Keyboard – LOCKED
41-ad       USB to Serial

Here:

  • 41 is the ID of the local computer named my-computer;
  • 41-59 – is ID_DEVICE of the mouse attached to the computer, by which you can refer to this device in other commands.

For instance, you could unlock the above device by running:

fhcld unlock-device 41-59

Commands

help

Display help information.

Usage:

fhcld help [COMMAND | --all | --id-device]

If a command is given, display help information on that command; otherwise, list all available commands.

Instead of the command name, one of these options can be used:

  • --all – show help on all commands;
  • --id-device – show help on the ID_DEVICE parameter accepted by some commands.

status

Show the computer status.

Usage:

fhcld status

Show whether the current computer is logged in or requires a login, whether its drivers are okay, or whether there are problems connecting to the FlexiHub service.

Alias: st

license

Show the current subscription type.

Usage:

fhcld license

Show the subscription details, provided that the computer is logged in on the central server.

Alias: lic

login

Log in the computer to an account.

Usage:

fhcld login EMAIL [--reset-all]

Log in with the specified email (the password will be prompted).

If a “maximum number of computers in account” error is returned, the --reset-all option can be supplied to retry the login after force logging out all other computers in the account.

show-local

Show the local computer.

Usage:

fhcld show-local [--no-devices] [--verbose] [--no-invites]

Get information about the local computer and attached devices.

The options are:

  • --no-devices – disable output for the devices;
  • --verbose – enable verbose output for devices info;
  • --no-invites – disable output for the connection invites.

Alias: shl

show-remote

Show the remote computers of the current account.

Usage:

fhcld show-remote [--online] [--offline] [--no-devices] [--verbose] [--no-invites]

Get information about the remote computers of the current account and their devices. (By default, both online and offline computers are shown.)

The options are:

  • --online – show only the computers that are online;
  • --offline – show only the computers that are offline;
  • --no-devices – disable output for the devices on the listed computers;
  • --verbose – enable verbose output for devices info;
  • --no-invites – disable output for the connection invites.

Alias: shr

show-invite

Show the connection invites from other accounts.

Usage:

fhcld show-invite [--online] [--offline] [--no-devices] [--verbose]

Show information about the computers and devices in other accounts available to the current account via connection invites.

By default, all available invites are shown, for both online and offline computers and/or devices.

The options are:

  • --online – show only the computers and devices that are online;
  • --offline – show only the computers and devices that are offline;
  • --no-devices – disable output for the devices on the listed computers;
  • --verbose – enable verbose output for devices info.

Alias: shi

set-comp-name

Rename a computer.

Usage:

fhcld set-comp-name ID_COMP NAME

Assign the specified name to the computer with a given ID.

ID_COMP can be retrieved by running show-local or show-remote; for the local computer, the value of local is also accepted.

NAME should be double-quoted if it contains spaces.

Alias: scn

logout

Log out a computer from the account.

Usage:

fhcld logout ID_COMP

Log out the specified computer (local or remote) from the account.

ID_COMP can be retrieved by running show-local or show-remote; for the local computer, the value of local is also accepted.

connect-device

Connect a remote device.

Usage:

fhcld connect-device ID_DEVICE [--compression=VALUE] [--auto-reconnect|--no-auto-reconnect]

Connect to a remote device, either hosted on a remote computer in the current account, or available to the current account via an accepted connection invite.

The value of ID_DEVICE can be retrieved by running show-remote or show-invite.

The --compression option takes the following values:

  • bestspeed;
  • bestsize;
  • no.

If --compression is omitted, the default value is used (see default-connect-parameters).

Alias: cond

disconnect-device

Disconnect a device.

Usage:

fhcld disconnect-device ID_DEVICE

Disconnect a connected device (local or remote).

The value of ID_DEVICE can be retrieved by running show-local for local devices and show-remote or show-invite for remote devices.

Alias: disd

default-connect-parameters

Show or set the default connection parameters.

Usage:

fhcld default-connect-parameters [--compression=VALUE] [--auto-reconnect|--no-auto-reconnect]

With no options, show the current connection parameters. Otherwise, set the parameters specified.

The --compression option takes the following values:

  • bestspeed;
  • bestsize;
  • no.

Alias: dcp

set-device-description

Set a description for a local device.

Usage:

fhcld set-device-description ID_DEVICE DESCRIPTION

Set a user-defined description for the local device with a given ID.

The value of ID_DEVICE can be retrieved by running show-local.

DESCRIPTION should be double-quoted if it contains spaces.

Alias: sdd

clear-device-description

Clear the description for a local device.

Usage:

fhcld clear-device-description ID_DEVICE

Clear the user-defined description for the local device with a given ID.

The value of ID_DEVICE can be retrieved by running show-local.

Alias: cdd

lock-device

Lock a local device.

Usage:

fhcld lock-device ID_DEVICE

Lock the local device with a given ID.

The value of ID_DEVICE can be retrieved by running show-local.

Alias: ld

unlock-device

Unlock a local device.

Usage:

fhcld unlock-device ID_DEVICE

Unlock the local device with a given ID.

The value of ID_DEVICE can be retrieved by running show-local.

Alias: ud

set-comport-name

Set a name for a remote serial port.

Usage:

fhcld set-comport-name ID_DEVICE NAME

Set a custom name for the remote serial port with a given ID.

This name will be assigned to a local virtual serial port created after connecting to a remote device. If no custom name is set, the original name of the remote serial port is used.

The value of ID_DEVICE can be retrieved by running show-remote or show-invite.

NAME is a string of the form COMn (COM1, COM23, etc.).

Alias: spn

clear-comport-name

Clear the name for a remote serial port.

Usage:

fhcld clear-comport-name ID_DEVICE

Clear the custom name for the remote serial port with a given ID.

The value of ID_DEVICE can be retrieved by running show-remote or show-invite.

Alias: cpn

get-proxy-settings

Get the current proxy settings.

Usage:

fhcld get-proxy-settings

Alias: gpx

set-proxy-settings

Set the new proxy settings.

Usage:

fhcld set-proxy-settings [--enable|--disable] [--host=HOST] [--port=PORT] [--type=TYPE] [--auth|--no-auth] [--user=USER] [--passwd=PASSWORD]

Alias: spx

change-existing-connection-params

Change the existing connection parameters.

Usage:

fhcld change-existing-connection-params ID_DEVICE --compression=VALUE

Change the connection parameters for an established connection.

The value of ID_DEVICE can be retrieved by running show-local, show-remote or show-invite.

The --compression option takes the following values:

  • bestspeed;
  • bestsize;
  • no.

Alias: ccp

forget-connection

Forget a connection.

Usage:

fhcld forget-connection ID_DEVICE

Forget about an offline device and no longer try to reconnect to it.

The value of ID_DEVICE can be retrieved by running show-remote or show-invite.

Alias: fc

send-invite

Send a connection invite.

Usage:

fhcld send-invite ID_DEVICE EMAIL

Allow the computers of the account associated with EMAIL to connect to the specified device.

The value of ID_DEVICE can be retrieved by running show-local or show-remote.

Alias: sendi

accept-invite

Accept a connection invite.

Usage:

fhcld accept-invite ID_INVITE

Accept an invite from another account.

The value of ID_INVITE can be retrieved by running show-invite.

Alias: acci

delete-invite

Delete a connection invite.

Usage:

fhcld delete-invite ID_INVITE

Delete a connection invite, accepted or not.

The value of ID_INVITE can be retrieved by running show-invite, show-local or show-remote.

Alias: deli

whoami

Show the current account ID.

Usage:

fhcld whoami

version

Show the version of the DevKit library.

Usage:

fhcld version