CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-surge

Static web publishing CLI tool for deploying web applications to a CDN with a single command

Pending
Overview
Eval results
Files

account.mddocs/

Account Management

Account and billing management including plan upgrades, payment methods, subscription management, and account deletion.

Capabilities

Plan Management

Upgrade or downgrade account plans to access different feature sets and resource limits.

/**
 * Upgrade or downgrade account plan
 * @param hooks - Optional lifecycle hooks
 * @returns Command function
 */
function plan(hooks?: HookConfig): CommandFunction;

CLI Usage:

# View available plans
surge plan

# Select specific plan
surge plan professional

# Interactive plan selection
surge plan --interactive

Available Plans:

  • Free: Basic static hosting with surge.sh subdomains
  • Professional: Custom domains, SSL, increased limits
  • Plus: Enhanced features and higher resource limits
  • Enterprise: Custom solutions and dedicated support

Library Usage:

surge.plan({})(process.argv.slice(2));

Payment Methods

Manage payment methods and billing information for account subscriptions.

/**
 * Manage payment methods and billing information
 * @param hooks - Optional lifecycle hooks
 * @returns Command function
 */
function card(hooks?: HookConfig): CommandFunction;

CLI Usage:

# Add or update payment method
surge card

# View current payment method
surge card --show

# Remove payment method
surge card --remove

Payment Features:

  • Credit/Debit Cards: Visa, MasterCard, American Express
  • Secure Processing: PCI-compliant payment handling
  • Automatic Billing: Recurring subscription charges
  • Billing History: Access to payment records
  • Invoice Generation: Downloadable invoices

Library Usage:

surge.card({})(process.argv.slice(2));

Surge Plus Features

Enable Surge Plus plan features for specific domains.

/**
 * Enable Surge Plus plan features for domain
 * @param hooks - Optional lifecycle hooks
 * @returns Command function
 */
function plus(hooks?: HookConfig): CommandFunction;

CLI Usage:

# Enable Plus features for domain
surge plus example.com

# Interactive domain selection
surge plus

Plus Features:

  • Custom Domains: Use your own domain names
  • SSL Certificates: Free SSL for custom domains
  • Increased Limits: Higher bandwidth and storage
  • Advanced Analytics: Detailed traffic insights
  • Priority Support: Faster response times

Library Usage:

surge.plus({})(process.argv.slice(2));

Account Deletion

Permanently delete account and all associated data.

/**
 * Permanently delete account and all data
 * @param hooks - Optional lifecycle hooks
 * @returns Command function
 */
function nuke(hooks?: HookConfig): CommandFunction;

CLI Usage:

# Delete account (requires confirmation)
surge nuke

⚠️ Warning: This action is irreversible and will:

  • Delete all deployed projects
  • Remove all domains and DNS configurations
  • Cancel active subscriptions
  • Permanently delete account data
  • Release all reserved domain names

Library Usage:

surge.nuke({})(process.argv.slice(2));

Subscription Management

Plan Comparison

FeatureFreeProfessionalPlusEnterprise
Projects1UnlimitedUnlimitedUnlimited
Custom Domains
SSL Certificatessurge.sh only
Bandwidth1GB/month100GB/month1TB/monthCustom
Storage100MB1GB10GBCustom
AnalyticsBasicAdvancedAdvancedCustom
SupportCommunityEmailPriorityDedicated

Billing Cycles

Monthly Billing:

  • Charged monthly on signup date
  • Can cancel anytime
  • Prorated refunds for downgrades

Annual Billing:

  • 2 months free with annual payment
  • Billed once per year
  • No refunds after 30 days

Usage Monitoring

Monitor account usage and limits:

# View current usage
surge usage

# Check plan limits
surge plan --limits

# Usage alerts
surge config --usage-alerts 80%

Payment Processing

Supported Payment Methods

Credit/Debit Cards:

  • Visa, MasterCard, American Express, Discover
  • International cards supported
  • Automatic payment processing

Alternative Payment Methods:

  • PayPal (available in select regions)
  • Bank transfers (enterprise plans)
  • Wire transfers (enterprise plans)

