CLI Commands
cnspec policy graph context
Show LLM-friendly context with YAML snippets for a policy graph node.
Show LLM-friendly context for a node in the policy graph, including YAML snippets for the node and its neighborhood. Pass the node's UID and the path to the bundle file. Use --depth to control how many hops of neighboring nodes to include.
cnspec policy graph context NODE_UID my-policy.mql.yamlInclude a larger neighborhood by increasing the depth:
cnspec policy graph context NODE_UID my-policy.mql.yaml --depth 3Options
--depth int Neighborhood depth (hops) (default 2)
-h, --help help for contextOptions 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")
--logging-config string Path to a logging configuration file (YAML or JSON) that selects the log writer, level, and writer-specific options
-v, --verbose Enable verbose outputSEE ALSO
- cnspec policy graph - Navigate policy bundle structure via graph commands