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

Function cmdPrepend

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

Source from the content-addressed store, hash-verified

141}
142
143export async function cmdPrepend(vault: string, args: ParsedArgs): Promise<void> {
144 const rel = requirePath(args)
145 const body = await resolveBody(args)
146 if (body == null || body.trim() === '') {
147 throw new Error('zn prepend requires --body, a positional body, or piped stdin.')
148 }
149 const meta = await prependToNote(vault, rel, body)
150 emitWritten(meta, args)
151}
152
153export async function cmdRename(vault: string, args: ParsedArgs): Promise<void> {
154 const rel = requirePath(args)

Callers

nothing calls this directly

Calls 4

requirePathFunction · 0.85
resolveBodyFunction · 0.85
prependToNoteFunction · 0.85
emitWrittenFunction · 0.85

Tested by

no test coverage detected