Skip to content

v0.5.0

Choose a tag to compare

@tomdyson tomdyson released this 07 Apr 14:14
· 10 commits to main since this release

Block-level StreamField editing

New flags on wagapi pages update to add blocks to an existing StreamField body without replacing the whole thing:

  • --append-block JSON — append a block to the end of the body (repeatable)
  • --insert-block INDEX JSON — insert a block at a specific position (repeatable)

The CLI fetches the current body, splices in the new block(s), and sends the result.

# Upload an image and add it to a post
wagapi images upload photo.jpg --title "Photo"
wagapi pages update 42 --append-block '{"type":"image","value":4}'

# Insert at a specific position
wagapi pages update 42 --insert-block 1 '{"type":"paragraph","value":"<p>New paragraph</p>"}'

UUIDs are auto-generated for blocks that don't include an id. Cannot be combined with --body.