blincks

Structure Viewer docs

A WordPress file explorer and AI context builder for developers. Browse, inspect, view source code, and export the complete file structure of any installed plugin or theme — right from your admin dashboard.

Getting Started

Structure Viewer lives entirely inside your WordPress admin — no FTP, cPanel, or server access required. Once installed, everything happens under Tools → Structure Viewer.

  1. 1Go to Plugins → Add New in your WordPress admin.
  2. 2Search for Structure Viewer.
  3. 3Click Install Now, then Activate.
  4. 4Navigate to Tools → Structure Viewer to start exploring.

Note: Only users with the manage_options capability (administrators by default) can access Structure Viewer. It adds no public-facing pages or scripts.

File Explorer

The Explorer is the heart of Structure Viewer. Use the searchable item picker at the top to switch between All Plugins, an individual plugin, All Themes, or an individual theme.

  • Expand any folder to lazily load and scan its contents — only what you open is scanned.
  • Use the live tree search to filter files in real time; jump between matches with next/prev navigation.
  • In All Plugins / All Themes mode, the search bar filters the list of plugins or themes by name.
  • Use the file type tag strip to show only PHP, only CSS, only images, and so on.
  • Toggle file size and modification dates on or off, and revisit anything from the Recently Viewed panel.

Viewing & Downloading Files

Click any text-based file in the tree to open it in the inline viewer modal with syntax highlighting. Image files open in a new browser tab.

  • See file metadata: size, line count, and last modified timestamp.
  • Switch to fullscreen mode for reading long files without scrolling the page.
  • Use the one-click Download button — files are served with the correct MIME type and original filename.
  • When Auto-redact secrets is enabled, a badge shows how many credentials were masked in the open file.

Exporting Structures

Export the complete file tree of any plugin or theme from the Export tab, in whichever format suits your workflow.

  • TXT — clean ASCII tree, token-efficient, ideal for documentation and AI context windows.
  • JSON — nested structure with file sizes and timestamps for programmatic use.
  • XML — standardized hierarchical format.
  • PDF — formatted document with header, page numbers, and automatic page breaks.
  • Clipboard — one-click emoji tree copy for pasting into Slack, Notion, GitHub, or any AI chat.

Note: Choose your preferred clipboard format (JSON, Text, or XML) in Settings → Copy format.

AI Context Workflow

Structure Viewer is designed to be the first step in any AI-assisted development task. Give the AI the whole codebase map before you ask it anything.

  1. 1Select the plugin or theme you want to work on from the item picker.
  2. 2Optionally exclude node_modules, vendor, or build artifacts in Settings so they don't bloat your context.
  3. 3Export as TXT (or copy the emoji tree to your clipboard).
  4. 4Paste the tree into ChatGPT, Claude, Cursor, Copilot, or Gemini as structural context.
  5. 5Drill into specific files in the viewer modal and copy targeted snippets as follow-up.

Note: Enable Auto-redact secrets first if the codebase may contain credentials — the exported content is then safe to paste anywhere.

WP-CLI

Automate structure exports from the command line — handy for scripting dumps straight into an AI agent's working directory.

wp structure-viewer export plugin <folder-name>
wp structure-viewer export theme <folder-name>
wp structure-viewer list plugins
wp structure-viewer list themes

Settings

Make Structure Viewer yours from the Settings tab. Changes auto-save with an instant confirmation toast.

  • Dark mode / Light mode — toggle instantly from the plugin header or via Settings; rendered server-side with no flash on load.
  • Accent color picker — Emerald (default), Violet, Blue, Amber, or Rose.
  • Auto-redact secrets on export — opt-in masking of credentials in viewed and downloaded content.
  • Exclude hidden files, system directories, and custom patterns such as node_modules, .git, and vendor.

Structure Viewer Pro

Pro unlocks two tools for developers who need to go deeper. Upgrade from Settings → Licence → Upgrade to Pro.

Comparator shows a precise, color-coded, line-by-line diff between any two versions — audit updates, review customizations, and catch unwanted changes. Compare two ZIPs, an installed plugin against a ZIP, or two individual files. It handles large and minified files by tokenizing before diffing.

FlatPack extracts any plugin or theme ZIP and flattens it into a single clean download. Filter by PHP, CSS/JS, images, or custom extensions with a live preview, and only the matching files are packed — with smart collision-safe naming for duplicate filenames.

Security & Performance

Security is built into every request, and the plugin is invisible to your site's frontend.

  • Nonce verification on all AJAX endpoints, and manage_options capability required — administrators only.
  • Path traversal prevention — file paths resolved with realpath() and verified.
  • Input sanitized with wp_unslash() + sanitize_text_field(); all output escaped before rendering.
  • Auto-redact secrets (opt-in) strips credentials from viewed and downloaded content.
  • Assets load only on the Structure Viewer admin page — zero frontend impact. Dashboard stats cached for 6 hours, trees lazy-loaded, and no external HTTP requests at runtime.

Still need help?

Ask a question on the WordPress.org support forum, or reach the Blincks team directly at hello@blincks.com.