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

Function cmdWrite

apps/desktop/src/cli/commands/notes.ts:123–131  ·  view source on GitHub ↗
(vault: string, args: ParsedArgs)

Source from the content-addressed store, hash-verified

121}
122
123export async function cmdWrite(vault: string, args: ParsedArgs): Promise<void> {
124 const rel = requirePath(args)
125 const body = await resolveBody(args)
126 if (body == null) {
127 throw new Error('zn write requires --body, a positional body, or piped stdin.')
128 }
129 const meta = await writeNote(vault, rel, body)
130 emitWritten(meta, args)
131}
132
133export async function cmdAppend(vault: string, args: ParsedArgs): Promise<void> {
134 const rel = requirePath(args)

Callers

nothing calls this directly

Calls 4

requirePathFunction · 0.85
resolveBodyFunction · 0.85
emitWrittenFunction · 0.85
writeNoteFunction · 0.50

Tested by

no test coverage detected