PreviewShipPreviewShip

Focused guides

Documentation

If you came from search or an AI answer engine, these focused pages are usually the fastest way to the exact workflow you need.

Codex Chat Sharing

This is a companion workflow for Codex users. It is useful for sharing debugging context, implementation records, or review discussions, but it is not required for normal PreviewShip deployments.

Global install
npx skills add blockdancez/PreviewShip --skill share-codex-chat -a codex -g --yes
Codex command
$share-codex-chat 分享当前 Codex 对话
Codex chat sharing

Quick Start

PreviewShip lets you deploy a frontend preview and get a shareable link in seconds. Choose the method that fits your workflow:

  1. 1Register a free account at previewship.com
  2. 2Create an API Key in the console (API Keys page)
  3. 3Deploy via CLI, MCP agent, VS Code/Cursor extension, console zip/html/markdown upload, or pasted HTML
  4. 4Share the preview link with your team — done!

CLI

Deploy from the terminal with a single command. The CLI also supports JSON output for AI agent integration.

Install

Use npx directly (no install needed) or install globally:

Terminal
npm install -g previewship
npx (no install)
npx previewship deploy ./dist

Set API Key

Set your API Key for authentication:

Interactive
previewship login
Non-interactive
previewship login --key ps_live_your_key_here

Or set via environment variable:

Env variable
PREVIEWSHIP_API_KEY=ps_live_... previewship deploy ./dist

Deploy

Deploy a built static directory, a single HTML file, or a Markdown document to get a preview link:

For framework projects, run the build command first and deploy the generated static output folder such as dist, build, out, or public. Do not upload raw source-code zips with package.json, src/, and node_modules; PreviewShip hosts static artifacts and does not run npm install or build after upload.
Terminal
previewship deploy ./dist
Single HTML file
previewship deploy ./report.html -n ai-report
Markdown file
previewship deploy ./README.md -n docs-preview
With options
previewship deploy ./dist -n my-project --exclude "*.map"

JSON Output for Agents

Use --json flag for structured output, ideal for AI agents and CI pipelines:

JSON output
previewship deploy ./dist --json
All commands: login, deploy, status, usage, whoami, help

MCP Server

The MCP server lets AI coding agents deploy previews as a native tool call. Works with Claude Code, Cursor, Windsurf, and any MCP-compatible client.

Configuration

For Claude Code, add to ~/.claude/settings.json:

~/.claude/settings.json
{
  "mcpServers": {
    "previewship": {
      "command": "npx",
      "args": ["-y", "previewship-mcp"],
      "env": {
        "PREVIEWSHIP_API_KEY": "ps_live_your_key_here"
      }
    }
  }
}

For Cursor, create .cursor/mcp.json in your project root:

.cursor/mcp.json
{
  "mcpServers": {
    "previewship": {
      "command": "npx",
      "args": ["-y", "previewship-mcp"],
      "env": {
        "PREVIEWSHIP_API_KEY": "ps_live_your_key_here"
      }
    }
  }
}

For Windsurf, add to ~/.codeium/windsurf/mcp_config.json:

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "previewship": {
      "command": "npx",
      "args": ["-y", "previewship-mcp"],
      "env": {
        "PREVIEWSHIP_API_KEY": "ps_live_your_key_here"
      }
    }
  }
}

Available Tools

  • deploy_preview — Deploy a build-output directory, single .html file, or Markdown document and get a preview URL
  • check_deployment — Check deployment status by ID
  • show_usage — Show remaining deployment quota
When an AI agent creates a framework project, ask it to build first and deploy the generated static output. If it creates one self-contained HTML artifact or Markdown document, deploy the .html or .md/.markdown file directly.

Codex Chat Sharing

PreviewShip also provides an optional Codex skill for sharing the current Codex conversation. It turns the visible chat transcript into a high-fidelity HTML page, deploys it with the PreviewShip CLI, and returns a public URL.

This is a companion workflow for Codex users. It is useful for sharing debugging context, implementation records, or review discussions, but it is not required for normal PreviewShip deployments.

Install the skill

Global install
npx skills add blockdancez/PreviewShip --skill share-codex-chat -a codex -g --yes
Project-local install
npx skills add blockdancez/PreviewShip --skill share-codex-chat -a codex --yes

Use in Codex

After installation, reference the skill in a Codex conversation:

Codex command
$share-codex-chat 分享当前 Codex 对话
The skill is designed to export visible chat content and filter hidden system/developer context, tool logs, API keys, and secrets. Review the generated page before sharing sensitive work.

Cursor Setup

Cursor is fully compatible with VS Code extensions. You can install PreviewShip the same way.

Install via Command Palette

  1. 1Open Cursor, press Ctrl+P (Cmd+P on Mac)
  2. 2Paste the command below and press Enter:
Command Palette (Ctrl+P)
ext install previewship.previewship

Install via VSIX

