ns1cli is a both a command line program and REPL for accessing NS1, the Data Driven DNS platform.
$ ns1 -h
Usage: ns1 help [OPTIONS] COMMAND [ARGS]...
If no command is specified, the NS1 console is opened to accept
interactive commands.
Options:
-c, --config_path PATH Use the specified config file
-k, --key TEXT Use the specified API Key
-e, --endpoint TEXT Use the specified server endpoint
--transport [basic|requests] Client transport
--ignore-ssl-errors Ignore SSL certificate errors
-h, --help Show this message and exit.
Commands:
config view and modify local configuration settings
data view and modify data sources/feeds
help displays help for a sequence of commands
monitor view monitoring jobs
record view and modify records in a zone
stats view usage/qps on zones and records
zone view and modify zone SOA data
See ns1 help <command>
for more information on a specific command.
$ ns1
will start the REPL
From Pypi:
$ pip install ns1cli
To enable autocomplete from the command-line:
$ eval "$(_NS1_COMPLETE=source ns1)"
Local Development:
$ cd <ns1cli directory>
$ pip install --editable .
ns1cli uses the NS1 python client to communicate with the NS1 API.
ns1cli will by default attempt to load a configuration file from $HOME/.nsone
.
- The configuration object used comes from the underlying NS1 python client.
-
REPL
- Autocomplete commands
-
Search
- Autocomplete ZONE/DOMAIN/TYPE arguments.
-
Zones
- Create secondary zones
- Create zone from importing zonefile
- Missing create zone attributes:
- networks
- secondary attrs(primary ip, primary_port)
-
Record
-
Update/Set record level attributes(TTL, RETRY, etc)
-
Answers
- implement
ns1 record answer remove
- implement
-