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

**URL:** <https://forum.dfinity.org/t/is-there-an-example-of-using-the-javascript-agent-from-a-cli/19490>\
**Category:** Developers\
**Created:** [April 18, 2023, 1:14am UTC](https://forum.dfinity.org/t/is-there-an-example-of-using-the-javascript-agent-from-a-cli/19490 "2023-04-18T01:14:56Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [April 18, 2023, 7:01am UTC](https://forum.dfinity.org/t/is-there-an-example-of-using-the-javascript-agent-from-a-cli/19490/3 "2023-04-18T07:01:08Z")

</div>

Not sure exactly neither what you are looking for neither.

In Juno got plenty of NodeJS scripts 👉 [https://github.com/buildwithjuno/juno/tree/main/scripts](https://github.com/buildwithjuno/juno/tree/main/scripts)

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

Which I implemented in that script utils 👉 [https://github.com/buildwithjuno/juno/blob/9bb589e98ba04997d734cacb94e47d5ea18c8b80/scripts/identity.utils.mjs#L32](https://github.com/buildwithjuno/juno/blob/9bb589e98ba04997d734cacb94e47d5ea18c8b80/scripts/identity.utils.mjs#L32)

---

_[View the full topic](https://forum.dfinity.org/t/is-there-an-example-of-using-the-javascript-agent-from-a-cli/19490)._
