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

vercel-source-downloader

v3.0.1

Published

Download source code from Vercel deployments

Downloads

60

Readme

🚀 Vercel Source Downloader

Download source code from any Vercel deployment in seconds

npm version npm downloads License: MIT GitHub issues PRs Welcome

⚡ Quick Start

No installation needed! Just run:

npx vercel-source-downloader your-app.vercel.app

That's it! Your deployment source code will be downloaded to a local folder.

📦 View on npm | 🐙 View on GitHub

🎯 Why Use This?

Ever needed to:

  • 📦 Backup a deployment before making changes?
  • 🔍 Recover source code when local files are lost?
  • 🐛 Debug production by getting the exact deployed code?
  • 🚚 Migrate projects between accounts?
  • 📊 Audit what's actually deployed vs what's in git?

This tool makes it simple.

📸 Demo

$ npx vercel-source-downloader my-app.vercel.app

✔ Getting deployment id
✔ Loading source files tree
✔ Downloading ./my-app/components/ui/button.tsx
✔ Downloading ./my-app/app/page.tsx
✔ Downloading ./my-app/lib/utils.ts
... 

✓ Successfully downloaded source code to my-app
→ Total files: 116
→ Total directories: 23

🛠️ Setup

1️⃣ Get Your Vercel Token

  1. Visit Vercel Tokens
  2. Click "Create Token"
  3. Give it a name and copy the token

2️⃣ Set Your Token

Option A: Create a .env file (recommended)

VERCEL_TOKEN=your_token_here
VERCEL_TEAM=team_xxx  # Optional, for team deployments

Option B: Use environment variable

export VERCEL_TOKEN=your_token_here

Option C: Pass inline

VERCEL_TOKEN=your_token npx vercel-source-downloader app.vercel.app

3️⃣ Download Your Deployment

npx vercel-source-downloader your-app.vercel.app

📚 Usage Examples

Basic Download

# Download to folder named after the deployment
npx vercel-source-downloader my-app.vercel.app

Custom Destination

# Download to specific folder
npx vercel-source-downloader my-app.vercel.app ./backup-folder

Using Deployment ID

# From Vercel dashboard URL or API
npx vercel-source-downloader dpl_FhQJMKpXXXXXXXXXXXXXXXXX

Preview Deployments

# Download PR preview or branch deployment
npx vercel-source-downloader my-app-git-feature-xyz.vercel.app

Team Deployments

# Set team ID in .env or inline
VERCEL_TEAM=team_xxx npx vercel-source-downloader team-app.vercel.app

🎨 Features

| Feature | Description | |---------|-------------| | 🚀 No Install | Run directly with npx | | ⚡ Fast Downloads | Parallel file downloads | | 📁 Structure Preserved | Maintains exact folder structure | | 🔄 Skip Existing | Won't re-download existing files | | 📊 Progress Indicators | See download progress for each file | | 🎯 Smart Detection | Auto-detects deployment IDs vs URLs | | 👥 Team Support | Works with team deployments | | 🎨 Beautiful Output | Color-coded, clear feedback |

🚨 Troubleshooting

Make sure you've set your token:

echo "VERCEL_TOKEN=your_token_here" > .env
  • Check you have access to the deployment
  • For team deployments, set VERCEL_TEAM
  • Try using the deployment URL instead of ID
  • Ensure you're using the correct Vercel account token

Some deployments might not have source files. This tool downloads the /src directory from the deployment.

The tool downloads files in parallel, but large projects may take time. Check your internet connection.

🔒 Security Best Practices

  1. Never commit .env files - Add to .gitignore
  2. Use read-only tokens when possible
  3. Rotate tokens regularly
  4. Set token expiration in Vercel dashboard
  5. Use environment variables in CI/CD

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 License

MIT © William Kasel

🙏 Credits & Acknowledgments

This project was inspired by zehfernandes/get-vercel-source-code. While that repository provided the initial concept and approach, this is a complete rewrite with significant enhancements.

🆕 Key Improvements Over Original

This modern implementation includes:

  • ✨ NPX support for instant usage without installation
  • 🎨 Enhanced CLI with colored output and progress indicators
  • 📊 Better error handling and user feedback
  • 📁 Support for Vercel dashboard IDs
  • 📖 Comprehensive documentation
  • 🚀 Parallel downloads for improved speed
  • 👥 Team deployment support

Special thanks to Zeh Fernandes for the original concept that inspired this project.

📮 Support

⭐ Show Your Support

If this tool helped you, please consider giving it a star on GitHub!

GitHub stars