Is there an example of using the JavaScript agent from a CLI?

Not sure exactly neither what you are looking for neither.

In Juno got plenty of NodeJS scripts :point_right: https://github.com/buildwithjuno/juno/tree/main/scripts

To load the identity from the pem file of dfx I use the solution of @ZenVoich :point_right: https://forum.dfinity.org/t/using-dfinity-agent-in-node-js/6169/60?u=peterparker

Which I implemented in that script utils :point_right: https://github.com/buildwithjuno/juno/blob/9bb589e98ba04997d734cacb94e47d5ea18c8b80/scripts/identity.utils.mjs#L32

2 Likes