How to generate confounds timeseries .json and .tsv using fmriprep compcor?

Basically I have a nifti BOLD volume and I would like to generate confounds timeseries .json and .tsv using fmriprep compcor so that I get the understanding of how compcor package is working and I wouldn’t have to run whole fmriprep. I was referring to fmriprep.workflows.bold.confounds — fmriprep version documentation but I am not sure how it works? I tried implementing compcor from this document Neuroimaging in Python - Pipelines and Interfaces — nipy pipeline and interfaces package (nipype.readthedocs.io) but it generated empty components tsv May I please get some guidance or reference on compcor fmriprep?
Thank You