Welcome to proc
Running child processes and working with streams should be simple. proc makes it simple.
✨ The Big Idea: Treat processes and streams like arrays. Use
map,filter,reduceon anything. Errors flow naturally through pipelines. No callbacks, no edge cases, no headaches.
What is proc?
proc is a Deno library that gives you two superpowers:
- Run child processes with a clean, composable API
- Work with async iterables using the Array methods you already know
But here's the real magic: errors just work. They flow through your pipelines naturally, like data. No edge cases, no separate error channels, no callbacks. One try-catch at the end handles everything.
💡 Tip: If you've ever struggled with JavaScript streams, you're going to love this.
A Taste of proc
Count lines in a compressed file—streaming, no temp files:
import { read } from "jsr:@j50n/proc@0.23.3";
const lines = await read("war-and-peace.txt.gz")
.transform(new DecompressionStream("gzip"))
.lines
.count();
console.log(`${lines} lines`); // 23,166 lines
Chain processes like shell pipes:
import { run } from "jsr:@j50n/proc@0.23.3";
const result = await run("cat", "data.txt")
.run("grep", "error")
.run("wc", "-l")
.lines.first;
Handle errors gracefully:
import { run } from "jsr:@j50n/proc@0.23.3";
try {
await run("npm", "test")
.lines
.map((line) => line.toUpperCase())
.filter((line) => line.includes("FAIL"))
.forEach((line) => console.log(line));
} catch (error) {
// All errors caught here—from the process, from map, from filter
console.error(`Tests failed: ${error.code}`);
}
Why proc?
JavaScript streaming is fast, but error handling shouldn't break your brain. proc gives you:
- Errors that propagate naturally through pipelines
- Array methods on async iterables (map, filter, reduce, and more)
- Process management that feels like shell scripting
- Streaming everything for memory efficiency
- Type safety with full TypeScript support
Who is this for?
- DevOps engineers automating deployments, processing logs, and managing infrastructure
- Data engineers processing large CSV files, log files, or streaming data
- Backend developers building CLI tools, batch processors, or data pipelines
- System administrators replacing Bash scripts with type-safe, testable Deno code
- Anyone who needs to run child processes or work with large datasets efficiently
Ready to dive in?
Start with Installation or jump straight to the Quick Start.
Current Version: 0.23.3
Status: Stable, actively maintained, ready for production
Found a bug? Have a question? File an issue or check the FAQ.