Examples

Real-world examples and use cases for Smippo. Copy and adapt these for your needs.

Documentation Site Mirror

Archive a documentation site for offline viewing:

smippo https://docs.example.com \
  --depth 10 \
  --scope subdomain \
  --external-assets \
  --static \
  --output ./docs-archive

This captures:

  • All documentation pages (up to 10 levels deep)
  • External fonts and images from CDNs
  • Static HTML (JavaScript removed for offline viewing)

View the archive:

smippo serve ./docs-archive --open

Blog Archive

Create a complete archive of a blog:

smippo https://blog.example.com \
  --depth 5 \
  --scope subdomain \
  --include "*/posts/*" \
  --include "*/category/*" \
  --exclude "*/comments/*" \
  --exclude "*tracking*" \
  --external-assets \
  --output ./blog-archive

For a personal blog with images:

smippo https://myblog.com \
  --depth 10 \
  --external-assets \
  --mime-exclude "video/*" \
  --max-size 20MB \
  --output ~/archives/myblog-$(date +%Y%m%d)

Single Page App (SPA)

Capture a React/Vue/Angular application:

smippo https://app.example.com \
  --wait networkidle \
  --wait-time 5000 \
  --static \
  --external-assets \
  --screenshot \
  --output ./spa-snapshot

The key options:

  • --wait networkidle - Wait for JavaScript to finish loading data
  • --wait-time 5000 - Extra wait for slow API calls
  • --static - Strip JavaScript for clean offline viewing
  • --screenshot - Capture a screenshot for reference

Portfolio/Marketing Site

Mirror a marketing website with all assets:

smippo https://company.com \
  --depth 3 \
  --scope domain \
  --external-assets \
  --viewport 1440x900 \
  --screenshot \
  --pdf \
  --output ./company-mirror

API Documentation

Capture interactive API docs (like Swagger/OpenAPI):

smippo https://api.example.com/docs \
  --depth 5 \
  --scope subdomain \
  --wait-time 3000 \
  --external-assets \
  --static \
  --output ./api-docs

For authenticated API docs:

smippo https://api.example.com/docs \
  --capture-auth \
  --depth 5 \
  --external-assets \
  --output ./private-api-docs

E-commerce Product Pages

Archive product listings:

smippo https://shop.example.com/products \
  --depth 2 \
  --stay-in-dir \
  --include "*/products/*" \
  --exclude "*/cart/*" \
  --exclude "*/checkout/*" \
  --max-size 10MB \
  --mime-exclude "video/*" \
  --output ./product-catalog

News Site Snapshot

Capture current state of a news site:

smippo https://news.example.com \
  --depth 2 \
  --scope subdomain \
  --exclude "*comments*" \
  --exclude "*social*" \
  --exclude "*ads*" \
  --workers 4 \
  --rate-limit 1000 \
  --output ./news-$(date +%Y%m%d)

Wiki/Knowledge Base

Mirror a wiki for offline access:

smippo https://wiki.example.com \
  --depth 15 \
  --scope subdomain \
  --include "*/wiki/*" \
  --exclude "*/Special:*" \
  --exclude "*/edit*" \
  --exclude "*action=*" \
  --max-pages 5000 \
  --workers 4 \
  --output ./wiki-mirror

Private/Authenticated Sites

With Cookies

Export cookies from your browser and use them:

smippo https://dashboard.example.com \
  --cookies ~/cookies/dashboard.json \
  --depth 3 \
  --scope subdomain \
  --output ./dashboard-backup

With Interactive Login

For complex login flows (2FA, OAuth):

smippo https://secure.example.com \
  --capture-auth \
  --depth 5 \
  --output ./secure-mirror

With API Token

smippo https://api.example.com/docs \
  --headers '{"Authorization": "Bearer eyJhbGciOiJIUzI1NiIs..."}' \
  --depth 3 \
  --output ./api-docs

Screenshot Collection

Take screenshots without full capture:

Desktop + Mobile

# Desktop
smippo capture https://example.com \
  --viewport 1920x1080 \
  -O screenshots/desktop.png

# Tablet
smippo capture https://example.com \
  --device "iPad Pro" \
  -O screenshots/tablet.png

# Mobile
smippo capture https://example.com \
  --device "iPhone 13" \
  -O screenshots/mobile.png

Full Page Screenshots

smippo capture https://example.com/pricing \
  --full-page \
  --viewport 1440x900 \
  -O screenshots/pricing-full.png

Dark Mode Comparison

smippo capture https://example.com -O light.png
smippo capture https://example.com --dark-mode -O dark.png

Competitor Analysis

Archive competitor sites for analysis:

# Quick snapshot
smippo https://competitor.com \
  --depth 2 \
  --scope subdomain \
  --static \
  --screenshot \
  --output ./competitors/$(date +%Y%m%d)/competitor

# Detailed archive
smippo https://competitor.com \
  --depth 5 \
  --scope domain \
  --external-assets \
  --pdf \
  --har \
  --output ./competitors/detailed/competitor

Incremental Archives

Set up regular updates:

# Initial capture
smippo https://docs.framework.com \
  --depth 10 \
  --output ./docs-archive

# Weekly updates (add to cron)
smippo update -o ./docs-archive

Cron example (every Sunday at 3am):

0 3 * * 0 cd /path/to/archives && smippo update -o ./docs-archive >> update.log 2>&1

Programmatic Batch Capture

Capture multiple sites with a script:

import { capture } from 'smippo';

const sites = [
  { url: 'https://site1.com', name: 'site1' },
  { url: 'https://site2.com', name: 'site2' },
  { url: 'https://site3.com', name: 'site3' },
];

for (const site of sites) {
  console.log(`Capturing ${site.name}...`);
  
  await capture(site.url, {
    output: `./archives/${site.name}`,
    depth: 3,
    scope: 'subdomain',
    externalAssets: true,
    noJs: true,
  });
  
  console.log(`Done: ${site.name}`);
}

console.log('All captures complete!');

CI/CD Integration

Add to GitHub Actions:

name: Archive Docs

on:
  schedule:
    - cron: '0 0 * * 0'  # Weekly
  workflow_dispatch:

jobs:
  archive:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      
      - uses: actions/setup-node@v3
        with:
          node-version: '18'
      
      - name: Install Smippo
        run: npm install -g smippo
      
      - name: Capture Site
        run: |
          smippo https://docs.example.com \
            --depth 5 \
            --output ./archive \
            --no-interaction
      
      - name: Upload Archive
        uses: actions/upload-artifact@v3
        with:
          name: docs-archive
          path: ./archive

Large Site with Limits

For very large sites, use limits to control scope:

smippo https://huge-site.com \
  --depth 10 \
  --max-pages 1000 \
  --max-time 3600 \
  --max-size 5MB \
  --workers 4 \
  --rate-limit 500 \
  --output ./huge-site-partial

Debug Mode

When captures aren't working as expected:

smippo https://problem-site.com \
  --debug \
  --verbose \
  --log-file debug.log \
  --depth 1

This opens a visible browser so you can see what's happening.

Next Steps

Was this page helpful?