Skip to main content
CLI Commands

cnquery shell

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 query packs, letting you quickly iterate and see results as you type.

cnquery shell local

You can also connect to remote targets:

cnquery shell ssh user@HOST

Options

  -c, --command string         MQL query to execute in the shell
  -h, --help                   help for shell
      --platform-id string     Select a specific target asset by providing its platform ID
      --sudo                   Elevate privileges with sudo

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 output

SEE ALSO

On this page