If you want to control Kameleo from code this is what you are looking for.
Once the browser is started for the profile you can control it through the W3C WebDriver protocol by simply calling Selenium command from your code. And websites won't notice the presence of WebDriver. See the above packages' README files for examples. (There is a workaround for Puppeteer as well, but the recommended solution is using Selenium)