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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vercel-doorman

v1.5.7

Published

Manage Vercel Firewall rules in code

Downloads

470

Readme

Vercel Doorman

NPM Version Typescript Support NPM Downloads GitHub issues GitHub pull requests Last Commit

A simple CLI tool for managing Vercel Firewall rules as code, enabling version control and automated deployment of your project's security configuration.

Features

  • 🔒 Manage Firewall Rules: Create, update, and delete Vercel Firewall rules using a simple configuration file
  • 🔄 Sync Rules: Easily sync rules between your configuration file and Vercel
  • ⬇️ Download Rules: Import existing firewall rules from your Vercel project
  • Validation: Built-in configuration validation to prevent errors
  • 📋 List Rules: View current firewall rules in table or JSON format
  • 🚀 CI/CD Integration: Automate firewall rule management in your deployment pipeline

Installation

npm install vercel-doorman
# or
yarn add vercel-doorman
# or
pnpm add vercel-doorman

Configuration

Create a vercel-firewall.config.json file in your project root. The configuration file supports JSON Schema for enhanced IDE features like autocompletion and validation:

{
  "$schema": "https://doorman.griffen.codes/schema.json",
  "projectId": "your-project-id",
  "teamId": "your-team-id",
  "rules": [],
  "ips": []
}

Adding new rules

To get started with adding new rules to your configuration file

Usage

First, create a Vercel API Token with appropriate permissions.

Available Commands

List Rules

vercel-doorman list [configVersion] --token YOUR_TOKEN

Lists firewall rules, either the current active configuration or a specific version.

Options:

  • configVersion: Optional version number to fetch a specific configuration version
  • --projectId, -p: Vercel Project ID
  • --teamId, -t: Vercel Team ID
  • --token: Vercel API token
  • --format, -f: Output format (json or table, defaults to table)

Examples:

# List current active rules
vercel-doorman list

# List rules from a specific version
vercel-doorman list 1

# List specific version in JSON format
vercel-doorman list 2 --format json

Sync Rules

vercel-doorman sync --token YOUR_TOKEN

Options:

  • --config, -c: Path to config file (defaults to vercel-firewall.config.json)
  • --projectId, -p: Vercel Project ID (can be set in config file)
  • --teamId, -t: Vercel Team ID (can be set in config file)
  • --token: Vercel API token

Download Remote Rules

vercel-doorman download [configVersion] --token YOUR_TOKEN

Downloads firewall rules from your Vercel project and updates your local configuration file. You can download either the current active configuration or a specific version. Includes a confirmation prompt before making changes.

Options:

  • configVersion: Optional version number to download a specific configuration version
  • --config, -c: Path to config file (defaults to vercel-firewall.config.json)
  • --projectId, -p: Vercel Project ID (can be set in config file)
  • --teamId, -t: Vercel Team ID (can be set in config file)
  • --token: Vercel API token
  • --dry-run, -d: Preview changes without modifying the config file

Example workflows:

# Download latest configuration
# First, preview the rules
vercel-doorman download --dry-run

# Then download and update the config
vercel-doorman download

# Download specific version
# First, preview the rules from version 1
vercel-doorman download 1 --dry-run

# Then download version 1 and update the config
vercel-doorman download 1

Add Template Rule

vercel-doorman template [templateName]

Adds a predefined rule template to your configuration file. If no templateName argument is provided, a list of available templates will be displayed instead.

Learn more about Vercel's Firewall templates here.

Options:

  • templateName: Name of the template to add

Example:

# Select a template to add
vercel-doorman template

# Block traffic to Wordpress URLs
vercel-doorman template wordpress

# Block traffic from AI Bots
vercel-doorman template ai-bots

Validate Configuration

vercel-doorman validate

Options:

  • --config, -c: Path to config file (defaults to vercel-firewall.config.json)
  • --verbose, -v: Show detailed validation results

Environment Variables

Instead of passing command-line arguments, you can set these environment variables:

  • VERCEL_TOKEN: Your Vercel API token
  • VERCEL_PROJECT_ID: Your Vercel project ID
  • VERCEL_TEAM_ID: Your Vercel team ID

Contributing

Contributions are welcome!

Project Stats

Alt

License

This project is licensed under the MIT License - see the LICENSE file for details.