Skip to content

Automation Scripts & Environment Setup

PowerShell automation scripts in scripts/ configure GitHub repos, Vercel projects, GoDaddy subdomains, and search engine indexing in one pass.

Environment Variables (.env.example)

Copy .env.example to .env (gitignored) and load into your shell before running scripts:

# TANISH'S SETUP TOOLKIT · tanisheesh.in
# Copy to .env (gitignored) and fill in. The scripts read these as env vars.

# GitHub: github.com/settings/tokens → classic, `repo` scope
GITHUB_TOKEN=

# Vercel: vercel.com/account/tokens (or use local `vercel login` CLI auth)
VERCEL_TOKEN=
# Optional Vercel Team ID if project belongs to a team
VERCEL_TEAM_ID=

# Render: dashboard.render.com → Account → API Keys
RENDER_API_KEY=

# GoDaddy: developer.godaddy.com/keys → format KEY:SECRET (or use local gddy CLI)
GODADDY_KEY=

# Weekly maintenance report email (set as repo secrets by setup-github-repo.ps1)
# Gmail address that sends the report
MAIL_USERNAME=
# Gmail App Password: myaccount.google.com/apppasswords
MAIL_PASSWORD=
# Optional: override recipient email (repo variable REPORT_EMAIL)
REPORT_EMAIL=
# Optional: fine-grained PAT with read access to Dependabot, Code scanning, Secret scanning alerts
ALERTS_TOKEN=

# Custom Dependency Bot user account (replaces dependabot[bot] with custom avatar & Display Name)
# Create a dedicated GitHub account (e.g. username: tanisheesh-bot, Display Name: Dependabot [bot])
# Generate classic PAT on that account with `repo` + `workflow` scopes
BOT_TOKEN=

# Optional: BYOK AI PR review secrets (only needed if enabling ai-review.yml on private repos)
GEMINI_API_KEY=
ANTHROPIC_API_KEY=
OPENAI_API_KEY=

# Optional: Zenodo PAT (zenodo.org/account/settings/applications/tokens → deposit:actions + deposit:write)
# Enables automatic DOI minting in release.yml whenever a repo contains .zenodo.json
ZENODO_TOKEN=

# Optional: Search engine indexing automation (used by setup-search-indexing.ps1 & seo-ping.yml)
# IndexNow static key (32-char hex; served publicly at /indexnow-key.txt for Bing + ChatGPT Search)
INDEXNOW_KEY=
# Bing Webmaster Tools API key (bing.com/webmasters → Settings → API Access)
BING_WEBMASTER_API_KEY=
# Path to Google Cloud Service Account JSON key (added as Full User on sc-domain:tanisheesh.in)
GSC_SERVICE_ACCOUNT_JSON=

# Tanish Poddar · tanisheesh.in · github.com/tanisheesh · hi@tanisheesh.in

setup-github-repo.ps1

View full script on GitHub

# ╔══════════════════════════════════════════════════════════════════════╗
# ║  TANISH'S SETUP TOOLKIT                                              ║
# ║  The standard for every repo by Tanish Poddar · tanisheesh.in        ║
# ╚══════════════════════════════════════════════════════════════════════╝
#
# setup-github-repo.ps1
# Configures ONE GitHub repo:
#   • description, homepage URL, topics
#   • clean merge settings (squash-only, auto-delete branches, no wiki)
#   • Dependabot alerts + security updates + private vulnerability reporting
#   • Secret scanning + push protection (where supported by repo tier)
#   • Branch ruleset on default branch (ci required, no force-push/deletion)
#   • Standard repository labels (security, docs, tests, frontend, backend, etc.)
#   • Actions secrets (MAIL_USERNAME, MAIL_PASSWORD, ALERTS_TOKEN, optional AI keys)
#
# Usage:
#   .\setup-github-repo.ps1 -Repo "<repo-name>" `
#       -Description "<one-line description>" `
#       -Homepage "https://<subdomain>.tanisheesh.in" `
#       -Topics "nextjs","typescript","ai"

setup-search-indexing.ps1

View full script on GitHub

# ╔══════════════════════════════════════════════════════════════════════╗
# ║  TANISH'S SETUP TOOLKIT                                              ║
# ║  The standard for every repo by Tanish Poddar · tanisheesh.in        ║
# ╚══════════════════════════════════════════════════════════════════════╝
#
# setup-search-indexing.ps1
# Automates root-domain DNS TXT verification (GoDaddy) and search engine
# indexing (IndexNow for Bing/ChatGPT Search, Bing Webmaster API, and
# Google Search Console Sitemap API).
#
# Usage:
#   1. Add a DNS TXT verification record safely (preserves existing TXT records):
#      .\setup-search-indexing.ps1 -VerifyTxt "google-site-verification=..."
#   2. Submit a live site's sitemap & ping IndexNow:
#      .\setup-search-indexing.ps1 -SiteUrl "https://myapp.tanisheesh.in"

setup-subdomain.ps1

View full script on GitHub

# ╔══════════════════════════════════════════════════════════════════════╗
# ║  TANISH'S SETUP TOOLKIT                                              ║
# ║  The standard for every repo by Tanish Poddar · tanisheesh.in        ║
# ╚══════════════════════════════════════════════════════════════════════╝
#
# setup-subdomain.ps1
# Adds ONE <subdomain>.tanisheesh.in CNAME in GoDaddy (and attaches the
# custom domain on Vercel or Render automatically when those platforms are used).
#
# Usage:
#   Vercel:
#     .\setup-subdomain.ps1 -Subdomain "<prefix>" -Platform Vercel -VercelProject "<vercel-project-slug>"
#   Render:
#     .\setup-subdomain.ps1 -Subdomain "<prefix>" -Platform Render -RenderHost "<service>.onrender.com"
#   Railway:
#     .\setup-subdomain.ps1 -Subdomain "<prefix>" -Platform Railway -TargetHost "<app>.up.railway.app"
#   GitHub Pages:
#     .\setup-subdomain.ps1 -Subdomain "<prefix>" -Platform GitHubPages
#   Custom (Firebase App Hosting, etc.):
#     .\setup-subdomain.ps1 -Subdomain "<prefix>" -Platform Custom -TargetHost "<cname-target>"

setup-vercel-project.ps1

View full script on GitHub

# ╔══════════════════════════════════════════════════════════════════════╗
# ║  TANISH'S SETUP TOOLKIT                                              ║
# ║  The standard for every repo by Tanish Poddar · tanisheesh.in        ║
# ╚══════════════════════════════════════════════════════════════════════╝
#
# setup-vercel-project.ps1
# Applies project-tailored production & security settings to ONE Vercel
# project via PATCH /v9/projects/{project}:
#   • auto-detects framework & Node version (22.x / 24.x) from -RepoPath
#   • enforces directoryListing=false, protectedSourcemaps=true,
#     gitForkProtection=true, autoExposeSystemEnvs=true
#   • configures serverless region (default bom1), Fluid compute & timeout
#   • optionally ignores docs-only commits (docs/, *.md, .github/)
#
# Usage:
#   .\setup-vercel-project.ps1 -Project "<vercel-project-slug>" -RepoPath "..\my-app"
#   .\setup-vercel-project.ps1 -Project "<vercel-project-slug>" -Region "iad1" -IgnoreDocsOnlyBuilds