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-sdl

v0.1.0

Published

Download files from Vercel deployments

Readme

Vercel SDL (Source Downloader)

Deployed something to Vercel and later needed to grab the source files? Vercel's dashboard doesn't let you do that. vercel-sdl fixes that!

What it does

Browse your Vercel deployments interactively and download the source files. Simple as that.

Before you start: Get your Vercel token

You'll need a Vercel API token to use this tool. Here's what you need to know about token scoping before creating one:

Understanding token scope

Vercel lets you create tokens at different levels. Go to https://vercel.com/account/settings/tokens and you'll see options for:

  • Full Account Access works across all your personal projects AND all teams you're part of. Most flexible option if you work with multiple teams.
  • Personal Account Only only accesses your personal Vercel projects. Won't work for any team deployments.
  • Specific Team (eg. team-xyz) only accesses that one team's deployments. Won't work for your personal account or other teams.

[!IMPORTANT] If you create a token scoped to a specific team, you won't be able to access deployments from your personal Vercel account or other teams with that token. Choose based on what you need to download.

Creating the token

  1. Go to Vercel Token Creation page.
  2. Click "Create Token"
  3. Choose your scope (see above)
  4. Give it a name you'll remember
  5. Copy the token - you won't see it again

Keep that token safe. You'll need it for every command.

Installation

Now that you have your token, you can proceed to install:

Install globally:

npm install -g vercel-sdl

Or run directly with npx (no installation needed):

npx vercel-sdl --token YOUR_TOKEN

Development Setup

If you want to contribute or modify the code:

git clone <repository-url>
cd vercel-source-downloader
npm install
npm run build

Usage

vercel-sdl --token YOUR_TOKEN
# or with npx
npx vercel-sdl --token YOUR_TOKEN

This shows your recent deployments. Use arrow keys to browse through them - you'll see all the details (git info, status, timestamps) as you navigate. Hit Enter when you find the one you want.

Filtering deployments

# Only production deployments
vercel-sdl --token xxx --target production

# Only ready deployments
vercel-sdl --token xxx --state READY

# Specific project
vercel-sdl --token xxx --project prj_abc123

# Get more results
vercel-sdl --token xxx --limit 20

Team deployments

# By team ID
vercel-sdl --token xxx --team team_abc123

# By team slug
vercel-sdl --token xxx --slug my-team

How downloads work

When you select a deployment and choose to download:

  • Files go to ./downloads/{deployment-id}/
  • Downloads happen 5 at a time (API rate limit safety)
  • If some files fail, the rest keep going
  • You get a summary at the end

Progress bar shows what's happening in real-time.

Why this exists

Vercel's UI doesn't give you a way to download deployment source. Sometimes you need that - maybe for debugging production issues, recovering files, or just keeping local backups.

I kept the dependencies minimal (just minimist for args and prompts for the interactive UI). Everything else uses standard Node APIs.

Project structure

lib/
  types.ts              - TypeScript types from Vercel API spec
  vercel-api.ts         - API client wrapper
  formatter.ts          - Terminal output with colors
  interactive-selector.ts - Arrow-key navigation
  progress-display.ts   - Download progress bar
  file-downloader.ts    - Handles the actual downloads
  main.ts              - CLI entry point

Notes

  • File contents come back as base64 (so binary files work)
  • Progress percentage is accurate because we fetch the full file tree first
  • Concurrency is set to 5 based on testing - keeps things fast without hitting rate limits