Skip to main content

Wagtail CLI

🚧 This is a prototype. Feedback very welcome! See CMS with AI, not AI CMS: Wagtail 8.0's new API and Prototyping a new CLI for Wagtail for context.

Speed up and automate Wagtail operations with the command line. Key features:

  • v3 write API client. 50+ CMS admin operations available from the terminal. To help manage local development and live sites. Manage pages, images, documents, snippets, sites, locales, redirects, and more.
  • Read and search Wagtail docs as Markdown.
  • Scaffold new Django/Wagtail projects.

Installation

Install wagtail-cli from PyPI with your preferred package manager, then use the wt CLI. Example with uv:

# Permanent install:
uv tool install wagtail-cli
# One-off usage:
uvx --from wagtail-cli wt

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

Reading the Wagtail docs needs no configuration at all:

wt docs releases/8.0    # release notes, as Markdown
wt docs api             # index of v3 API operations
wt docs search picture  # search the docs

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 — the whole v3 API as commands: pages, images, documents, snippets, sites, locales, redirects, schema, plus wt api init and wt api whoami.
  • wt docs — docs.wagtail.org as Markdown: release notes, the v3 API reference, and search.
  • wt start — scaffold a new Django/Wagtail project (mirrors wagtail start / django-admin startproject, with a custom base page model as the default).
  • Delegation — any other wt <command> is forwarded to ./manage.py (if present) or django-admin (when DJANGO_SETTINGS_MODULE is set), so wt also fronts Django commands like wt runserver and wt makemigrations.
  • wt --version / wt --help — enhanced with detected Wagtail/Django versions and ./manage.py --help when available.

Documentation

Contributing

See the development guide for details.

Metadata

Release files for wagtail-cli 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wagtail-cli 0.3.0
File Size Uploaded
wagtail_cli-0.3.0.tar.gz 35.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wagtail-cli 0.3.0
File Interpreter ABI Platform
wagtail_cli-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 86.8 kB

Release files / wagtail_cli-0.3.0.tar.gz

Download URL wagtail_cli-0.3.0.tar.gz
Size 35.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e6f4d3014829629157a9c539182b5e60e268944cb044e81af014b2944adca3a1
BLAKE2b-256 checksum
How to use checksums
3dbd382ddc3670929b0885b987e10962078d20204a662c6ad192f3268433d9e4
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.3.0-py3-none-any.whl

Download URL wagtail_cli-0.3.0-py3-none-any.whl
Size 51.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ed97d288936e1f962bbd2d7595fbdf0a3aafb23b67006790e1691bd0ad17ddef
BLAKE2b-256 checksum
How to use checksums
f55a7f7a11fa544667881149d2fc59b17a9f654eb329be7170a81869c5185df0
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 history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page