JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q30951F
  • License MIT

Comprehensive command-line interface for StackSleuth - Interactive dashboard, real-time monitoring, performance reports, CI/CD integration, and automated performance optimization recommendations.

Package Exports

  • @stacksleuth/cli
  • @stacksleuth/cli/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@stacksleuth/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@stacksleuth/cli

Command-line interface for StackSleuth performance profiling tool.

Installation

npm install -g @stacksleuth/cli

Usage

Initialize StackSleuth in your project

sleuth init

Interactive setup wizard that will:

  • Generate configuration files
  • Create example integration code
  • Set up framework-specific templates

Start real-time profiling

sleuth watch

Options:

  • --port <port> - Dashboard port (default: 3001)
  • --sampling <rate> - Sampling rate 0.0-1.0 (default: 1.0)
  • --no-dashboard - Disable dashboard UI

Generate performance reports

sleuth report --format json --output report.json

Options:

  • --format <format> - Output format: json or csv (default: json)
  • --output <file> - Output file path
  • --last <duration> - Include traces from last duration (e.g., "5m", "1h")

Show statistics

sleuth stats

Dashboard Features

When you run sleuth watch, a real-time dashboard will be available at http://localhost:3001 featuring:

  • Live trace visualization
  • Performance metrics (P50, P95, P99)
  • Error tracking
  • Performance issue detection with suggestions
  • WebSocket real-time updates

Configuration

The CLI reads configuration from:

  • stacksleuth.config.js or stacksleuth.config.ts
  • .stacksleuthrc (JSON format)

Example configuration:

export default {
  enabled: process.env.NODE_ENV !== 'production',
  sampling: { rate: 0.1 },
  filters: {
    excludeUrls: [/\/health$/, /\.(js|css|png|jpg)$/],
    minDuration: 10
  },
  output: {
    console: true,
    dashboard: { enabled: true, port: 3001 }
  }
};