Automating installation of browser applications via shell scripts

I am working on a shell script to configure a macos with a specific set of applications and settings and I want to be able to include brave browser applications. Is there a way to do this autonomously via shell, or some other way? Any help would be appreciated.

Are you making the script to be able to install the browser anywhere you want because I’ve been kind of doing the same thing but I using a more file direct method but but it kind of paid off but not in the way I thought it would. Try to find this post I made here’s the title

“Doing Research on installing the browser to alternative directory path”

if I try to put a link it’ll try to connect the two topics together and I don’t want that to happen that’s why I deleted the first one