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

collaboration.mddocs/

Collaboration

User collaboration features for managing project access, team permissions, and multi-user workflows on the Surge platform.

Capabilities

Invite Collaborators

Invite users to collaborate on projects with appropriate access permissions.

/**
 * Invite users as collaborators on projects
 * @param hooks - Optional lifecycle hooks
 * @returns Command function
 */
function invite(hooks?: HookConfig): CommandFunction;

CLI Usage:

# Invite collaborator to specific project
surge invite user@example.com example.surge.sh

# Interactive invitation
surge invite

# Invite with specific permissions
surge invite user@example.com --role developer

# Bulk invite
surge invite user1@example.com user2@example.com --project example.surge.sh

CLI Options:

  • -a, --add: Add collaborator (alias for invite)
  • --role: Specify collaborator role (owner, admin, developer, viewer)
  • --project: Specify project for collaboration
  • --message: Custom invitation message

Library Usage:

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

Revoke Access

Remove collaborator access from projects and revoke permissions.

/**
 * Revoke collaborator access from projects
 * @param hooks - Optional lifecycle hooks
 * @returns Command function
 */
function revoke(hooks?: HookConfig): CommandFunction;

CLI Usage:

# Revoke access from specific project
surge revoke user@example.com example.surge.sh

# Interactive revocation
surge revoke

# Revoke from all projects
surge revoke user@example.com --all

# Revoke specific permissions
surge revoke user@example.com --role developer

CLI Options:

  • -r, --remove: Remove collaborator (alias for revoke)
  • --all: Revoke access from all projects
  • --role: Revoke specific role/permissions
  • --project: Specify project for revocation

Library Usage:

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

Collaboration Roles

Permission Levels

Owner:

  • Full project control
  • Manage all collaborators
  • Billing and plan management
  • Delete projects
  • Transfer ownership

Admin:

  • Deploy and manage projects
  • Invite/revoke collaborators
  • Configure project settings
  • View analytics
  • Cannot manage billing

Developer:

  • Deploy to projects
  • View project analytics
  • Configure deployments
  • Cannot manage users
  • Cannot delete projects

Viewer:

  • View project information
  • Access analytics (read-only)
  • View deployment history
  • Cannot deploy or modify
  • Cannot access billing

Role Assignment

# Assign specific role during invitation
surge invite developer@example.com --role developer

# Change existing collaborator role
surge invite developer@example.com --role admin --update

# View current collaborators and roles
surge list --collaborators example.surge.sh

Team Management

Project Access Control

Project-Level Permissions:

  • Each project has independent collaborator lists
  • Roles can differ across projects
  • Granular access control per project

Organization-Level Access:

  • Enterprise plans support organization management
  • Centralized user management
  • Role inheritance across projects

Collaboration Workflows

Development Teams:

# Frontend team
surge invite frontend@company.com --role developer
surge invite designer@company.com --role viewer

# Backend team  
surge invite backend@company.com --role admin
surge invite devops@company.com --role owner

Client Collaboration:

# Give client view access
surge invite client@external.com --role viewer

# Temporary contractor access
surge invite contractor@freelance.com --role developer --expire 30days

Multi-Project Management

Project Groups:

# Add collaborator to multiple projects
surge invite developer@company.com staging.company.surge.sh production.company.surge.sh

# Bulk role assignment
surge invite team@company.com --role developer --projects staging,production,demo

Template Permissions:

# Apply permission template
surge invite newuser@company.com --template developer-standard

# Create permission template
surge config --template developer-standard --role developer --projects staging,demo

Invitation Management

Invitation Process

Invitation Flow:

  1. Owner/Admin sends invitation
  2. Invitee receives email notification
  3. Invitee accepts invitation
  4. Access granted to specified projects
  5. Collaborator can immediately deploy/view

Invitation Status:

  • Pending: Invitation sent, not yet accepted
  • Accepted: User has joined as collaborator
  • Expired: Invitation expired (default 7 days)
  • Revoked: Invitation cancelled before acceptance

Managing Invitations

# View pending invitations
surge invite --status pending

# Resend invitation
surge invite user@example.com --resend

# Cancel pending invitation
surge invite user@example.com --cancel

