nycmesh-tool CLI
Features
At the moment, the tool is pretty sparse. It provides the top level nycmesh-tool
command, with subcommands for:
uisp
- Full UISP API CLI
meshapi
- Interact with https://github.com/meshcenter/mesh-api
map
- Open up nodes on a map from the command line
cache
- manipulate a simple on-disk cache for things like API responses, for offline access to inventory
daemon
- launch a daemon to do stuff (current features include:)
--dfs-event-detection
: monitor sectors for DFS events, and notify relevant channels
experiment
- Experimental commands. Here be dragons!
devices
- display fused device data, created by joining UISP data with mesh-api data. Useful for further jq
processing.
watch
logs
- easy interface to watch UISP logs in real(ish) time
Releases
See releases for binary downloads, and ./RELEASE.md for more information.
Builds of Docker images are created for each release, and pushed to byxorna/nycmesh-tool
. byxorna/nycmesh-tool on Docker Hub
Hacking
See ./HACKING.md
Config
By default (--config
) we read .nycmesh-tool.yaml
for global flags for the tool. You could pass these parameters on the CLI, or store them in ~/.nycmesh-tool.yaml
(or .
):
---
uisp:
x-auth-token: xxx # get this from https://uisp.mesh/nms/user/login or scripts/uisp-user-token.sh
hostname: uisp.mesh
scheme: https
skip-verify-tls: false # true needed for self-signed certs
debug: true
# note: the slack key is optional, and only useful if you are running `daemon`
# slack:
# token: "put your bot token here"
UISP API Commands
To test your connection to UISP works:
$ ./bin/nycmesh-tool uisp authorization getUser
{"userId":null,"username":"gabeconradi"}
Or, see how many devices are in the API:
$ ./bin/nycmesh-tool uisp devices getDevices --hostname=uisp.mesh --scheme=https --debug --skip-verify-tls |jq length
1293