clix icon indicating copy to clipboard operation
clix copied to clipboard

proposal: new architecture

Open tony-go opened this issue 3 years ago • 3 comments

Context

Clix development is stuck at this point. Issue #16 is still a blocker as simulating keystrokes within Node.js processes doesn't seem possible (https://github.com/nodejs/node/issues/43137).

In hindsight, we probably didn't adopt the right approach.

Now I know that what We try to accomplish is to simulate the execution of the CLI program in a terminal: writing scenarios that will simulate user actions on the terminal.

Proposal

Spawn a headless terminal instead of spawning a simple process.

xterm-headless is probably a good candidate for a first POC.

I'll continue to browse the web looking for new candidates.

tony-go avatar Aug 11 '22 14:08 tony-go

Alternatives: https://github.com/vercel/hyper

tony-go avatar Aug 19 '22 07:08 tony-go

https://github.com/microsoft/node-pty

tony-go avatar Dec 09 '22 20:12 tony-go

A first good step should be to take a look at https://github.com/microsoft/node-pty, for example, and see if it's easy to spawn a command within and get the result programmatically.

tony-go avatar Dec 09 '22 20:12 tony-go