CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-netlify-cli

Netlify command line tool for deploying and managing modern web applications on the Netlify platform

Pending
Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Pending

The risk profile of this skill

Overview
Eval results
Files

blobs-storage.mddocs/

Blobs Storage

Object storage management for Netlify Blobs with CRUD operations, metadata handling, and flexible storage patterns for modern web applications.

Capabilities

Store Objects

Write objects to Netlify Blobs storage with support for different data sources and formats.

/**
 * Write object to Netlify Blobs store
 * Command: netlify blobs:set <store> <key> [value...] [options]
 * Alias: netlify blob:set
 */
interface BlobSetOptions {
  /** Read data from filesystem path instead of command line */
  input?: string;
}

Usage Examples:

# Set blob with string value
netlify blobs:set user-data john-123 '{"name": "John", "email": "john@example.com"}'

# Set blob with multiple value arguments (concatenated)
netlify blobs:set logs app-2024 "Error: " "Connection failed" " at 14:30"

# Set blob from file
netlify blobs:set images profile-pic --input ./photos/avatar.jpg

# Set blob with JSON data from file
netlify blobs:set config app-settings --input ./config/production.json

# Alternative command name
netlify blob:set cache user-session-123 '{"sessionId": "abc", "expires": "2024-01-01"}'

Retrieve Objects

Read objects from Netlify Blobs storage with options for output formatting and file saving.

/**
 * Read object from Netlify Blobs store
 * Command: netlify blobs:get <store> <key> [options]
 * Alias: netlify blob:get
 */
interface BlobGetOptions {
  /** Output path to save blob data instead of printing to stdout */
  output?: string;
}

Usage Examples:

# Get blob content to stdout
netlify blobs:get user-data john-123

# Save blob to file
netlify blobs:get images profile-pic --output ./downloads/avatar.jpg

# Get JSON configuration
netlify blobs:get config app-settings --output ./local-config.json

# Alternative command name
netlify blob:get cache user-session-123

List Objects

List objects in Netlify Blobs stores with filtering and formatting options.

/**
 * List objects in Netlify Blobs store
 * Command: netlify blobs:list <store> [options]
 * Alias: netlify blob:list
 */
interface BlobListOptions {
  /** Treat keys with '/' as directories for hierarchical listing */
  directories?: boolean;
  /** Filter entries by key prefix */
  prefix?: string;
  /** Output as JSON instead of table format */
  json?: boolean;
}

Usage Examples:

# List all objects in store
netlify blobs:list user-data

# List with directory structure
netlify blobs:list files --directories

# List with prefix filter
netlify blobs:list logs --prefix "app-2024"

# List as JSON
netlify blobs:list user-data --json

# List images with prefix
netlify blobs:list images --prefix "thumbnails/" --directories

# Alternative command name
netlify blob:list cache --json

Delete Objects

Remove objects from Netlify Blobs storage.

/**
 * Delete object from Netlify Blobs store
 * Command: netlify blobs:delete <store> <key>
 * Alias: netlify blob:delete
 */
interface BlobDeleteOptions {
  /** No additional options for delete operation */
}

Usage Examples:

# Delete specific object
netlify blobs:delete user-data john-123

# Delete image file
netlify blobs:delete images profile-pic-old

# Delete log entry
netlify blobs:delete logs app-2024-01-15

# Alternative command name
netlify blob:delete cache expired-session

Blob Storage Patterns

Common patterns and use cases for Netlify Blobs storage:

/**
 * Common blob storage patterns
 */
interface BlobStoragePatterns {
  /** User-generated content */
  userContent: {
    store: 'user-uploads';
    keyPattern: 'user-{userId}/{contentType}/{timestamp}';
    examples: [
      'user-123/images/1640995200000',
      'user-456/documents/1640995300000'
    ];
  };
  
  /** Application cache */
  appCache: {
    store: 'app-cache';
    keyPattern: '{feature}/{identifier}';
    examples: [
      'api-responses/users-list',
      'computed-data/stats-2024-01'
    ];
  };
  
  /** Configuration storage */
  config: {
    store: 'config';
    keyPattern: '{environment}/{component}';
    examples: [
      'production/database-config',
      'staging/feature-flags'
    ];
  };
  
  /** Log storage */
  logs: {
    store: 'logs';
    keyPattern: '{service}/{date}/{level}';
    examples: [
      'api/2024-01-15/error',
      'auth/2024-01-15/info'
    ];
  };
  
  /** Asset storage */
  assets: {
    store: 'assets';
    keyPattern: '{type}/{size}/{hash}';
    examples: [
      'images/thumbnails/abc123def456',
      'videos/compressed/789xyz012'
    ];
  };
}

Blob Data Formats

Supported data formats and content types for blob storage:

/**
 * Blob data format support
 */
interface BlobDataFormats {
  /** Text formats */
  text: {
    /** Plain text */
    plain: 'text/plain';
    /** JSON data */
    json: 'application/json';
    /** XML data */
    xml: 'application/xml';
    /** CSV data */
    csv: 'text/csv';
    /** HTML content */
    html: 'text/html';
    /** Markdown content */
    markdown: 'text/markdown';
  };
  
