@hardenize/cli
Hardenize CLI Tool
Last updated 2 months ago by mikehardenize .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @hardenize/cli 
SYNC missed versions from official npm registry.

Hardenize CLI Tool

This tool provides easy access to the Hardenize API.

Install

$ sudo npm i -g @hardenize/cli

Or:

$ git clone https://github.com/hardenize/hardenize-cli
$ cd hardenize-cli
$ sudo npm i -g

Updating

To see if there is a newer version (no output means you are):

$ sudo npm outdated -g @hardenize/cli

To upgrade to the latest version if you're not:

$ sudo npm i -g @hardenize/cli

Usage

Run without arguments or with help/--help/-h to see the list of options:

$ hardenize help
hardenize <command>

Commands:
  hardenize bash                      Show bash auto-completion script
  hardenize certs <command>           Manage certificates
  hardenize config <command>          Manage configuration at Hardenize
  hardenize dns-zones <command>       Manage dns zones
  hardenize events <command>          Manage events
  hardenize groups <command>          Manage groups
  hardenize hdb <command>             Search HDB
  hardenize hosts <command>           Manage hosts
  hardenize local_config <command>    Manage local configuration
  hardenize network-ranges <command>  Manage network ranges
  hardenize reports0 <command>        Manage reports (unstable)
  hardenize suborgs <command>         Manage organizations
  hardenize users <command>           Manage users

Options:
  --version     Show version number                                    [boolean]
  --config, -c  Path to configuration file
                                   [string] [default: "/home/picard/.hardenize"]
  --org         Organization (falls back to config default_org)         [string]
  --format      Output format (falls back to config "default_format", otherwise
                "table")
                      [choices: "table", "table-per-row", "yaml", "json", "csv"]
  --debug, -d   Displays debug information about API requests and responses
                                                                       [boolean]
  --help        Show help                                              [boolean]

Find our API documentation at https://www.hardenize.com/docs/api/v1/

You can also get additional help on a per-command basis. E.g:

hardenize certs <command>

Manage certificates

Commands:
  hardenize certs create        Create a certificate. (Reads PEM from stdin)
  hardenize certs get <sha256>  Get a certificate
  hardenize certs ls [host]     List certificates

Options:
  --version     Show version number                                     [boolean]
  --config, -c  Path to configuration file
                                    [string] [default: "/home/picard/.hardenize"]
  --org         Organization (falls back to config default_org)          [string]
  --format      Output format (falls back to config "default_format", otherwise
                "table")                [choices: "table", "yaml", "json", "csv"]
  --debug, -d   Displays debug information about API requests and responses
                                                                        [boolean]
  --help        Show help                                               [boolean]
$ hardenize certs create help
hardenize certs create

Create a certificate. (Reads PEM from stdin)

Options:
  --version     Show version number                                     [boolean]
  --config, -c  Path to configuration file
                                    [string] [default: "/home/picard/.hardenize"]
  --org         Organization (falls back to config default_org)          [string]
  --format      Output format (falls back to config "default_format", otherwise
                "table")                [choices: "table", "yaml", "json", "csv"]
  --debug, -d   Displays debug information about API requests and responses
                                                                        [boolean]
  --help        Show help                                               [boolean]
  --file, -f    Read cert from disk instead of stdin                     [string]

Configuration

Before you can run most commands, you will need to configure your credentials and a few other things by running hardenize local_config init

$ hardenize local_config init
* API Username: your api username
* API Password: your api password
  Default organization: your default org
  Default output format [table]: json
Configuration saved

Details will be saved to ~/.hardenize by default. Unless you specify the --config command line option to indicate a different path.

Many commands take an optional "--org" option. If you do not supply that arg, it will use the configured default org instead, or fail if there is none.

You can override configuration values using environment variables prefixed with HZ_. For example, to override a configuration item named "username", you would set the environment variable HZ_USERNAME

