# Run P5 from the command line?

**URL:** <https://discourse.processing.org/t/run-p5-from-the-command-line/11641>\
**Category:** p5.js\
**Created:** [May 27, 2019, 8:22pm UTC](https://discourse.processing.org/t/run-p5-from-the-command-line/11641 "2019-05-27T20:22:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lfb](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@lfb](https://discourse.processing.org/u/lfb)\
**Post date:** [May 27, 2019, 8:22pm UTC](https://discourse.processing.org/t/run-p5-from-the-command-line/11641/1 "2019-05-27T20:22:12Z")

</div>

Hello friends. First post. I’d like to create sketches that take hours to produce an image that can then be written out to an image file. I’d like to run this from the command line and let it run overnight. How? I can run a javascript file from the command line with

```auto
node *filename.js*

```

But P5 requires libraries etc. Not sure if this is possible. Help?

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [June 1, 2019, 4:25pm UTC](https://discourse.processing.org/t/run-p5-from-the-command-line/11641/2 "2019-06-01T16:25:21Z")

</div>

Were you able to resolve this? Possibly relevant:

[https://github.com/processing/p5.js/wiki/p5.js,-node.js,-socket.io](https://github.com/processing/p5.js/wiki/p5.js,-node.js,-socket.io)

---

<div class="post-metadata">

**Author:** ![lfb](https://avatars.discourse-cdn.com/v4/letter/l/bc79bd/32.png) [@lfb](https://discourse.processing.org/u/lfb)\
**Post date:** [June 2, 2019, 7:37pm UTC](https://discourse.processing.org/t/run-p5-from-the-command-line/11641/3 "2019-06-02T19:37:26Z")

</div>

Yes, thanks. I’ve decided to get over my hesitation about Java and just write my sketches in Processing. Much easier to make the animations I have in mind, writing out long sequences of images, etc.