Security Features

Payment Security:

  • PCI DSS Level 1 compliance
  • Encrypted card storage
  • Fraud detection and prevention
  • Secure payment processing via Stripe

Account Security:

  • Two-factor authentication available
  • Account activity monitoring
  • Secure API token management
  • Access logs and audit trails

Billing Management

Invoice Access:

# Download invoices
surge card --invoices

# View billing history
surge card --history

# Update billing address
surge card --address

Automatic Renewal:

  • Subscriptions auto-renew by default
  • Email notifications before renewal
  • Grace period for failed payments
  • Automatic retry for failed charges

Enterprise Features

Custom Solutions

Enterprise plans include:

  • Dedicated Infrastructure: Isolated hosting environment
  • Custom Domains: Unlimited custom domain support
  • Advanced SSL: EV certificates and custom CA support
  • SLA Guarantees: Uptime and performance guarantees
  • Dedicated Support: Direct access to technical team

Enterprise Configuration

# Configure enterprise settings
surge config --enterprise

# Set custom limits
surge config --bandwidth-limit 10TB
surge config --storage-limit 100GB

# Configure dedicated support
surge config --support-tier dedicated

White-Label Solutions

  • Custom Branding: Your brand on deployment interface
  • API Integration: Full API access for automation
  • Custom Domains: your-company.hosting-platform.com
  • Reseller Options: Offer hosting to your customers

Account Security

Authentication Security

Two-Factor Authentication:

# Enable 2FA
surge config --2fa enable

# Generate backup codes
surge config --2fa backup-codes

# Disable 2FA
surge config --2fa disable

API Token Management:

# Generate new API token
surge token --generate

# Revoke API token
surge token --revoke TOKEN_ID

# List active tokens
surge token --list

Access Control

Account Permissions:

  • Owner: Full account access
  • Admin: All features except billing
  • Developer: Deploy and manage projects
  • Viewer: Read-only access to analytics

IP Restrictions:

# Restrict access by IP
surge config --ip-whitelist 192.168.1.0/24

# Remove IP restrictions
surge config --ip-whitelist remove

Data Management

Data Export

Export account data for backup or migration:

# Export all project data
surge export --format json

# Export specific project
surge export example.surge.sh --format tar.gz

# Export analytics data
surge analytics example.surge.sh --export

Data Retention

Project Data:

  • Active projects: Retained indefinitely
  • Deleted projects: 30-day recovery period
  • Account deletion: Immediate permanent deletion

Analytics Data:

  • Real-time: 24 hours
  • Daily aggregates: 90 days
  • Monthly summaries: 2 years
  • Enterprise: Custom retention periods

GDPR Compliance

Data Rights:

  • Access: View all personal data
  • Portability: Export data in standard formats
  • Erasure: Complete data deletion
  • Rectification: Correct inaccurate data
# Request data export (GDPR)
surge gdpr --export

# Delete personal data (GDPR)
surge gdpr --delete

Troubleshooting

Payment Issues

Failed Payments:

  • Verify card details and expiration
  • Check available credit limit
  • Contact bank for international transactions
  • Update payment method if needed

Billing Disputes:

# Contact billing support
surge support --billing

# Request refund
surge card --refund REQUEST_ID

# Dispute charge
surge card --dispute CHARGE_ID

Account Access Issues

Locked Account:

  • Check for failed payment
  • Verify email address
  • Contact support for assistance
  • Review terms of service compliance

Lost Credentials:

# Reset password
surge login --reset-password

# Generate new API token
surge token --regenerate

# Recovery via support
surge support --account-recovery

Subscription Problems

Plan Changes:

  • Verify payment method before upgrade
  • Check prorated billing for plan changes
  • Contact support for custom requirements

Cancellation:

# Cancel subscription
surge plan --cancel

# Downgrade to free plan
surge plan free

# Export data before cancellation
surge export --all

Install with Tessl CLI

npx tessl i tessl/npm-surge

docs

account.md

analytics.md

authentication.md

collaboration.md

configuration.md

dns.md

index.md

publishing.md

revisions.md

ssl.md

tile.json