nycmesh-tool CLI
At the moment, the tool is pretty sparse. It provides the top level nycmesh-tool
command, with subcommands for:
uisp
- Full UISP API CLImeshapi
- Interact with https://github.com/meshcenter/mesh-api
node
- Display nodes from https://api.nycmesh.net/v1/nodesdevice
- Display devices from https://api.nycmesh.net/v1/nodesmap
- Open up nodes on a map from the command linecache
- manipulate a simple on-disk cache for things like API responses, for offline access to inventorydaemon
- launch a daemon to do stuff (current features include:)
--dfs-event-detection
: monitor sectors for DFS events, and notify relevant channelsexperiment
- 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) timeSee 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
See ./HACKING.md
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"
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