Command line input / output


#1

Hello there,

I need to write an electron program that is suppose to run in a CLI. How do I implement that? Especially the input / output part?

Thank you.


#2

The main process has everything to offer that Node.js has to offer, especially in term of I/O.
For instance, electron’s process API being an extension of Node’s process API, you’ll be able to use argv and standard i/o (stdin, stdout, stderr…), as well as convenient npm modules that uses these APIs (commander.js, etc.).


#3

Thank you @alexstrat. I will look into this.