Skip to content

feat: add CLI command for partial document updates (#589) - #592

Merged
ajianaz merged 1 commit into
developfrom
feat/589-cli-doc-update
Jul 6, 2026
Merged

ajianaz merged 1 commit into
developfrom
feat/589-cli-doc-update

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add dedicated uteke doc update CLI command for partial document updates, complementing the existing doc create (which performs full content replacement via upsert).

Problem

  • uteke doc create can overwrite documents by slug, but performs full content replacement — not a partial update
  • HTTP POST /doc/update (added in PR feat: POST /doc/update endpoint — partial document update with chunk rebuild #583) supports partial updates (title only, tags only, metadata only) with smart chunk rebuild only when content changes
  • CLI had no dedicated uteke doc update command — users had to use the HTTP API directly

Changes

crates/uteke-cli/src/cli.rs

  • Add DocCommands::Update variant with flags: --title, --content, --file, --tags, --metadata

crates/uteke-cli/src/commands/doc.rs

  • Add DocCommands::Update match arm calling uteke.doc_update() directly
  • Validates at least one field is provided
  • Content resolution: --content > --file > stdin (--file -)
  • Metadata parsed from JSON string
  • Human-readable + JSON output modes

docs/cli-reference.md

  • Document uteke doc update with usage examples and flag table

Verification

  • cargo check -p uteke-cli ✅
  • cargo clippy -p uteke-cli --all-targets ✅ (no issues)
  • cargo fmt --all -- --check ✅

Closes #589

- Add DocCommands::Update variant with --title, --content, --file, --tags, --metadata flags
- Calls uteke_core::doc_update() directly for partial updates (title-only, tags-only, etc.)
- Content changes trigger chunk rebuild; metadata/title-only skip it
- Validates at least one field is provided
- Parses --metadata as JSON string
- Supports --file - for stdin content input
- Document in docs/cli-reference.md with examples and flag table

Closes #589
@github-actions

github-actions Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-cli · BYOK · MIT

@ajianaz
ajianaz merged commit 9fa72c9 into develop Jul 6, 2026
8 of 9 checks passed
@ajianaz
ajianaz deleted the feat/589-cli-doc-update branch July 9, 2026 14:27
ajianaz added a commit that referenced this pull request Aug 13, 2026
feat: add  CLI command for partial document updates (#589)
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.

CLI: add doc update command (dedicated partial update)

1 participant