npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@seanchatmangpt/pictl

v26.4.9

Published

Process Mining in WebAssembly - High-Speed Algorithms for Browser and Node.js

Readme

pictl — Process Intelligence Control

21 process mining algorithms compiled to WebAssembly. Discover process models from event logs in browsers and Node.js — no Python, no services, just npm install.

Quick Start

CLI (60 seconds)

npm install -g @pictl/cli
pictl run process-log.xes

Node.js (30 seconds)

const pictl = require('@pictl/engine');
await pictl.init();

const log = pictl.load_eventlog_from_xes(xesContent);
const dfg = JSON.parse(pictl.discover_dfg(log, 'concept:name'));
console.log(`${dfg.nodes.length} activities, ${dfg.edges.length} flows`);

Browser (30 seconds)

<script type="module">
  import pictl from '@pictl/engine';
  await pictl.init();
  const log = pictl.load_eventlog_from_xes(xesContent);
  const dfg = JSON.parse(pictl.discover_dfg(log, 'concept:name'));
</script>

Streaming (IoT / infinite event streams)

const pictl = require('@pictl/engine');
await pictl.init();

// Open session — no full log held in memory
const handle = pictl.streaming_dfg_begin();

// Feed events as they arrive
pictl.streaming_dfg_add_event(handle, 'case-1', 'Register');
pictl.streaming_dfg_add_event(handle, 'case-1', 'Approve');
pictl.streaming_dfg_close_trace(handle, 'case-1');

// Live snapshot (non-destructive)
const dfg = JSON.parse(pictl.streaming_dfg_snapshot(handle));

// Finalize: flush open traces, return DFG
const result = JSON.parse(pictl.streaming_dfg_finalize(handle));
console.log(`${result.nodes} nodes, ${result.edges} edges`);

What It Does

pictl discovers process models from event logs. Give it a log of activities (who did what, when), and it finds the underlying process structure.

| Capability | What It Gives You | | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | 21 discovery algorithms | DFG, Alpha++, ILP, Genetic, PSO, A*, DECLARE, Heuristic Miner, Inductive Miner, Hill Climbing, ACO, Simulated Annealing, Process Skeleton, Optimized DFG | | 6 ML analysis algorithms | Classify, cluster, forecast, anomaly detection, regression, PCA | | Streaming API | Process infinite event streams with bounded memory | | Conformance checking | Token-based replay with fitness, precision, generalization | | 20+ analytics functions | Bottlenecks, variants, concept drift, dependencies, rework detection | | Predictions | Next activity, remaining time, outcome, drift detection |

Input: XES or JSON event logs. Output: Petri nets, DFGs, process trees, DECLARE models, JSON analytics.

CLI Reference

pictl run <log.xes>              # Process discovery
pictl compare <algos> -i <log>   # Side-by-side algorithm comparison
pictl diff <log1> <log2>         # Compare two event logs
pictl predict <task> -i <log>    # Predictive mining (next-activity, remaining-time, outcome)
pictl drift-watch -i <log>       # Real-time EWMA drift monitoring
pictl ml <task> -i <log>         # ML-powered analysis (classify, cluster, forecast, anomaly)
pictl watch                      # Config file watcher — re-run on change
pictl status                     # WASM engine health + system info
pictl doctor                     # 6-check environment diagnostic
pictl explain                    # Human/academic algorithm explanations
pictl init                       # Scaffold pictl.toml + .env.example
pictl results                    # Browse saved results in .pictl/results/
pictl powl <subcommand>          # POWL model analysis

Output formats: --format human (colored terminal) or --format json (structured output)

Performance Benchmarks

Version: v26.4.7 | Hardware: Apple M3 Max (16P/4E, 36GB unified memory) | Methodology: Median of 7 runs

At a Glance (10K cases)

| Tier | Algorithms | Time | Use Case | | --------------- | -------------------------------------- | ---------- | ------------------------------------------ | | ⚡ Ultra-fast | DFG, Process Skeleton | 2.7–3.0 ms | Real-time dashboards, high-throughput APIs | | ⚡ Fast | Heuristic Miner, Inductive Miner | 14–25 ms | Interactive discovery, UI-driven analysis | | 🚀 Evolutionary | Genetic, ACO, PSO, Simulated Annealing | 21–25 ms | Quality optimization via population search | | 🔍 Optimal | ILP, A* Search | 77–87 ms | Best possible model, provable quality | | 📊 Streaming | Streaming DFG, Noise-Filtered DFG | 69–135 ms | Infinite streams, IoT, memory-constrained |

Key metrics:

  • All 21 algorithms tested on real data (BPI 2020: 10,500 traces, 141K events)
  • Linear scaling from 100 to 50,000+ cases
  • Streaming: 1.4–23x overhead for bounded memory on infinite event streams
  • Browser benchmarks: ~40–60% slower than Node.js (expected WASM sandbox overhead)

📖 Full benchmark report: docs/BENCHMARKS.md 📖 Benchmark documentation: docs/benchmarks/ — tutorials, methodology, reference

Documentation

Getting Started

Performance & Benchmarks

API & Algorithms

Integration

Architecture

pictl/
├── wasm4pm/                # Rust core — 21 algorithms compiled to WASM
│   └── src/                #   Discovery, conformance, analytics, streaming
├── packages/               # TypeScript monorepo (9 packages)
│   ├── @pictl/kernel       #   WASM facade — run(algorithm, handle, params)
│   ├── @pictl/engine       #   Lifecycle state machine
│   ├── @pictl/config       #   Zod-validated config, 5-layer precedence
│   ├── @pictl/planner      #   Execution plan generation
│   ├── @pictl/observability#   CLI output, JSONL, OTEL spans
│   ├── @pictl/contracts    #   Receipts, errors, plans, hashing
│   ├── @pictl/testing      #   Parity/determinism/CLI test harnesses
│   ├── @pictl/ml           #   Micro-ML: classify, cluster, forecast, anomaly
│   └── @pictl/swarm        #   Multi-worker coordinator
├── apps/pmctl/             # CLI tool — pictl command
├── benchmarks/             # Node.js + browser benchmark suite
└── docs/                   # Documentation (Diátaxis)

Installation

# CLI
npm install -g @pictl/cli

# Library
npm install @pictl/engine

# From source
git clone https://github.com/seanchatmangpt/pictl.git
cd pictl/wasm4pm
npm install && npm run build

Status

Production Ready — v26.4.7

  • All 21 algorithms tested and operational
  • All algorithms benchmarked with real Criterion results
  • Validated on BPI 2020 (10,500 traces, 141K events)
  • Linear scaling from 100 to 50,000+ cases
  • Ready for npm publish

License

MIT OR Apache-2.0