raspi-config CLI can be used also headless with a lot of utilities for bash scripting.
This thread explain in more details.
Is a PI4 ? Run
raspi-config nonint is_pifour to know
Working with Picamera
# enable picamera
In general values are
1 to set
off. Follow a list of possible commands
raspi-config nonint get_can_expand
vcgencmd CLI tool is good to knonw
vcgencmd commands list the available commands
Get the board temperature with
To get the allocated GPU use
vcgencmd get_mem gpu | cut -d = -f 2 | cut -d M -f 1