CLI Commands
cnspec shell
Open an interactive MQL query shell to explore and test queries against assets.
Open an interactive MQL shell to explore and test queries against a target asset in real time. This is useful for developing and debugging queries before using them in policies, letting you quickly iterate and see results as you type.
cnspec shell localYou can also connect to remote targets:
cnspec shell ssh user@HOSTcnspec shell [flags]Options
-c, --command string MQL query to execute in the shell
--discover strings Enable the discovery of nested assets. Supports: all, auto, container, container-images
-h, --help help for shell
--platform-id string Select a specific target asset by providing its platform ID
--record string Record all resource calls and use resources in the recording
--sudo Elevate privileges with sudo
--use-recording string Use a recording to inject resource data (read-only)Options 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