Releases: tomdyson/wagapi
Release list
v0.8.0
What's new
Markdown output by default
pages getnow returns rich text fields as Markdown instead of HTML- Use
--htmlflag to get HTML output when needed - Powered by wagtail-write-api 0.8.0's new
?rich_text_format=markdownparameter
Requires wagtail-write-api >= 0.8.0.
v0.7.2
v0.7.1
Simplified CLI: --field is all you need
Removed --raw and --streamfield flags. The --field flag now handles everything:
- StreamField: auto-detected via schema, markdown converted to blocks
- RichTextField: auto-detected via schema, markdown sent for server-side conversion
- JSON values: arrays (
[...]) and objects ({...}) auto-parsed - Plain strings: sent as-is
For full StreamField JSON control, pass a JSON array directly:
wagapi pages create testapp.BlogPage --parent /blog/ \
--title "Test" \
--field 'body:[{"type":"paragraph","value":"<p>Hello</p>"}]'v0.7.0
Breaking: Remove --body flag from create and update commands.
New features:
--fieldnow auto-detects StreamField and RichTextField via schema — just pass markdown and it's converted automatically--streamfield FIELD:MARKDOWNfor explicit StreamField conversion without a schema fetch--typeonupdateenables auto-detection with one schema fetch (no extra page GET)
Migration: Replace --body "markdown" with --field "body:markdown". The CLI now handles the conversion automatically based on the page type schema.
v0.6.0
Snippet CRUD commands
Add CLI support for managing Wagtail snippets via the new wagtail-write-api snippet endpoints.
- New command group:
wagapi snippets list|get|create|update|delete - Schema flags:
wagapi schema --snippetsandwagapi schema --allfor snippet type discovery - Client methods:
list_snippets,get_snippet,create_snippet,update_snippet,delete_snippet - Snippet-aware example commands in schema detail output
This release aligns version numbering with wagtail-write-api — both projects now share minor versions to indicate API compatibility.
v0.5.1
Bug fixes
- Markdown lists no longer silently dropped: bullet lists (
- item) and ordered lists (1. item) in--bodymarkdown are now correctly converted to HTML<ul>/<ol>blocks when targeting StreamField page types. Previously they were silently discarded.
v0.5.0
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.
v0.4.0
What's new
pages find— search pages by title or content for quick ID lookup (wagapi pages find "iris murdoch")pages getby path — accept URL paths in addition to numeric IDs (wagapi pages get /blog/my-post/)images upload— upload images via CLI (wagapi images upload photo.png --title "My Photo")- Block type remapping — auto-remap
paragraph→textwhen the target StreamField requires it; warn when no compatible block type exists (fixes silent data loss on non-standard StreamField configurations) - Empty fields visible — empty StreamField/RichText fields now show
(empty)instead of being silently hidden - Schema footnote — schema detail output notes that required fields are enforced on publish, not draft creation
- Richer images list — dimensions shown alongside title
v0.3.0
What's new
- URL paths in output —
pages listandpages getnow show the URL path (e.g./blog/my-post/) in human-readable output - Body content previews —
pages getshows actual text content instead of[heading, paragraph] (2 blocks) - Field type labels —
schemaoutput showsStreamFieldandRichTextinstead of genericarray/string --versionflag —wagapi --versionnow works- Exit 0 for bare
wagapi— shows help instead of a usage error - README fixes — corrected
--parent /home/to--parent /, clarified example app path
Tests
- Added 16 new tests for formatters (
_streamfield_preview,_richtext_preview, url_path display, field type annotations)
Requires wagtail-write-api >= 0.3.0 for url_path and richtext_fields support.
v0.2.3
Bug fix
- Fix body format for RichTextField pages:
--bodynow checks the page type schema to determine the field type. StreamField fields receive blocks as before; RichTextField fields receive a{"format": "markdown", "content": "..."}dict for server-side conversion, instead of blocks that were stored as a corrupted string.
Docs
- Update
--parentand--descendant-ofdocs: list filters accept URL paths (e.g./blog/), not just IDs - Document auto-detection of body field type