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.
- 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.
# Clone the repository
git clone https://github.com/anjaniux/vercel-deployment-fetcher.git
cd vercel-deployment-fetcher
# Install dependencies
npm installCreate a .env file in the project root and add your Vercel API Token and Deployment ID:
VERCEL_TOKEN=your_vercel_token
DEPLOYMENT_ID=your_deployment_idnode index.jsOnce executed, all files will be restored inside the deployment/ directory.
Ensure your Vercel Token has the necessary permissions. Generate a new token from Vercel's dashboard.
Check that the Deployment ID is correct. You can find it in the Vercel dashboard under your deployment's details.
Contributions are welcome! Feel free to fork this repo, submit issues, or open PRs.
This project is licensed under the MIT License.