Open-source, local-first AI agent for real work.
TypeScript agent-toolsai-agentbyokcoding-agentcross-platformdesktop-appdeveloper-toolselectronharnessknowledge-basellmwikilocal-firstmcpplugin-systemprivacy-firstskillstypescriptvettaworkflow-automation
/** Read piped UTF-8 stdin once; interactive terminals produce no value. */
export async function readPipedStdin(): Promise<string | undefined> {
if (process.stdin.isTTY) return undefined;
return new Promise((resolve) => {
let data = "";
process.stdin.setEncoding("utf8");
process.stdin.on("data", (chunk) => {
data += chunk;
});
process.stdin.on("end", () => resolve(data.trim() || undefined));
process.stdin.resume();
});
}