Skip to content

zidane/output

One import for the terminal and JSONL output renderers.

import { … } from 'zidane/output'src/output.ts

Use zidane/output to get both renderers from a single specifier. It only re-exports the symbols from zidane/output/terminal and zidane/output/stream-json, so the exports are documented on those pages. Import from the narrower entry when you need only one of them.

TypeScript
import { createAgent } from 'zidane'
import { setupStreamJsonOutput, setupTerminalOutput } from 'zidane/output'
import { basic } from 'zidane/presets'
import { anthropic } from 'zidane/providers/anthropic'

const agent = createAgent({ ...basic, provider: anthropic() })
const stopJson = setupStreamJsonOutput(agent, { write: line => process.stderr.write(line) })
const prompt = 'Say hello.'
const stopTerminal = await setupTerminalOutput(agent, 'claude-fable-5-1', prompt, basic)

await agent.run({ prompt })
stopTerminal()
stopJson()

Re-exports#

These names are documented on the entry point that owns them.