From ac16fdf1caaf4a90feac0d5a1f310c30bd6f21c7 Mon Sep 17 00:00:00 2001 From: Jonas Kattendick Date: Sat, 16 Aug 2025 21:51:28 +0200 Subject: [PATCH] docs(README): add README --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..7f46094 --- /dev/null +++ b/README.md @@ -0,0 +1,32 @@ +# NIH PHP Command Builder + +Simple command builder inspired by rust's std library. + +```php +stdin(Stdio::piped('r')) + ->spawn(shell: true); + +$child->stdin?->write('Hello, this is pretty cool.'); +$child->stdin?->close(); + +$output = $child->output(); + +var_dump($output) + +// object(Nih\CommandBuilder\Output)#4 (3) { +// ["stdout"]=> +// string(27) "Hello, this is pretty cool." +// ["stderr"]=> +// string(0) "" +// ["code"]=> +// int(0) +// } +```