If you prefer offline installation, download the .vsix file and follow the "Manual VSIX Install" section below.


VS Code Setup

Open VS Code, press Ctrl+P (Cmd+P on Mac), paste the command below and press Enter:

Command Palette (Ctrl+P)
ext install previewship.previewship
The installation steps are the same as Cursor. Once installed, you'll see PreviewShip commands in the command palette (Ctrl+Shift+P).

Manual VSIX Install

If the marketplace is unavailable in your environment, you can install the extension manually via a .vsix file.

Installation Steps

  1. 1Download the .vsix file using the button above
  2. 2Open Cursor or VS Code, go to Extensions panel (Ctrl+Shift+X)
  3. 3Click "..." in the top-right of the Extensions panel → "Install from VSIX..." → select the downloaded file

Alternatively, install via command line:

Terminal
code --install-extension previewship-latest.vsix

API Key

An API Key is required for all deployment methods (CLI, MCP, editor extension). Here's how to create one:

  1. 1Log in to previewship.com and go to the API Keys page
  2. 2Click "Create API Key", give it a name, and copy the generated key
  3. 3Use the key in CLI (previewship login), MCP config (PREVIEWSHIP_API_KEY env var), or editor extension (Set API Key command)
Your API Key is shown only once. Store it securely. If lost, revoke the old key and create a new one.

Deploy from Editor

Once the extension is installed and your API Key is set:

  1. 1Open your frontend project folder in the editor
  2. 2Open the command palette (Ctrl+Shift+P) and run "PreviewShip: Deploy Workspace, HTML, or Markdown File" or "PreviewShip: Deploy Active HTML or Markdown File"
  3. 3The extension packages the selected build output, HTML file, or Markdown file, uploads it, and returns a preview URL when ready
Tip: By default, node_modules, .git, and other common directories are excluded. You can customize exclusions in the extension settings.
Deploy browser-ready static output, not raw source code. Build framework projects first; single .html and Markdown files are supported directly.

Console Deploy

You can also deploy directly from the web console without any tools. The console supports uploading a build-output zip, uploading a single HTML or Markdown file, or pasting HTML source:

  1. 1Log in and go to the Deploy page
  2. 2Select or create a project, then upload a .zip containing static build output, upload a .html/.md/.markdown file, or paste a complete HTML document
  3. 3PreviewShip deploys zip artifacts as static sites, packages single HTML input as index.html, and keeps single Markdown input unchanged and adds a safe Markdown viewer page before deployment
Zip uploads should contain the built static site with index.html and assets. Do not upload raw source-code zips; run npm run build first and zip the output folder.

Project Management

Projects organize your deployments. Each deployment belongs to a project.

  • Projects are automatically created when you deploy with a new project name
  • The number of projects you can have depends on your plan (Free: 1, Pro Monthly: 10, Pro Yearly: 20)
  • Deleting a project also removes all its deployments and preview links

Plans & Limits

PreviewShip offers Free, Pro Monthly, and Pro Yearly plans. Here's a comparison:

FeatureFreePro MonthlyPro Yearly
Projects11020
Daily Deploys55080
Monthly Deploys20300500
Concurrent Builds133
Max Zip Size15 MB50 MB80 MB
Monthly Upload200 MB2 GB4 GB
Preview Expiry3 days30 days365 days
PreviewShip WatermarkIncludedRemovedRemoved

FAQ

Which frameworks are supported?

PreviewShip works with any static frontend output — React, Vue, Svelte, Next.js export, vanilla HTML, Markdown documents, etc. Build first and deploy the output folder that contains index.html, or deploy a single .html/.md/.markdown file directly.

How do I deploy from an AI coding agent?

Add the PreviewShip MCP server to your agent (Claude Code, Cursor, Windsurf), or use the CLI with --json flag. Your agent can deploy previews as part of the conversation.

What's the difference between CLI and MCP?

The CLI is a terminal command (npx previewship deploy). MCP is a protocol that lets AI agents call deploy as a native tool. Use CLI for scripts and manual deploys, MCP for seamless agent integration.

What happens when a preview expires?

Expired previews return a 404 page. The deployment record remains visible in your dashboard. You can redeploy to get a new link.

Is there a file size limit?

Yes. The Free plan allows up to 15 MB per upload. Pro plans support 50-80 MB depending on the billing cycle. Uploads can be build-output zips, single HTML files, or Markdown files.

Is there a free tier?

Yes! The Free plan includes 5 deploys per day, 20 per month, and 1 project. Free preview links include the PreviewShip watermark; Pro removes it. No credit card required.

Can I deploy a single HTML or Markdown file?

Yes. The web console accepts a single .html, .md, or .markdown file or pasted HTML source; CLI/MCP accepts paths like ./report.html and ./README.md; the VS Code/Cursor extension can deploy the active HTML or Markdown file. PreviewShip serves the result as index.html.