MCPcopy Index your code
hub / github.com/anomalyco/opencode / text

Function text

packages/opencode/src/util/process.ts:165–171  ·  view source on GitHub ↗
(cmd: string[], opts: RunOptions = {})

Source from the content-addressed store, hash-verified

163}
164
165export async function text(cmd: string[], opts: RunOptions = {}): Promise<TextResult> {
166 const out = await run(cmd, opts)
167 return {
168 ...out,
169 text: out.stdout.toString(),
170 }
171}
172
173export async function lines(cmd: string[], opts: RunOptions = {}): Promise<string[]> {
174 return (await text(cmd, opts)).text.split(/\r?\n/).filter(Boolean)

Callers 4

linesFunction · 0.70
spawnFunction · 0.50
index.tsFile · 0.50
index.tsFile · 0.50

Calls 1

runFunction · 0.70

Tested by

no test coverage detected