CLI Commands Reference

CLI Commands Reference

CLI Commands Reference

DesignerDesigner Agent Kit — documentation written for AI agents, readable by humans.

jay-stack-cli setup

Run plugin setup. Plugins create configuration files, prompt for credentials, and validate services.

# Run setup for all installed plugins (interactive — may prompt for input)
jay-stack-cli setup

# Run setup for a specific plugin
jay-stack-cli setup wix-stores

# Re-run setup (e.g., after config change)
jay-stack-cli setup --force

# Non-interactive mode (creates config templates without prompting)
jay-stack-cli setup --no-interactive

Setup is interactive by default — plugins may prompt for API keys and credentials. Use --no-interactive in CI/scripts.

Run this after installing new plugins, before jay-stack-cli agent-kit.

jay-stack agent-kit

Materialize contracts, generate discovery indexes, and produce plugin reference data. Run this after setup.

# Default: writes to agent-kit/
jay-stack agent-kit

# Custom output directory for contracts
jay-stack agent-kit --output my-output/

# List contracts without writing files
jay-stack agent-kit --list

# Filter to specific plugin
jay-stack agent-kit --plugin wix-stores

# Force re-materialization
jay-stack agent-kit --force

# Skip reference data generation
jay-stack agent-kit --no-references

Outputs:

  • plugins-index.yaml
  • materialized-contracts/<plugin>/*.jay-contract (dynamic contracts)
  • references/<plugin>/ — plugin reference data (product catalogs, collection schemas, etc.)
  • Documentation files (INSTRUCTIONS.md and reference docs)

jay-stack validate

Validate all .jay-html and .jay-contract files.

# Validate entire project
jay-stack validate

# Validate a specific path
jay-stack validate src/pages/products/

# Verbose (per-file status)
jay-stack validate -v

# JSON output
jay-stack validate --json

Example output:

✅ Jay Stack validation successful!
Scanned 5 .jay-html files, 3 .jay-contract files
No errors found.

On failure:

❌ Jay Stack validation failed

Errors:
  ❌ src/pages/products/page.jay-html
     Unknown ref "nonExistentRef" - not found in contract

1 error(s) found, 7 file(s) valid.

Always run validate after creating or editing jay-html and contract files.

jay-stack params

Discover load param values for SSG route generation.

# Discover slug values for product pages
jay-stack params wix-stores/product-page

# YAML output
jay-stack params wix-stores/product-page --yaml

# Verbose
jay-stack params wix-stores/product-page -v

Format: <plugin-name>/<contract-name>

Example output:

[
  { "slug": "ceramic-flower-vase" },
  { "slug": "blue-running-shoes" },
  { "slug": "organic-cotton-tshirt" }
]

✅ Found 3 param combination(s)

Use this to discover what param values exist for dynamic routes like [slug]. Only works on contracts whose component has loadParams.

jay-stack action

Run a plugin action from the CLI. Use to discover data for populating pages.

# Run with default input
jay-stack action wix-stores/searchProducts

# Run with input
jay-stack action wix-stores/searchProducts --input '{"query": "shoes", "limit": 5}'

# YAML output
jay-stack action wix-stores/getCategories --yaml

# Verbose
jay-stack action wix-stores/getProductBySlug --input '{"slug": "blue-shirt"}' -v

Format: <plugin-name>/<action-name>

Action names are listed in plugins-index.yaml under each plugin's actions: array. Each action entry includes a description and a path to the .jay-action file. Read the .jay-action file to see the full input/output schemas before calling an action.

Example output:

{
  "items": [
    { "_id": "prod-1", "name": "Blue Shirt", "slug": "blue-shirt", "price": 29.99 },
    { "_id": "prod-2", "name": "Red Hat", "slug": "red-hat", "price": 19.99 }
  ],
  "totalCount": 2
}

If not found, lists available actions:

❌ Action "badName" not found.
   Available actions: searchProducts, getProductBySlug, getCategories

jay-stack dev

Start the development server.

# Normal dev mode
jay-stack dev

# Test mode (enables health/shutdown endpoints)
jay-stack dev --test-mode

# Auto-timeout (implies test mode)
jay-stack dev --timeout 60

Test mode endpoints

Endpoint Method Response
/_jay/health GET {"status":"ready","port":3300,"editorPort":3301,"uptime":5.2}
/_jay/shutdown POST {"status":"shutting_down"}

Wait for server ready

Poll the health endpoint:

# Bash
for i in {1..30}; do
  curl -s http://localhost:3300/_jay/health | grep -q "ready" && break
  sleep 1
done
// TypeScript
async function waitForServer(timeout = 30000): Promise<string> {
  const start = Date.now();
  while (Date.now() - start < timeout) {
    try {
      const res = await fetch('http://localhost:3300/_jay/health');
      if (res.ok) {
        const { port } = await res.json();
        return `http://localhost:${port}`;
      }
    } catch {
      /* not ready */
    }
    await new Promise((r) => setTimeout(r, 500));
  }
  throw new Error('Server not ready');
}

Shutdown

curl -X POST http://localhost:3300/_jay/shutdown

About this document

This page is part of the Jay Stack Agent Kit — documentation generated from the framework source and written primarily for AI agents. The language and structure are optimized for machine consumption — expect precise, specification-style prose rather than narrative documentation. Learn more about the Agent Kit →