I am using the following command to get list of nodes in a particular environment.
knife node list -e env1
How can I modify knife command to also include the run list items within it?
You wouldn't use knife node list
for this. Most knife commands are very direct wrappers for their underlying REST API calls. If you want to build a script for displaying in a particular format, you probably want to use knife exec
or skip knife entirely and use something like the chef-api
gem or PyChef
Python library.