Running Higher-Level Analyses (Second and Third Level Analyses) in Scripts (Not GUI), FSL feat

I know how to run the first-level analyses using scripts, but I need assistance with the higher-level analyses using fsl feat.

Could you please guide me on using manually created design matrices and contrasts to perform higher-level analyses through scripts? I found this resource on creating design matrices by hand: GLM/CreatingDesignMatricesByHand - FslWiki.

Additionally, I would like to know how researchers typically handle large datasets for higher-level analyses, especially when the inputs can consist of hundreds of rows. Do people usually modify design.fsf and do feat design.fsf.?

Thank you for your help!