{"slug": "prototyping-a-new-cli-for-wagtail", "title": "Prototyping a new CLI for Wagtail", "summary": "Wagtail has released a prototype CLI, wagtail-cli, that turns the Wagtail CMS v3 API into terminal commands for browsing, creating, and publishing pages, uploading images, and managing content, with commands like 'wt api', 'wt docs', and 'wt start'. The tool is designed to improve developer experience for both humans and AI agents, allowing agents to interact with the CMS via plain text without browser automation. Wagtail is seeking feedback from the community to refine the prototype.", "body_md": "# Prototyping a new CLI for Wagtail\n\n## A TUI to speed up common tasks, for local dev and for live sites\n\nWith [Wagtail 8.0's new API](/blog/cms-with-ai-not-ai-cms-wagtail-80s-new-api/) as a foundation, we’ve been prototyping a new [Wagtail CLI](https://github.com/wagtail/wagtail-cli) to make the API more approachable. It’s now ready for trial – install it, point it at a site's v3 API, and your CMS is now available from the terminal 🌈. Here’s how to get started:\n\n```\nuv tool install wagtail-cli\n\nexport WAGTAIL_CLI_BASE_URL=https://example.com/api/v3/\nexport WAGTAIL_CLI_TOKEN=your-api-token\n\nwt api whoami        # verify authentication\nwt api pages list    # browse pages\nwt api schema list   # discover page types\n```\n\nAnd here’s an example, asking an agent to copy a page on a live site, where the agent figures out how to use the CLI just from its --help menu:\n\n## **What the CLI does**\n\nIt’s an early prototype, so - not much, but the potential is there. Here are the sub-commands we’re trying out so far:\n\n- **wt api** : the whole v3 API as commands: browse, create, and publish pages; upload images and documents; manage snippets, sites, locales, and redirects. Comes with a \"wt api schema\" command to introspect the live site’s data model.\n- **wt docs** : our developer docs, as Markdown in your terminal. Great to more reliably give agents access to the correct version and format of the docs.\n- **wt start** : scaffold a new Django/Wagtail project, with the new[custom base page model](https://docs.wagtail.org/en/stable/releases/8.0.html#custom-base-page-models) as the default.\n\nThe API side of the CLI focuses on providing common ops / admin functionality with feature parity with the CMS. It’s both for day-to-day developer tasks but also long-running automation. Other commands are more DX-focused. We’re not there yet but eventually we hope this enables this kind of one-liner [generic content importer](https://github.com/wagtail/roadmap/issues/245) to really speed up common workflows:\n\n```\nwt api pages create blog.BlogPage --parent /blog/ --title \"Hello\" --field body:@post.md --publish\n```\n\n## **Developer experience for humans and AI**\n\nFollowing straight from [our new product strategy](/blog/our-new-product-strategy-for-wagtail/), the CLI is designed for humans who use AI agents. It’s the same CMS operations and the same docs, but in a form that is better suited to the new agentic paradigm. We want Wagtail to provide the best DX for full-stack website development in Python, building upon the strengths of Django. This kind of CLI is how we get there. For an agent, it's the cheapest possible CMS integration: plain text in and out, no browser automation needed. We’re already using agents for coding, and now they can help get the right content live too.\n\n## **Feedback needed**\n\nThis is very much just a prototype at this stage, and [we need your feedback](https://github.com/wagtail/wagtail/discussions/14531)! Come say hi in our dedicated feedback thread, or in the #ai channel [on the Wagtail Slack](https://github.com/wagtail/wagtail/wiki/Slack).", "url": "https://wpnews.pro/news/prototyping-a-new-cli-for-wagtail", "canonical_source": "https://wagtail.org/blog/prototyping-a-cli-for-wagtail/", "published_at": "2026-09-07 00:00:00+00:00", "updated_at": "2026-09-07 16:27:37.326538+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["Wagtail", "wagtail-cli", "Django"], "alternates": {"html": "https://wpnews.pro/news/prototyping-a-new-cli-for-wagtail", "markdown": "https://wpnews.pro/news/prototyping-a-new-cli-for-wagtail.md", "text": "https://wpnews.pro/news/prototyping-a-new-cli-for-wagtail.txt", "jsonld": "https://wpnews.pro/news/prototyping-a-new-cli-for-wagtail.jsonld"}}