Most command simply display the results as returned from the API. By specifying --format on the command line, you can choose for them to be displayed in either table, table-per-row, yaml, json or csv format. The output defaults to your configs default_format option, or table if that does not exist.

Development

If you are a core developer of this library (you almost certainly aren't, unless you work for Hardenize Limited), you should check out DEVELOPMENT.md

Current Tags

  • 0.42.0                                ...           latest (2 months ago)

76 Versions

  • 0.42.0                                ...           2 months ago
  • 0.41.0                                ...           2 months ago
  • 0.40.0                                ...           2 months ago
  • 0.39.0                                ...           4 months ago
  • 0.38.0                                ...           4 months ago
  • 0.37.0                                ...           5 months ago
  • 0.36.0                                ...           6 months ago
  • 0.35.0                                ...           6 months ago
  • 0.34.0                                ...           6 months ago
  • 0.33.0                                ...           8 months ago
  • 0.32.0                                ...           8 months ago
  • 0.31.0                                ...           a year ago
  • 0.30.0                                ...           a year ago
  • 0.29.0                                ...           a year ago
  • 0.28.0                                ...           a year ago
  • 0.27.0                                ...           a year ago
  • 0.26.0                                ...           a year ago
  • 0.25.0                                ...           a year ago
  • 0.24.0                                ...           a year ago
  • 0.23.0                                ...           a year ago
  • 0.22.0                                ...           a year ago
  • 0.21.0                                ...           a year ago
  • 0.20.0                                ...           2 years ago
  • 0.19.0                                ...           2 years ago
  • 0.18.4                                ...           2 years ago
  • 0.18.3                                ...           2 years ago
  • 0.18.2                                ...           2 years ago
  • 0.18.1                                ...           2 years ago
  • 0.18.0                                ...           2 years ago
  • 0.17.2                                ...           2 years ago
  • 0.17.1                                ...           2 years ago
  • 0.17.0                                ...           2 years ago
  • 0.16.2                                ...           2 years ago
  • 0.16.1                                ...           2 years ago
  • 0.16.0                                ...           2 years ago
  • 0.15.0                                ...           2 years ago
  • 0.14.2                                ...           2 years ago
  • 0.14.1                                ...           2 years ago
  • 0.14.0                                ...           2 years ago
  • 0.13.0                                ...           2 years ago
  • 0.12.0                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.10.1                                ...           2 years ago
  • 0.10.0                                ...           2 years ago
  • 0.9.1                                ...           2 years ago
  • 0.9.0                                ...           2 years ago
  • 0.8.2                                ...           2 years ago
  • 0.8.1                                ...           2 years ago
  • 0.8.0                                ...           2 years ago
  • 0.7.1                                ...           2 years ago
  • 0.7.0                                ...           2 years ago
  • 0.6.1                                ...           2 years ago
  • 0.6.0                                ...           2 years ago
  • 0.5.1                                ...           2 years ago
  • 0.5.0                                ...           2 years ago
  • 0.4.0                                ...           2 years ago
  • 0.3.4                                ...           2 years ago
  • 0.3.3                                ...           2 years ago
  • 0.3.2                                ...           2 years ago
  • 0.3.1                                ...           2 years ago
  • 0.3.0                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.4                                ...           2 years ago
  • 0.1.3                                ...           2 years ago
  • 0.1.2                                ...           2 years ago
  • 0.1.1                                ...           2 years ago
  • 0.1.0                                ...           2 years ago
  • 0.0.9                                ...           2 years ago
  • 0.0.8                                ...           2 years ago
  • 0.0.7                                ...           2 years ago
  • 0.0.6                                ...           2 years ago
  • 0.0.5                                ...           2 years ago
  • 0.0.4                                ...           2 years ago
  • 0.0.3                                ...           2 years ago
  • 0.0.2                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 76
This Month 76
Last Day 76
Last Week 0
Last Month 1
Dependencies (8)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |