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

@roeintheglasses/re-script

v2.1.1

Published

Advanced LLM-powered JavaScript unminifier and deobfuscator

Downloads

34

Readme

re-Script

JavaScript unminifier and deobfuscator powered by AI.

re-Script transforms minified and obfuscated JavaScript into readable code using AI models like Claude, GPT-4, or local LLMs. It combines traditional tools like webcrack and Babel with intelligent variable renaming.

Features

  • Multi-LLM support (OpenAI, Anthropic, Ollama, Azure, Bedrock)
  • Batch processing for multiple files or directories
  • AST-aware code splitting
  • Response caching to reduce API costs
  • Error recovery when processing steps fail
  • File-based configuration with CLI overrides
  • Real-time progress tracking
  • Dry run mode
  • Watch mode for automatic processing
npm install -g @roeintheglasses/re-script

Usage

Quick Start

# Interactive setup (recommended for first time)
re-script init

# Process a single file
re-script app.min.js

# Process directory recursively
re-script src/ --recursive --output dist/

Configuration

Create config with interactive setup:

re-script init

Or manage config manually:

# Show current config
re-script config show

# Set values
re-script config set provider.name anthropic
re-script config set provider.apiKey "your-key"

# Validate config
re-script config validate

Examples

# Single file
re-script bundle.min.js

# Multiple files
re-script file1.min.js file2.min.js

# Directory with pattern
re-script src/ --pattern "*.min.js" --recursive

# Dry run to preview changes
re-script app.min.js --dry-run

# Custom output location
re-script app.min.js --output app.readable.js

# Exclude patterns
re-script src/ --recursive --exclude "node_modules/**" "*.test.js"

# High concurrency
re-script src/ --recursive --concurrency 10

Providers

# OpenAI
re-script app.min.js --provider openai --model gpt-4o

# Anthropic  
re-script app.min.js --provider anthropic --model claude-3-5-sonnet-20241022

# Local Ollama
re-script app.min.js --provider ollama --model codellama:13b

# Azure OpenAI
re-script app.min.js --provider azure --model gpt-4o

Configuration

Config Files

re-Script looks for:

  • .rescriptrc.json
  • .rescriptrc.yaml
  • rescript.config.js
  • package.json (in rescript field)

Environment Variables

export ANTHROPIC_API_KEY=your-key-here
export OPENAI_API_KEY=your-key-here
export OLLAMA_BASE_URL=http://localhost:11434
export RESCRIPT_DEBUG=true

Config Commands

# Show current config
re-script config show

# Show with environment variables
re-script config show --env

# Set values
re-script config set provider.name openai
re-script config set provider.model gpt-4o

# Get values
re-script config get provider.name

# List all available keys
re-script config list

# Validate configuration
re-script config validate

Additional Commands

# Show usage examples
re-script examples

# Interactive setup wizard
re-script init

# Help and version
re-script --help
re-script --version

How It Works

re-Script processes files through a 4-step pipeline:

  1. Webcrack Processing - Reverse bundling and deobfuscation
  2. Babel Transformations - AST-based code improvements
  3. LLM Processing - AI-powered variable/function renaming
  4. Code Formatting - Final prettification

Each step can fail gracefully without breaking the pipeline. Responses are cached to reduce API costs.

Supported Models

OpenAI: gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-4, gpt-3.5-turbo

Anthropic: claude-3-5-sonnet-20241022, claude-3-5-haiku-20241022, claude-3-opus-20240229, claude-3-sonnet-20240229, claude-3-haiku-20240307

Azure: Same as OpenAI models but hosted on Azure

Ollama: llama3:8b, llama3:70b, codellama:13b, codellama:34b, mistral:7b, deepseek-coder:6.7b

Development

Building from Source

git clone https://github.com/roeintheglasses/re-Script.git
cd re-Script
npm install
npm run build
npm link

Running Tests

npm test
npm run test:coverage

Development Mode

npm run dev  # TypeScript watch mode

Troubleshooting

Common Issues

API Key Errors

re-script config set provider.apiKey your-key-here
# or
export ANTHROPIC_API_KEY=your-key-here

Rate Limiting

re-script config set processing.concurrency 1
re-script config set processing.retries.maxDelay 60000

Large Files

re-script config set processing.chunking.maxChunkSize 2000
re-script config set provider.maxTokens 4096

Memory Issues

re-script config set processing.caching.backend file
node --max-old-space-size=8192 $(which re-script) large-file.js

Debug Mode

re-script --verbose input.js
# or
export RESCRIPT_DEBUG=true

License

MIT License - see LICENSE file for details.

Contributing

Contributions welcome! Open an issue or submit a PR.

Support