# Set invitation expiration
surge invite user@example.com --expire 14days

Access Control

Project Security

Access Restrictions:

  • IP-based access control (enterprise)
  • Time-based access expiration
  • Project-specific permissions
  • Audit logging for all actions

Security Policies:

# Require 2FA for collaborators
surge config example.surge.sh --require-2fa

# Set IP restrictions
surge config example.surge.sh --ip-whitelist 192.168.1.0/24

# Enable audit logging
surge config example.surge.sh --audit-log enabled

Authentication Integration

SSO Integration (Enterprise):

  • SAML 2.0 support
  • OAuth integration
  • Active Directory sync
  • Custom authentication providers

API Access:

# Generate team API tokens
surge token --team frontend-team

# Revoke team tokens
surge token --revoke --team frontend-team

# List team tokens
surge token --list --team all

Collaboration Features

Communication

Project Comments:

  • Add comments to deployments
  • Tag team members in comments
  • Email notifications for mentions
  • Comment history and threading
# Add deployment comment
surge comment "Fixed navigation bug" --tag @developer@company.com

# View deployment comments
surge comments example.surge.sh --deployment latest

Activity Feed:

  • Real-time activity notifications
  • Deployment notifications
  • Collaborator changes
  • System alerts

Shared Configuration

Team Settings:

# Share project configuration
surge config example.surge.sh --share-with team@company.com

# Synchronize settings across projects
surge config --sync staging.surge.sh production.surge.sh

# Team-wide defaults
surge config --team-defaults --ssl enabled --analytics detailed

Environment Management:

  • Shared environment variables
  • Team-wide deployment configurations
  • Consistent build settings
  • Shared SSL certificates

Notification Management

Email Notifications

Notification Types:

  • New collaborator invitations
  • Deployment success/failure
  • Analytics reports
  • System maintenance
  • Security alerts

Notification Settings:

# Configure notification preferences
surge notifications --email deploy,invite,security

# Disable specific notifications
surge notifications --disable analytics

# Set notification frequency
surge notifications --frequency daily

Webhook Integration

Custom Webhooks:

# Add deployment webhook
surge webhook add https://api.company.com/deploy --events deploy,rollback

# Slack integration
surge webhook add slack --channel #deployments --events deploy,invite

# Remove webhook
surge webhook remove webhook-id

Webhook Events:

  • deploy: New deployments
  • rollback: Deployment rollbacks
  • invite: New collaborator invitations
  • revoke: Access revocations
  • error: Deployment failures

Best Practices

Team Organization

  1. Role Hierarchy: Use appropriate roles for team members
  2. Project Separation: Separate staging and production access
  3. Regular Audits: Review collaborator access monthly
  4. Documentation: Maintain team member and project documentation

Security Guidelines

  1. Principle of Least Privilege: Grant minimum necessary permissions
  2. Regular Access Reviews: Audit and remove unused access
  3. Strong Authentication: Enforce 2FA for all team members
  4. Monitoring: Enable audit logging for security events

Workflow Optimization

  1. Automation: Use API tokens for CI/CD integration
  2. Templates: Create role templates for consistent permissions
  3. Communication: Establish clear deployment communication protocols
  4. Training: Ensure team members understand their roles and permissions

Troubleshooting

Invitation Issues

Invitation Not Received:

  • Check spam/junk folders
  • Verify email address spelling
  • Resend invitation
  • Contact support for delivery issues

Cannot Accept Invitation:

  • Check invitation expiration
  • Verify Surge account exists
  • Try different browser/device
  • Clear browser cache and cookies

Access Problems

Permission Denied:

  • Verify current role and permissions
  • Check project-specific access
  • Confirm account authentication
  • Review IP restrictions

Missing Projects:

  • Check role permissions
  • Verify project still exists
  • Confirm collaborator status
  • Review organization settings

Collaboration Conflicts

Simultaneous Deployments:

  • Coordinate deployment schedules
  • Use staging environments
  • Implement deployment locks
  • Monitor deployment queues

Configuration Conflicts:

# Check current project settings
surge config example.surge.sh --show

# Resolve configuration conflicts
surge config example.surge.sh --merge-conflicts

# Reset to default configuration
surge config example.surge.sh --reset

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