Custom Zero Config Deployment
Streamline your workflow with this auto, detecting, vercel, deployment. Includes structured workflows, validation checks, and reusable patterns for statusline.
Custom Zero Config Deployment
Auto-detecting Vercel deployment monitor that discovers credentials from CLI config and project files with zero manual setup required.
When to Use This Setting
Apply this setting when you need to:
- Monitor Vercel deployments without manually configuring any API tokens or project IDs
- Leverage existing Vercel CLI authentication stored on your system for automatic credential discovery
- Support cross-platform operation with auto-detection of config paths on macOS, Linux, and Windows Consider alternatives when:
- You have not installed or authenticated with the Vercel CLI and no credentials exist on your system
- You need to monitor a project different from the one configured in your local .vercel directory
Quick Start
Configuration
name: custom-zero-config-deployment type: setting category: statusline
Example Application
claude setting:apply custom-zero-config-deployment
Example Output
Setting applied. Changes:
- statusLine.type: command
- statusLine.command: bash zero-config-vercel inline
- auth_discovery: ~/Library/Application Support/com.vercel.cli/auth.json (macOS)
- project_discovery: .vercel/project.json
- fallback: VERCEL_TOKEN and VERCEL_PROJECT_ID env vars
- status_icons: ready(check), building(cycle), queued(hourglass), error(x)
Core Concepts
Zero Config Discovery Overview
| Aspect | Details |
|---|---|
| Token Discovery | Reads Vercel CLI auth token from platform-specific config directories |
| Project Discovery | Reads project ID from .vercel/project.json in the current working directory |
| Platform Support | macOS (Library/Application Support), Linux (~/.config/vercel), Windows (%APPDATA%/vercel) |
| Environment Fallback | Falls back to VERCEL_TOKEN and VERCEL_PROJECT_ID if auto-detection fails |
| Deployment Display | Shows state, truncated URL, time since deployment, and directory name |
Zero Config Architecture
+--------------------+ +---------------------+ +-------------------+
| Platform Detector |---->| Auth File Reader |---->| Project File Read |
| OSTYPE check | | platform-specific | | .vercel/project |
| macOS/Linux/Win | | auth.json path | | .json projectId |
+--------------------+ +---------------------+ +-------------------+
| | |
v v v
+----------------+ +-------------------+ +------------------+
| Env Fallback | | Vercel API Call | | Status Display |
| VERCEL_TOKEN | | /v6/deployments |------>| state+url+time |
| VERCEL_PROJ_ID | | Bearer auth | | +directory name |
+----------------+ +-------------------+ +------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| auth_file_override | string | "" | Manual path to Vercel auth.json, bypassing platform auto-detection |
| project_file_path | string | ".vercel/project.json" | Relative path to the Vercel project configuration file |
| url_truncate_length | integer | 20 | Maximum characters of the deployment URL to display |
| api_timeout | integer | 3 | Maximum seconds to wait for the Vercel API response |
| fallback_to_env | boolean | true | Enable fallback to environment variables when auto-detection fails |
Best Practices
- Authenticate the Vercel CLI first - Run
vercel loginonce on your system to create the auth.json file that zero-config discovery relies on. Without this file, the setting falls back to environment variables, defeating the zero-config purpose. - Link your project with vercel link - Run
vercel linkin your project directory to create the .vercel/project.json file that provides automatic project ID discovery. This one-time setup enables fully automatic monitoring. - Verify platform detection on WSL - If you use Windows Subsystem for Linux, the OSTYPE variable reports linux-gnu but Vercel CLI config may be in the Windows filesystem. Set auth_file_override to the correct WSL path if auto-detection finds the wrong location.
- Use URL truncation wisely - Vercel deployment URLs can be very long. The default 20-character truncation shows enough to identify the deployment without overflowing the statusline. Increase for more detail or decrease for tighter layouts.
- Secure your auth.json file - The Vercel auth token stored in auth.json has full API access. Ensure the file permissions are restricted to your user account with
chmod 600to prevent other system users from reading your credentials.
Common Issues
- Config missing warning displayed - Neither auto-detected credentials nor environment variables were found. Run
vercel loginandvercel linkto create the necessary configuration files for zero-config operation. - API error after OS upgrade - The Vercel CLI config directory may have moved after an operating system upgrade. Check the platform-specific path for your OS version and update auth_file_override if the default path changed.
- Wrong project being monitored - The .vercel/project.json in your directory may reference an old or different project. Run
vercel linkagain to re-associate your local directory with the correct Vercel project.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Project Standards Config
Claude Code settings preset that enforces consistent coding standards. Configures TypeScript strict mode, ESLint rules, Prettier formatting, and naming conventions.
Bedrock Configuration Blueprint
All-in-one setting covering configure, claude, code, amazon. Includes structured workflows, validation checks, and reusable patterns for api.
Refined Corporate Preset
Production-ready setting that handles configure, proxy, settings, corporate. Includes structured workflows, validation checks, and reusable patterns for api.