AI Content Index

Generate CSV indexes of your pages and media for AI tools and content discovery.

Usage

php bin/console pw:ai-index [host] [exportDir]
  • host — optional, the site whose pages are exported. Omit it, or pass "", to export every site.
  • exportDir — optional. Defaults to the selected site’s flat-file directory (the default site if host is omitted), or a new var/export/<unique-id>/ directory.

Output

pages.csv

ColumnDescription
slugPage URL slug
titleHTML title (falls back to h1)
createdAtCreation date (Y-m-d H:i:s)
tagsComma-separated tags
summarySearch excerpt
mediaUsedMedia filenames the page references (body, main image, custom property)
parentPageParent page slug
pageLinkedOther page slugs found as substrings in mainContent
lengthByte length of mainContent
hostSite the page belongs to

medias.csv

ColumnDescription
mediaFilename
mimeTypeMIME type
nameAlt text
usedInPagesPage slugs referencing this media

Example

# Export pages for a specific host
php bin/console pw:ai-index altimood.com

# Export every site to a custom directory
php bin/console pw:ai-index "" /tmp/pushword-export

Both usage columns are read from the stored media↔page relation — see Media usage. A site that has never run pw:media:usage:rebuild exports them empty.

The CSV files use comma delimiters and double-quote enclosure.