wagtail-cli
🚧 This is a prototype / early MVP. Feedback very welcome! See CMS with AI, not AI CMS: Wagtail 8.0’s new API for context.
A command-line client for the Wagtail v3 API. Install it, point it at a Wagtail site's API, and drive CMS operations (pages, images, documents, snippets, sites, locales, redirects, schema) from your terminal — handy for automation and AI-orchestrated content management.
Installation
Pick the command for your preferred package installer. The console script is
wt (the package name is wagtail-cli):
uv tool install wagtail-cli # permanent install; then run `wt …`
uvx --from wagtail-cli wt # one-shot, no install
Quick start
export WAGTAIL_CLI_BASE_URL="https://cms.example.com/api/v3/"
export WAGTAIL_CLI_TOKEN="your-api-token"
wt api whoami # verify authentication
wt api pages list # browse pages
wt api schema list # discover page types
Or run wt api init once to save these to ~/.wagtail-cli.toml interactively.
Create and publish a blog page from a Markdown file:
wt api pages create blog.BlogPage --parent /blog/ \
--title "Hello world" --field body:@post.md --publish
Rich-text fields accept Markdown via a .md file reference: the value is sent
to the API as {"format": "db_markdown", "content": …}.
Command surface
wt api …— all Wagtail v3 API operations (pages,images,documents,snippets,sites,locales,redirects,schema), pluswt api initandwt api whoami.wt start …— scaffold a new Django/Wagtail project (mirrorswagtail start/django-admin startproject; default custom base-page template).- Delegation — any other
wt <command>is forwarded to./manage.py(if present) ordjango-admin(whenDJANGO_SETTINGS_MODULEis set), sowtalso fronts Django commands likewt runserver/wt makemigrations. wt --version/wt --help— custom, enhanced with detected Wagtail/Django versions and./manage.py --helpwhen available.
Documentation
- Quickstart — end-to-end walkthrough against the demo site.
- Configuration — config cascade, dotfiles, environment variables.
- Command reference — every command and flag.
- Development — layout, testing, and how to add commands.
Development
just install # set up the environment
just test # run the test suite
just lint # lint with Ruff
just test-integration # run integration tests against a live site
See the development guide for details.
Metadata
Release files for wagtail-cli 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wagtail_cli-0.1.1.tar.gz | 16.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wagtail_cli-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 46.1 kB
Release files / wagtail_cli-0.1.1.tar.gz
| Download URL | wagtail_cli-0.1.1.tar.gz |
|---|---|
| Size | 16.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b8de47d260cbb978ad135b2456bf7c028ec5e9b79397810988b56fb9d513759
|
|
BLAKE2b-256 checksum How to use checksums |
eeeddbd4c344cd1b11da17706f1092b4046781580bc1b437de0ba338cc97c1fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / wagtail_cli-0.1.1-py3-none-any.whl
| Download URL | wagtail_cli-0.1.1-py3-none-any.whl |
|---|---|
| Size | 29.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7789d7a4b0b4b4d0766b762c3053c6d62d80712db4573ea4e86f3b67f84b5fbf
|
|
BLAKE2b-256 checksum How to use checksums |
74736382a814e9e09a87fc38a9303f1df3faf2eb32441623fa962ade38d22a6d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|