MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / readStdin

Function readStdin

apps/desktop/src/cli/args.ts:93–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91 * `-` is given, and as the implicit input for `zn capture`.
92 */
93export async function readStdin(): Promise<string> {
94 if (process.stdin.isTTY) return ''
95 const chunks: Buffer[] = []
96 for await (const chunk of process.stdin) {
97 chunks.push(typeof chunk === 'string' ? Buffer.from(chunk) : chunk)
98 }
99 return Buffer.concat(chunks).toString('utf8')
100}
101
102/**
103 * Resolve `--body` / positional body conventions:

Callers 2

resolveBodyFunction · 0.85
cmdCaptureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected