0.0.21 • Published 3 years ago

@laduke/zerotier-central-cli v0.0.21

Weekly downloads
24
License
MIT
Repository
github
Last release
3 years ago

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

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

0.0.21

3 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.16

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago