onepub-dev / onepub-dev/dcli

Provide direct access to stdin/stderr/stdout from Process

Open
#31 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
265
Forks
30
PR merge metrics
No merged PRs in 30d

Description

To implement some low level commands we will need direct access to stdin/stdout/stderr.

Need to be able to implement commands like tee.

// tee
main(List<String> args)
one = args[0];
two = args[1];

pOne = one.process;
pTwo = two.process;

pipe(stdin, pOne.stdin);
pipe(stdin, pTwo.stdin);

pOne.start;
pTwo.start;

processUntil(stdin);
}

We should also be able to manage:

'cat somefile'.forEach((line) => '1: line') | 'some other command';

or maybe:

'cat somefile' |. forEach((line) => '1: line') | 'some other command';

We should also be able to simply stream data into a process. In this case we are likely to need to go asyn.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Process implementation and its existing process-streaming or pipe APIs; no file or test is named in the issue. Read how commands are started and how stdin, stdout, and stderr are currently represented. Done should provide direct stream access and support the proposed tee, line-processing, and streaming-input use cases with tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.