  /** Binary formats */
  binary: {
    /** Images */
    images: ['image/jpeg', 'image/png', 'image/gif', 'image/webp', 'image/svg+xml'];
    /** Videos */
    videos: ['video/mp4', 'video/webm', 'video/ogg'];
    /** Audio */
    audio: ['audio/mp3', 'audio/wav', 'audio/ogg'];
    /** Documents */
    documents: ['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'];
    /** Archives */
    archives: ['application/zip', 'application/tar', 'application/gzip'];
  };
  
  /** Structured data */
  structured: {
    /** Protocol Buffers */
    protobuf: 'application/x-protobuf';
    /** MessagePack */
    msgpack: 'application/x-msgpack';
    /** BSON */
    bson: 'application/bson';
  };
}

Blob Metadata and Properties

Blob objects include metadata and properties for management:

/**
 * Blob object metadata
 */
interface BlobMetadata {
  /** Object key */
  key: string;
  /** Object size in bytes */
  size: number;
  /** Content type/MIME type */
  contentType: string;
  /** ETag for cache validation */
  etag: string;
  /** Last modified timestamp */
  lastModified: Date;
  /** Creation timestamp */
  createdAt: Date;
  /** Custom metadata headers */
  metadata: Record<string, string>;
  /** Content encoding (if compressed) */
  contentEncoding?: 'gzip' | 'br' | 'deflate';
  /** Cache control settings */
  cacheControl?: string;
}

/**
 * Store-level information
 */
interface StoreInfo {
  /** Store name */
  name: string;
  /** Total objects in store */
  objectCount: number;
  /** Total storage used in bytes */
  totalSize: number;
  /** Store creation date */
  createdAt: Date;
  /** Last access date */
  lastAccessed: Date;
  /** Store access permissions */
  permissions: {
    read: boolean;
    write: boolean;
    delete: boolean;
    list: boolean;
  };
}

Blob Operations Integration

Integration with other Netlify features and services:

/**
 * Integration with Netlify Functions
 */
interface FunctionsBlobIntegration {
  /** Access blobs from functions */
  functionAccess: {
    /** Get blob in function */
    getBlob: (store: string, key: string) => Promise<string | Buffer>;
    /** Set blob from function */
    setBlob: (store: string, key: string, data: string | Buffer) => Promise<void>;
    /** Delete blob from function */
    deleteBlob: (store: string, key: string) => Promise<void>;
    /** List blobs from function */
    listBlobs: (store: string, prefix?: string) => Promise<string[]>;
  };
}

/**
 * Integration with Edge Functions
 */
interface EdgeBlobIntegration {
  /** Access blobs from edge functions */
  edgeAccess: {
    /** Cached blob access at edge */
    getCachedBlob: (store: string, key: string) => Promise<string | null>;
    /** Set blob with edge caching */
    setCachedBlob: (store: string, key: string, data: string, ttl?: number) => Promise<void>;
  };
}

/**
 * Integration with build process
 */
interface BuildBlobIntegration {
  /** Access blobs during build */
  buildAccess: {
    /** Generate static files from blobs */
    generateStaticFiles: (store: string, outputDir: string) => Promise<void>;
    /** Pre-populate blobs during build */
    populateBlobs: (store: string, sourceDir: string) => Promise<void>;
  };
}

Blob Security and Access Control

Security features and access control for blob storage:

/**
 * Blob access control and security
 */
interface BlobSecurity {
  /** Access control */
  accessControl: {
    /** Public read access */
    publicRead: boolean;
    /** Authenticated read access */
    authRead: boolean;
    /** Team member write access */
    teamWrite: boolean;
    /** Function-only access */
    functionOnly: boolean;
  };
  
  /** Encryption settings */
  encryption: {
    /** Server-side encryption */
    serverSide: boolean;
    /** Encryption algorithm */
    algorithm: 'AES256' | 'AES256-KMS';
    /** Key management */
    keyManagement: 'netlify' | 'customer';
  };
  
  /** Access policies */
  policies: {
    /** IP-based restrictions */
    ipRestrictions?: string[];
    /** Time-based access */
    timeRestrictions?: {
      start: string;
      end: string;
      timezone: string;
    };
    /** Rate limiting */
    rateLimit?: {
      requests: number;
      window: number; // seconds
    };
  };
}

Blob Performance and Caching

Performance optimization and caching strategies:

/**
 * Blob performance optimization
 */
interface BlobPerformance {
  /** Caching strategies */
  caching: {
    /** CDN caching */
    cdn: {
      enabled: boolean;
      ttl: number; // seconds
      regions: string[];
    };
    /** Edge caching */
    edge: {
      enabled: boolean;
      strategy: 'lru' | 'lfu' | 'ttl';
      maxSize: number; // bytes
    };
    /** Browser caching */
    browser: {
      cacheControl: string;
      expires: Date;
    };
  };
  
  /** Compression */
  compression: {
    /** Automatic compression */
    auto: boolean;
    /** Compression algorithms */
    algorithms: ['gzip', 'br', 'deflate'];
    /** Minimum size for compression */
    minSize: number; // bytes
  };
  
  /** Content delivery */
  delivery: {
    /** Geographic distribution */
    regions: string[];
    /** Bandwidth optimization */
    bandwidthOptimization: boolean;
    /** Concurrent transfer limits */
    concurrencyLimits: {
      uploads: number;
      downloads: number;
    };
  };
}

docs

authentication-teams.md

blobs-storage.md

build-system.md

deployment.md

environment-variables.md

functions.md

index.md

local-development.md

site-management.md

tile.json