Documentation

Complete reference for Spikes — the feedback tool for static mockups. CLI commands, widget configuration, and data formats.

Installation

Widget

Add a single script tag to your HTML file:

HTML
<script src="https://spikes.sh/widget.js"></script>

CLI — Install Script

Download and install the CLI with a single command:

Terminal
curl -fsSL https://spikes.sh/install.sh | sh

CLI — Cargo

Or install via Cargo if you have Rust installed:

Terminal
cargo install spikes

Quick Start

Get feedback on your mockups in under a minute:

Terminal
# Inject widget into all HTML files in a directory
spikes inject ./mockups/

# Start local server
spikes serve
# → http://localhost:3847

# Share URL with reviewer, collect feedback, then:
spikes list                           # See all feedback
spikes list --rating no               # Find problems
spikes hotspots                       # Most-spiked elements
spikes list --json | jq '...'         # Feed to agents

Tip: First-time reviewers are prompted for their name. All spikes are tagged with reviewer identity.

CLI Commands

All commands support --json for machine-readable output, making Spikes perfect for scripting and AI agents.

init

spikes init

Create a .spikes/ directory in the current project to store feedback data.

spikes init

Creates .spikes/feedback.jsonl for storing spike data (one spike per line).

list

spikes list

List all feedback with optional filtering.

spikes list [OPTIONS]
--json
Output as JSON array
--page <PAGE>
Filter by page URL or filename
--reviewer <NAME>
Filter by reviewer name
--rating <RATING>
Filter by rating (love, like, meh, no)
--type <TYPE>
Filter by type (page, element)
Example
# List all negative feedback
spikes list --rating no

# Get JSON for a specific page
spikes list --page index.html --json

show

spikes show

Display details for a single spike.

spikes show <ID>
--json
Output as JSON object
Example
spikes show abc123xyz

export

spikes export

Export all feedback in various formats for processing.

spikes export [--format <FORMAT>]
--format <FORMAT>
Output format: json, csv, jsonl (default: json)
--output <FILE>
Write to file instead of stdout
Example
# Export as CSV for spreadsheets
spikes export --format csv --output feedback.csv

# Export as JSONL for streaming processing
spikes export --format jsonl

hotspots

spikes hotspots

Find elements with the most feedback — useful for identifying problem areas.

spikes hotspots [OPTIONS]
--json
Output as JSON array
--limit <N>
Number of hotspots to show (default: 10)
Example
spikes hotspots --limit 5 --json

reviewers

spikes reviewers

List all reviewers who have submitted feedback.

spikes reviewers [OPTIONS]
--json
Output as JSON array

inject

spikes inject

Add the Spikes widget script to HTML files in a directory.

spikes inject <DIR> [OPTIONS]
--project <NAME>
Set project key for grouping feedback
--endpoint <URL>
Set sync endpoint for multi-reviewer mode
--recursive
Process subdirectories
--dry-run
Show what would be changed without modifying files
Example
# Add widget to all HTML files
spikes inject ./mockups/ --recursive

# Preview changes first
spikes inject ./mockups/ --dry-run

serve

spikes serve

Start a local development server for reviewing mockups.

spikes serve [OPTIONS]
--port <PORT>
Port to listen on (default: 3847)
--dir <DIR>
Directory to serve (default: current)
Example
spikes serve --port 8080 --dir ./mockups/

deploy

spikes deploy

Scaffold deployment configuration for your own backend.

spikes deploy <PLATFORM>
cloudflare
Generate Cloudflare Worker + D1 scaffolding
Example
# Generate Cloudflare Worker project
spikes deploy cloudflare
cd spikes-worker
npx wrangler deploy

pull / push

spikes pull / spikes push

Sync feedback with a remote endpoint.

spikes pull [OPTIONS] spikes push [OPTIONS]
--endpoint <URL>
Remote endpoint URL (or use SPIKES_ENDPOINT env var)
Example
# Fetch remote feedback
spikes pull --endpoint https://my-worker.workers.dev/spikes

# Upload local feedback
spikes push --endpoint https://my-worker.workers.dev/spikes

dashboard

spikes dashboard

Launch interactive TUI dashboard for browsing feedback.

spikes dashboard

Widget Configuration

Configure the widget with data attributes on the script tag:

HTML
<script 
  src="https://spikes.sh/widget.js"
  data-project="my-project"
  data-position="bottom-left"
  data-color="#3498db"
  data-endpoint="https://my-worker.workers.dev/spikes"
  data-reviewer="alice"
></script>
Attribute Default Description
data-project hostname Project key for grouping feedback across pages
data-position bottom-right Button position: bottom-right, bottom-left, top-right, top-left
data-color #e74c3c Button background color (any CSS color)
data-endpoint POST endpoint for multi-reviewer sync. When set, feedback is sent to this URL.
data-reviewer Pre-set reviewer name (skip the name prompt)

Data Format

Every spike follows this structure:

TypeScript
interface Spike {
  id: string;                    // nanoid
  type: "page" | "element";
  projectKey: string;
  page: string;
  url: string;
  reviewer: { id: string; name: string };
  selector?: string;             // Element spikes only
  elementText?: string;         // Element spikes only
  boundingBox?: { x, y, width, height };
  rating: "love" | "like" | "meh" | "no" | null;
  comments: string;
  timestamp: string;             // ISO 8601
  viewport: { width, height };
}

Storage: Feedback is stored in .spikes/feedback.jsonl — one spike per line in JSON Lines format.

Multi-Reviewer Sync

By default, feedback lives in each reviewer's browser (localStorage). For team reviews, deploy your own backend:

Deploy to Cloudflare

Terminal
# Generate Cloudflare Worker scaffolding
spikes deploy cloudflare

# Deploy to your Cloudflare account
cd spikes-worker
npx wrangler deploy

Configure Widget

Add the endpoint to your widget configuration:

HTML
<script 
  src="https://spikes.sh/widget.js" 
  data-endpoint="https://your-worker.workers.dev/spikes"
></script>

Sync from CLI

Use pull and push to sync feedback between local storage and your remote endpoint:

Terminal
# Fetch all remote feedback
spikes pull

# Upload local feedback
spikes push

Tip: Set the SPIKES_ENDPOINT environment variable to avoid passing --endpoint every time.