An open API service indexing awesome lists of open source software.

https://github.com/anjaniux/vercel-deployment-fetcher

A simple Node.js script to fetch and download all files, directories, and serverless functions from a Vercel deployment.
https://github.com/anjaniux/vercel-deployment-fetcher

vercel vercel-api vercel-deployment

Last synced: 2 months ago
JSON representation

A simple Node.js script to fetch and download all files, directories, and serverless functions from a Vercel deployment.

Awesome Lists containing this project

README

          

# Vercel Deployment Fetcher

![GitHub stars](https://img.shields.io/github/stars/anjaniux/vercel-deployment-fetcher?style=for-the-badge)
![GitHub forks](https://img.shields.io/github/forks/anjaniux/vercel-deployment-fetcher?style=for-the-badge)
![GitHub issues](https://img.shields.io/github/issues/anjaniux/vercel-deployment-fetcher?style=for-the-badge)
![GitHub license](https://img.shields.io/github/license/anjaniux/vercel-deployment-fetcher?style=for-the-badge)

## πŸš€ About

**Vercel Deployment Fetcher** allows you to retrieve and restore all files from a Vercel deployment, even if you've lost them locally. Whether you're recovering lost work or need to inspect your deployed files, this script makes it easy.

### πŸ”₯ Features
- Fetches all files, directories, and serverless functions from a Vercel deployment.
- Automatically decodes base64-encoded content.
- Saves everything in a structured format.
- Works for **any Vercel user**β€”just provide your **Vercel Token** and **Deployment ID**.

## πŸ“¦ Installation

```sh
# Clone the repository
git clone https://github.com/anjaniux/vercel-deployment-fetcher.git
cd vercel-deployment-fetcher

# Install dependencies
npm install
```

## ⚑ Usage

### 1️⃣ Configure your credentials
Create a `.env` file in the project root and add your **Vercel API Token** and **Deployment ID**:

````ini
VERCEL_TOKEN=your_vercel_token
DEPLOYMENT_ID=your_deployment_id
````

### 2️⃣ Run the script

```sh
node index.js
```

Once executed, all files will be restored inside the `deployment/` directory.

## πŸ”§ Troubleshooting

### Getting `403 Forbidden`?
Ensure your **Vercel Token** has the necessary permissions. Generate a new token from [Vercel's dashboard](https://vercel.com/account/tokens).

### Deployment not found?
Check that the **Deployment ID** is correct. You can find it in the **Vercel dashboard** under your deployment's details.

## 🀝 Contributing
Contributions are welcome! Feel free to fork this repo, submit issues, or open PRs.

## πŸ“œ License
This project is licensed under the MIT License.