How to use code to access libcamera(C++/Python)

Hi, MichRX7

You can set autofocus like the code below.

cam.set(libcamera.AfTrigger, 1)

Screenshot from 2021-11-05 09-39-38

Also, all control options can be found in the document linked below.
libcamera Controls