Skip to content

feat: add patch command for updating existing documents (#167)#174

Merged
G9Pedro merged 1 commit intomasterfrom
cursor/document-patch-command-cba8
Mar 14, 2026
Merged

feat: add patch command for updating existing documents (#167)#174
G9Pedro merged 1 commit intomasterfrom
cursor/document-patch-command-cba8

Conversation

@G9Pedro
Copy link
Copy Markdown
Contributor

@G9Pedro G9Pedro commented Mar 14, 2026

Adds clawvault patch command with three modes:

  • --append — append content to end of document
  • --replace / --with — find and replace within document
  • --section / --content — upsert a markdown section (update if exists, append if not)

Leverages existing vault.patch() method. Includes section upsert logic (tries section update, falls back to append with heading if section not found).

Files changed: src/commands/patch.ts, src/commands/patch.test.ts, src/cli/index.ts (registration)

Closes #167

Co-authored-by: G9Pedro <G9Pedro@users.noreply.github.com>
@G9Pedro G9Pedro merged commit f6a7158 into master Mar 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add "patch" command to update files

2 participants