Zerotier Central CLI
Command Line Interface to my.zerotier.com
Still experimenting with the commands/outputs.
Install
npm i -g @laduke/zerotier-central-cli
examples
ztc conf:setup
(so you don't have to put your api token every time)
ztc network:list
ztc member:list 6ab565387a82c205 --filter=online=true --sort=creation-time --columns="node-id,name,ip-assignments"
ztc member:get 6ab565387a82c205 2244668800 --columns=6plane --no-header
save and restore network config and their network member config
ztc network:save 8056c2e21cdfd0a6 -j > 8056c2e21cdfd0a6.json
-
ztc network:create
-> empty network with random ID (1d71939404d798d7) ztc network:restore 1d71939404d798d7 < 8056c2e21cdfd0a6.json
Usage
autogenerated from oclif-dev
$ npm install -g @laduke/zerotier-central-cli
$ ztc COMMAND
running command...
$ ztc (-v|--version|version)
@laduke/zerotier-central-cli/0.0.21 darwin-x64 node-v12.19.0
$ ztc --help [COMMAND]
USAGE
$ ztc COMMAND
...
Commands
ztc autocomplete:install
ztc autocomplete:uninstall
ztc conf:clear
ztc conf:delete
ztc conf:get
ztc conf:set
ztc conf:setup
ztc help [COMMAND]
ztc member:delete NETWORKID NODEID
ztc member:get NETWORKID NODEID
ztc member:hosts NETWORKID
ztc member:list NETWORKID
ztc member:set NETWORKID NODEID
ztc network:create
ztc network:delete NETWORKID
ztc network:get NETWORKID
ztc network:list
ztc network:restore NETWORKID
ztc network:save NETWORKID
ztc network:set NETWORKID
ztc pool:add NETWORKID START END
ztc pool:list NETWORKID
ztc route:list NETWORKID
ztc status
ztc autocomplete:install
setup autocomplete
USAGE
$ ztc autocomplete:install
See code: src/commands/autocomplete/install.js
ztc autocomplete:uninstall
setup autocomplete
USAGE
$ ztc autocomplete:uninstall
See code: src/commands/autocomplete/uninstall.js
ztc conf:clear
clear all config
USAGE
$ ztc conf:clear
See code: src/commands/conf/clear.js
ztc conf:delete
delete key from config
USAGE
$ ztc conf:delete
OPTIONS
--api-base
--memberIds
--networkIds
--token
See code: src/commands/conf/delete.js
ztc conf:get
print saved config
USAGE
$ ztc conf:get
OPTIONS
--api-base
--memberIds
--networkIds
--token
See code: src/commands/conf/get.js
ztc conf:set
save config
USAGE
$ ztc conf:set
OPTIONS
--api-base=api-base save base url (https://my.zerotier.com/api/)
--token=token save central api token
See code: src/commands/conf/set.js
ztc conf:setup
save your api token interactively.
USAGE
$ ztc conf:setup
See code: src/commands/conf/setup.js
ztc help [COMMAND]
display help for ztc
USAGE
$ ztc help [COMMAND]
ARGUMENTS
COMMAND command to show help for
OPTIONS
--all see all commands in CLI
See code: @oclif/plugin-help
ztc member:delete NETWORKID NODEID
Delete a Member from a Network
USAGE
$ ztc member:delete NETWORKID NODEID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--[no-]activeBridge
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--[no-]authorized
--csv output is csv format
--description=description
--filter=filter filter property by partial string matching, ex: name=foo
--[no-]hidden
--name=name
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--[no-]noAutoAssignIps
--sort=sort
See code: src/commands/member/delete.js
ztc member:get NETWORKID NODEID
get one member
USAGE
$ ztc member:get NETWORKID NODEID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/member/get.js
ztc member:hosts NETWORKID
make a hosts file for a network
USAGE
$ ztc member:hosts NETWORKID
OPTIONS
--filter=filter filter property by partial string matching, ex: name=foo
--[no-]ip4 include managed ipv4 address
--[no-]ip6managed include managed v6 address
--[no-]ip6plane include 6PLANE address
--[no-]ip6prefix include rfc4193 address
--sort=sort
--tld=tld last part of the name. for example '.lan'
See code: src/commands/member/hosts.js
ztc member:list NETWORKID
list members of network
USAGE
$ ztc member:list NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/member/list.js
ztc member:set NETWORKID NODEID
change config
USAGE
$ ztc member:set NETWORKID NODEID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--[no-]activeBridge
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--[no-]authorized
--csv output is csv format
--description=description
--filter=filter filter property by partial string matching, ex: name=foo
--[no-]hidden
--name=name
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--[no-]noAutoAssignIps
--sort=sort
See code: src/commands/member/set.js
ztc network:create
change config
USAGE
$ ztc network:create
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-n, --dry-run
-t, --token=token my.zerotier.com api access token
--[no-]6plane
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--description=description
--[no-]enableBroadcast
--filter=filter filter property by partial string matching, ex: name=foo
--ipAssignmentPools=ipAssignmentPools <rangeStart>-<rangeEnd> overwrites existing
--mtu=mtu
--multicastLimit=multicastLimit
--name=name
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--[no-]private
--[no-]rfc4193
--routes=routes <target>[-via] overwrites existing. Can specify multiple
--sort=sort
--[no-]v4AutoAssign
--[no-]v6AutoAssign
See code: src/commands/network/create.js
ztc network:delete NETWORKID
delete a network
USAGE
$ ztc network:delete NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-n, --dry-run
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/network/delete.js
ztc network:get NETWORKID
get one network
USAGE
$ ztc network:get NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/network/get.js
ztc network:list
list your networks
USAGE
$ ztc network:list
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/network/list.js
ztc network:restore NETWORKID
Dump network and it's savedMembers
USAGE
$ ztc network:restore NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/network/restore.js
ztc network:save NETWORKID
Dump network and it's members
USAGE
$ ztc network:save NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/network/save.js
ztc network:set NETWORKID
change config
USAGE
$ ztc network:set NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-n, --dry-run
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--description=description
--[no-]enableBroadcast
--filter=filter filter property by partial string matching, ex: name=foo
--[no-]ip6plane
--[no-]ip6prefix
--ipAssignmentPools=ipAssignmentPools <rangeStart>-<rangeEnd> overwrites existing
--mtu=mtu
--multicastLimit=multicastLimit
--name=name
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--[no-]private
--routes=routes <target>[-via] overwrites existing. Can specify multiple
--sort=sort
--[no-]v4AutoAssign
--[no-]v6AutoAssign
See code: src/commands/network/set.js
ztc pool:add NETWORKID START END
add an ip auto-assign pool to a network
USAGE
$ ztc pool:add NETWORKID START END
ARGUMENTS
NETWORKID
START IP address
END IP address
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/pool/add.js
ztc pool:list NETWORKID
list the ip auto-assign pools on a network
USAGE
$ ztc pool:list NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/pool/list.js
ztc route:list NETWORKID
list the managed routes on a network
USAGE
$ ztc route:list NETWORKID
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
See code: src/commands/route/list.js
ztc status
my.zerotier.com status
USAGE
$ ztc status
OPTIONS
-c, --columns=columns
-e, --extended extended output
-j, --json output raw json
-t, --token=token my.zerotier.com api access token
--api-base=api-base use a different central instance my-dev.zerotier.com/api
--csv output is csv format
--filter=filter filter property by partial string matching, ex: name=foo
--no-header hide table header from output
--no-truncate do not truncate output to fit screen
--sort=sort
DESCRIPTION
not much here
See code: src/commands/status.js