CLI Commands
cnspec login
Register cnspec with Mondoo Platform using a registration token.
Log in to Mondoo Platform so that cnspec can report scan results, use platform-managed policies, and access other Mondoo features. Pass a registration token using the --token flag. You can generate a new registration token in the Mondoo Console under Space > Settings > Registration Token.
You remain logged in until you explicitly log out using the logout subcommand.
To learn more, read Registration.
cnspec login --token YOUR_REGISTRATION_TOKENTo register and set up scheduled scanning at the same time:
cnspec login --token YOUR_REGISTRATION_TOKEN --timer 30 --splay 5Options
--annotation stringToString Set the client annotations (default [])
--api-endpoint string Set the Mondoo API endpoint
-h, --help help for login
--name string Set asset name
--providers-url string Set the providers URL
--splay int Randomize the timer by up to this many minutes
--timer int Set the scan interval in minutes
-t, --token string Set a client registration tokenOptions inherited from parent commands
--api-proxy string Set the proxy for communications with Mondoo Platform API
--auto-update Enable automatic provider installation and update (default true)
--config string Set config file path (default $HOME/.config/mondoo/mondoo.yml)
--log-level string Set the log level: error, warn, info, debug, trace (default "info")
-v, --verbose Enable verbose outputSEE ALSO
- cnspec - cnspec CLI