Skip to content

Repository files navigation

flash-pkg 🚀

Version License Platform Tests Stars

Universal Fast Dev Setup for Python (uv) + JS (Bun) — Optimized for Heavy ML & Enterprise

Stop waiting 45 minutes for torch and paddleocr to download. Get your ML/fullstack projects running in under 30 seconds after one-time bootstrap.

NEW v1.1: 🔥 Cache Sharing — Compress 2 GB cache to 477 MB, share with team, import in 19 seconds!
NEW v1.1.1:WSL Optimization — Export cache in 33s on WSL (tested and verified)

Built for developers in Nepal/Asia with slow internet, but works blazingly fast everywhere.


Why flash-pkg?

  • 10-100x faster than pip/npm for heavy dependencies (torch, paddleocr, modelscope, transformers)
  • Asia-optimized mirrors (Tsinghua, Aliyun) with automatic latency testing
  • One-time bootstrap → every new project is instant forever
  • Enterprise-ready: proxy support, air-gapped mode, Docker templates, SBOM generation
  • Zero overhead: Pure CLI, no Docker required (but Docker templates included)

Real-world benchmarks (Tested on WSL, 10 Mbps connection)

Task Old way (pip/npm) With flash-pkg (Linux) With flash-pkg (WSL)
First ML setup 45-90 minutes 2-4 minutes (one-time) 2-4 minutes (one-time)
New ML project 45-90 minutes 10-20 seconds 60 seconds
Export cache N/A 30-60 seconds 33 seconds
Import cache N/A 8 seconds 19 seconds
New MERN app 5-15 minutes 3-8 seconds 10-15 seconds

Note: WSL install is 60s due to filesystem limitations (must copy files, can't hardlink). Still 34x faster than downloading!


Quick Start

1. Install (takes 10-30 seconds)

Linux / macOS / WSL / Git Bash:

curl -sSL https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.sh | bash
source ~/.bashrc  # or ~/.zshrc

Windows PowerShell:

irm https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.ps1 | iex
. $PROFILE

Windows CMD (Command Prompt):

powershell -Command "irm https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.ps1 | iex"

Then close and reopen CMD to use flash command.

2. Test it works (optional but recommended)

cd test-examples
bash quick-test.sh

3. Bootstrap once (run on good WiFi)

For Python/ML projects:

flash bootstrap-ml  # Pre-caches common ML packages (torch, paddleocr, etc.)
# OR
flash bootstrap-custom your-project/requirements.txt  # Pre-cache YOUR dependencies

For JavaScript/MERN projects:

flash bootstrap-mern  # Pre-caches React, Next.js, Vue, TypeScript, Vite

This downloads packages to cache. Takes 1-4 minutes depending on your connection. You only do this once ever.

4. Use with ANY project

Python:

# Your existing project
cd my-ai-project
uv venv
uv pip install -r requirements.txt  # <30 seconds!

# Or create new project
flash ml my-new-project
cd my-new-project
uv add numpy pandas scikit-learn  # Add any packages you want

JavaScript:

# Your existing project
cd my-react-app
bun install  # <30 seconds!

# Or create new project
flash mern my-new-app
cd my-new-app
bun add axios react-router-dom  # Add any packages you want

Every new project after bootstrap: under 30 seconds. No more waiting. uv pip install -r requirements.txt # <30 seconds!

Or create new project

flash ml my-new-project cd my-new-project uv add numpy pandas scikit-learn # Add any packages you want


Every new project after bootstrap: **under 30 seconds**. No more waiting.

**Note:** flash-pkg works with ANY Python/JS dependencies, not just ML. Bootstrap just pre-caches common packages for speed.

---

## Commands

```bash
# Python/ML Commands
flash ml <name>              # Create Python ML project
flash bootstrap-ml           # One-time heavy deps download (CPU version)
flash bootstrap-ml-gpu       # GPU version with CUDA support
flash bootstrap-custom <file> # Pre-cache YOUR custom requirements.txt
flash export-cache           # Compress Python cache: 2.4 GB → 477 MB (tested!)
flash import-cache <file>    # Import Python cache in 19 seconds (tested!)

# JavaScript/MERN Commands
flash mern <name>            # Create MERN app (Vite + React + TypeScript)
flash bootstrap-mern         # Pre-cache React, Next.js, Vue, TypeScript, Vite
flash export-cache-js        # Compress JavaScript cache: 146 MB → 24 MB (tested!)
flash import-cache-js <file> # Import JavaScript cache in 1 second (tested!)

# Enterprise
flash docker-ml <name>       # Generate Dockerfile + DevContainer for ML
flash docker-mern <name>     # Generate Dockerfile + DevContainer for MERN
flash enterprise-install     # Show company rollout guide
flash sbom                   # Generate SBOM for security audits

🔥 Cache Sharing Workflow (NEW!)

The Problem: Your team has slow internet. Everyone waits 45 minutes to download torch, paddleocr, etc.

Python Solution (Linux/macOS/WSL):

# Person 1 (good WiFi, one time)
flash bootstrap-ml
flash export-cache           # Creates flash-cache-20260227.tar.zst (477 MB, 33s on WSL)

# Share file via GitHub Release, Google Drive, company S3, or even WhatsApp!

# Everyone else (instant setup)
flash import-cache flash-cache-20260227.tar.zst  # 19 seconds
cd your-project
uv pip install -r requirements.txt               # 60s on WSL, 10-20s on Linux!

JavaScript Solution (Linux/macOS/WSL):

# Person 1 (good WiFi, one time)
flash bootstrap-mern
flash export-cache-js        # Creates flash-cache-js-20260227.tar.zst (24 MB, 1.4s!)

# Share file via GitHub Release, Google Drive, company S3, or even WhatsApp!

# Everyone else (instant setup)
flash import-cache-js flash-cache-js-20260227.tar.zst  # 1 second
cd your-project
bun install                  # 30s for 178 packages!

Windows PowerShell:

# Python
flash bootstrap-ml
flash export-cache           # Creates flash-cache-20260227.zip

# JavaScript
flash bootstrap-mern
flash export-cache-js        # Creates flash-cache-js-20260227.zip

# Share file via GitHub Release, Google Drive, company S3, or even WhatsApp!

# Everyone else (instant setup)
flash import-cache flash-cache-20260227.zip
flash import-cache-js flash-cache-js-20260227.zip
cd your-project
uv pip install -r requirements.txt  # OR  bun install

Result:

  • Python: 45 minutes → 79 seconds for entire team on WSL! 🚀
  • JavaScript: First install → 30 seconds for 178 packages! ⚡

For Companies & Enterprise Teams

Already trusted in spirit by:

  • Snyk (native uv Enterprise support, April 2026)
  • Plotly (full production migration to uv)
  • Rippling (24M-line monolith, <1min installs)
  • ByteDance (pnpm/Bun in production)

Enterprise Features

Corporate proxy detection — works behind firewalls
Air-gapped / offline mode — export cache to shared drive/S3
Docker + VS Code Dev Container templates — 71% of pros use Docker
SBOM generation — security audit ready (CycloneDX format)
Monorepo support — uv workspaces + Bun workspaces
CI/CD friendly — GitHub Actions, GitLab CI examples
Zero telemetry — MIT licensed, audit the code yourself

Rollout in Your Org

# One-time per machine
curl -sSL https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.sh | bash

# Show IT team the guide
flash enterprise-install

# One-time bootstrap (on fast WiFi or cache server)
flash bootstrap-ml

# For air-gapped environments
tar -czf flash-cache.tar.gz ~/.cache/uv
# Copy to other machines, extract, done

Use Case: Existing Python AI/ML Project

You have a project with 50+ heavy dependencies in requirements.txt:

torch==2.5.0
paddleocr==2.8.1
modelscope==1.20.0
transformers==4.46.0
opencv-contrib-python==4.10.0.84
...

Old painful way:

git clone your-project
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt  # ☕☕☕ 45-90 minutes

With flash-pkg:

# One-time setup (if not done)
flash bootstrap-ml  # 2-4 min once

# Every time (new laptop, new teammate, CI server)
cd your-project
uv venv
uv pip install -r requirements.txt  # ⚡ 8-25 seconds
uv run python main.py

Result: 45 minutes → 20 seconds. Every. Single. Time.


How It Works

  1. uv (Astral's Rust-based Python package manager) — 10-100x faster than pip
  2. Bun (fastest JS runtime in 2026) — replaces npm/yarn/pnpm
  3. Smart mirror selection — auto-tests Tsinghua, Aliyun, Huawei, official PyPI
  4. Global cache — download once, reuse forever (like Docker layers but for packages)
  5. Asia-optimized — tested on NTC/Ncell 4G in Kathmandu

Platform Support

Platform Status Notes
Linux ✅ Full support Tested on Ubuntu 22.04+, Debian, Arch. Install: 10-20s
macOS ✅ Full support Intel + Apple Silicon. Install: 10-20s
Windows WSL ✅ Full support Optimized in v1.1.1. Install: 60s (filesystem limitation)
Windows PowerShell ✅ Full support Native Windows support. Uses .zip format for cache
Windows CMD ✅ Full support Works via PowerShell pipe. Default VS Code terminal
Windows Git Bash ✅ Full support Uses install.sh like Linux/macOS

Roadmap

  • Windows PowerShell installer (v1.1.1)
  • flash test-mirrors — benchmark all mirrors and pick fastest
  • Pre-built wheel cache on Cloudflare R2 (free CDN)
  • flash monorepo-init — uv workspaces + Turborepo
  • More templates: FastAPI, Django, Next.js, Svelte
  • Auto-detect CUDA version for GPU bootstrap

Contributing

PRs welcome! Especially:

  • Windows .ps1 version
  • More project templates
  • Mirror speed improvements
  • Enterprise use cases

License

MIT — use it anywhere, fork it, ship it in your company.


Credits

Built on top of:

  • uv by Astral (the team behind Ruff)
  • Bun by Jarred Sumner
  • Tsinghua, Aliyun, Huawei mirrors (heroes for Asia devs)

Made with ❤️ for developers who are tired of waiting.

Star this repo if it saves you time!


🤝 Contributing

We welcome contributions! Here's how to get started:

New to open source? Check out our Good First Issues!

See CONTRIBUTING.md for detailed guidelines.


FAQ

Common Questions

Q: Does it work for ANY project on ANY IDE?
A: YES! Once cached, packages work in VS Code, PyCharm, Jupyter, or any IDE. Just use uv pip install -r requirements.txt.

Q: How is this different from Docker?
A: Docker is for production deployment. flash-pkg is for development speed. Use both! See Docker Comparison for details.

Q: Where is the cache saved?
A: ~/.cache/uv (about 1 GB for typical ML setup). Safe to delete anytime.

Q: Why was my first install 15 minutes?
A: Normal! Downloading packages from internet. Every project after is <1 minute.

Q: How do I clean the cache?
A: rm -rf ~/.cache/uv or uv cache clean

Q: Can I share cache with my team?
A: YES! tar -czf cache.tar.gz ~/.cache/uv and share the file.

Q: Do I need Docker?
A: No. Pure CLI is faster and lighter. But we include Docker templates for teams that need them.

Q: Does this work outside Asia?
A: Yes! It auto-detects the fastest mirror. Works great in US/EU/Africa too.

Q: What if I already use Poetry/pipenv?
A: uv is compatible. You can migrate or use both. See uv migration guide.

Q: Can I use this in production?
A: Yes. Rippling, Snyk, Plotly already use uv in production. This adds convenience + regional optimization.

📖 See FAQ.md for complete Q&A (20+ questions answered)

🐳 See Docker Comparison for Docker vs flash-pkg


Ready to stop waiting?

Linux/macOS/WSL/Git Bash:

curl -sSL https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.sh | bash

Windows PowerShell:

irm https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.ps1 | iex

Windows CMD:

powershell -Command "irm https://raw.githubusercontent.com/Yogesh1290/flash-pkg/main/install.ps1 | iex"

🚀

About

Lightning-fast package management

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages