AI Context

Generate site summaries optimized for AI assistants like Claude, ChatGPT, or Cursor.

Why AI Context?

When working with AI coding assistants, they need to understand your site's structure. The info command generates context that helps AI:

  • Understand your page hierarchy
  • Know which blocks exist and their IDs
  • Learn your site's templating patterns
  • Generate accurate code and suggestions

Basic Site Info

redo info

Returns a concise overview and pointers for exploring:

SITE: My Coffee Shop

RESOURCES:
  pages             5 items
  blocks            22 items
  collections       2 items
  collection_items  48 items
  media             19 items
  globals           settings, design, theme, memory

BLOCK IDS (for updates)
  global.css   10   redo pull block 10 -> redo push block 10
  global_head  11   redo pull block 11 -> redo push block 11
  global.js    12   redo pull block 12 -> redo push block 12

EXPLORE:
  redo list pages
  redo read page <id>
  redo list blocks --global
  redo read block <id>

GUIDES:
  redo info --blocks
  redo info --templating
  redo info --workflow
  redo help topics

Block Architecture Guide

Get detailed information about your block structure:

redo info --blocks

Output explains how blocks work on your site:

BLOCK ARCHITECTURE
──────────────────

Global Blocks (shared across pages):
  header (block_xyz001)
    Type: navigation
    Used on: all pages
    Fields: logo, nav_links[], cta_button

  footer (block_xyz002)
    Type: footer
    Used on: all pages
    Fields: columns[], social_links[], copyright

Page-Specific Blocks:
  / (Home)
    hero (block_abc001)
      Type: hero
      Fields: heading, subheading, cta_text, cta_link, background_image

    features (block_abc002)
      Type: features-grid
      Fields: heading, items[].icon, items[].title, items[].description

  /menu (Menu)
    menu_categories (block_def001)
      Type: accordion
      Fields: categories[].name, categories[].items[]

Templating Guide

Learn how to use Mustache templating in your blocks:

redo info --templating

Returns a templating reference:

MUSTACHE TEMPLATING GUIDE
─────────────────────────

Variables:
  {{title}}              Output escaped text
  {{{html_content}}}     Output unescaped HTML
  {{&content}}           Same as triple mustache

Conditionals:
  {{#show_cta}}
    
  {{/show_cta}}

Inverted (if not):
  {{^items}}
    

No items found

{{/items}} Loops: {{#items}}
  • {{name}} - {{price}}
  • {{/items}} Site Variables: {{site.title}} Site name {{site.url}} Primary URL {{page.title}} Current page title {{page.path}} Current page path

    Using with AI Assistants

    Claude / ChatGPT

    Copy the output and paste into your conversation:

    # Copy to clipboard (macOS)
    redo info --blocks | pbcopy
    
    # Copy to clipboard (Linux)
    redo info --blocks | xclip -selection clipboard
    
    # Save to file
    redo info --blocks > site-context.txt

    Cursor / VS Code

    Save the context to your project for AI to reference:

    # Save all context to a file
    redo info > .redo/CONTEXT.md
    redo info --blocks >> .redo/CONTEXT.md
    redo info --templating >> .redo/CONTEXT.md

    Then mention the file in your AI prompt: "See .redo/CONTEXT.md for site structure"

    Automated Context

    Add a script to your package.json to refresh context:

    {
      "scripts": {
        "context": "redo info > .redo/CONTEXT.md && redo info --blocks >> .redo/CONTEXT.md"
      }
    }
    npm run context

    ← Back to CLI Overview