A powerful Rust CLI tool for managing Vercel and Next.js development workflows through an interactive collection of reusable scripts.
brew install wyattjoh/stable/vercel-scripts- Interactive Script Selection - Choose which scripts to run with checkboxes
- Smart Dependencies - Scripts automatically run in the correct order based on dependencies
- Persistent Configuration - Remembers your selections and arguments between runs
- Environment Variables - Script arguments are passed as environment variables
- Replay Mode - Re-run your last selection with
vss --replay - Git Worktree Support - Seamlessly work with multiple Git worktrees
- Rust (for building from source)
- next-dev-utilities
- jq - for JSON processing in scripts
- git - for worktree functionality
The tool provides an interactive interface to select and execute development scripts. Your selections and arguments are persisted for future runs.
Commands:
vss- Interactive script selectorvss --replay- Re-run the last selection without promptsvss --help- Show help information
The tool creates configuration files to persist your settings:
~/.vss-global.json- Global user arguments (persisted in tool directory).vss-app.json- Per-project selections and options (created in working directory)
Create a bash script in the src/scripts/ directory with metadata annotations:
#!/usr/bin/env zsh
# @vercel.name Your Script Name
# @vercel.description What this script does
# @vercel.arg VARIABLE_NAME Description of required argument
# @vercel.opt { "name": "OPTION_NAME", "description": "Optional setting", "type": "boolean", "default": false }
# @vercel.after ./dependency_script.sh
# Your script logic hereMake it executable: chmod +x src/scripts/your_script.sh
The tool includes the following pre-configured scripts:
Build the Next.js project
Required Arguments:
VERCEL_NEXT_DIRECTORY: The directory for the vercel/next.js repo
Optional Parameters:
VERCEL_NEXT_WORKTREE: Select Next.js worktree to build (default: null)
Build the vercel CLI
Required Arguments:
VERCEL_VERCEL_DIRECTORY: The directory for the vercel/vercel repo
Install the local Next.js package as the project's dependency
Required Arguments:
VERCEL_NEXT_DIRECTORY: The directory for the vercel/next.js repo
Dependencies: Runs after ./build_next.sh
Package the Next.js project
Required Arguments:
NEXT_DEV_UTILS_DIRECTORY: The directory for the wyattjoh/next-dev-utils repo
Dependencies: Runs after ./build_next.sh
Build the project for local testing (not deployment).
Dependencies: Runs after ./link_local_next.sh
Build the project for deployment.
Required Arguments:
VERCEL_VERCEL_DIRECTORY: The directory for the vercel/vercel repo
Optional Parameters:
VERCEL_BUILD_PRODUCTION: Build the project in production mode (default: false)
Dependencies: Runs after ./package_next.sh, ./package_vercel.sh, ./link_next.sh
Start the project for local testing (not deployment).
Dependencies: Runs after ./build_local_project.sh
Deploy the project using the prebuilt build.
Required Arguments:
VERCEL_VERCEL_DIRECTORY: The directory for the vercel/vercel repo
Optional Parameters:
VERCEL_BUILD_PRODUCTION: Build the project in production mode (default: false)
Dependencies: Runs after ./build_project.sh
To contribute or modify the CLI:
# Clone the repository
git clone https://github.com/wyattjoh/vercel-scripts.git
cd vercel-scripts
# Run in development
cargo run
# Build release binary
cargo build --release
# Run tests
cargo test
# Format code
cargo fmt
# Lint code
cargo clippyThe CLI reads @vercel.* annotations from all scripts in the src/scripts/ directory and builds comprehensive documentation including dependencies, arguments, and options.
MIT License - see LICENSE file for details.