cencli brings the authority of internet intelligence to your terminal. Analyze assets, perform queries, and hunt threats, all from the command line.
The Censys CLI is available for free and paid users of the Censys Platform, with support for macOS, Linux, and Windows.
Make sure you have cencli installed and it is on your $PATH.
-
Run this command and follow the prompts to add your Censys Platform personal access token:
$ censys config auth add
-
(Optional) Run this command and follow the prompts to add your Censys Platform organization ID:
$ censys config org-id add
-
That's it! You can now perform asset lookups, searches, and more with the
censyscommand.$ censys view 8.8.8.8
This section describes how to get cencli on your system.
macOS and Linux users can install cencli using Homebrew:
$ brew install censys/tap/cencliAt the end of the installation process, zsh and bash completion scripts will be automatically generated and linked to your shell environment.
Warning
Do NOT try to run brew install censys. This is a legacy formula that is no longer maintained and in no way affiliated with cencli.
For Windows users (and those who prefer not to use Homebrew), you will need to use different methods, which are described below.
Stable binaries for different platforms (macOS/Linux/Windows) and architectures (amd64/arm64) are available for download on the releases page. After you've downloaded and extracted the binary, make sure you add it to your $PATH.
Warning
For macOS users, your system may complain about the executable being untrusted after you try to run it. To bypass this, you can run xattr -dr com.apple.quarantine /path/to/binary to remove the quarantine flag. If you prefer to do this through the GUI, go to Settings > Privacy & Security and allow the executable to be run.
If you have Go 1.25+ installed, you can install cencli using the following command:
$ go install github.com/censys/cencli/cmd/cencli@latest
# make sure to rename the executable to 'censys'
$ mv "$(go env GOPATH)/bin/cencli" "$(go env GOPATH)/bin/censys"Ensure you have Go 1.25+ installed, and run the following commands:
$ git clone https://github.com/censys/cencli.git
$ cd cencli
$ make censys # builds the executable to ./bin/censys
$ export PATH=$PATH:$(pwd)/bin
$ censys --helpcencli supports various commands for accessing our platform. Run censys --help to see all available commands.
The config command allows you to manage your personal access tokens and organization IDs. See the config command docs for more details.
The view command allows you to fetch information about a particular host, certificate, or web property asset at a particular point in time. See the view command docs for more details.
You can also use the --short flag to render output using templates, which can be customized. See the templating documentation for more details.
The search command allows you to perform Censys Platform searches, either globally or within a collection. See the search command docs for more details.
The aggregate command allows you to perform aggregate queries, either globally or within a collection. See the aggregate command docs for more details.
The censeye command allows you to perform a Censeye scan on a host. See the censeye command docs for more details.
This is a WIP. See the history command docs for more details.
$ censys completion <bash|zsh|fish|powershell>: generates shell completion scripts$ censys version: prints version information
This project is licensed under the Apache License 2.0.




