How to generate a large number of accounts via hw wallet and save addresses to file? I work in a company which uses a ledger blue hw wallet.  They need to generate bitcoin and eth accounts to send to users to deposit to.  Currently they have people generating one account at a time in ledger, copy the address, paste the address into our system.  We need thousands of addresses (whilst keeping the private keys safe on hw wallets) so this takes hundreds of hours.

I was surprised that neither trezor nor ledger blue have an app or utility which will spit out a CSV of accounts on the attached PC, keeping the private keys on the device.

Has anyone found such an app?

Ledger blue seems to have no api, but trezor does. Has anyone found a way to do something like this through the trezor api?

We could easily write a program to generate thousands of wallets, and run it on a new pc which was never connected to the net, but this won’t allow us to use the hw wallet to keep the private keys unfortunately.
Your best bet would be to export the xpub key for each account from your ledger. Once you have that, generating new addresses can be automated via any number of bitcoin libraries, such as bitcoinjs-lib. Similar options exist for ethereum.

I'm not entirely sure if they have a straighforward way to export the xpub, but I recall seeing it in the ledger live logs at some point. You can either use that, or connect to a wallet such as Electrum, which would export it for you.