🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@whenlabs/when

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@whenlabs/when

The WhenLabs developer toolkit — 6 tools, one install

Source
npmnpm
Version
0.9.2
Version published
Weekly downloads
127
14.41%
Maintainers
1
Weekly downloads
 
Created
Source

@whenlabs/when

Six tools. One install.

A single installable toolkit that brings six WhenLabs developer tools into your Claude Code / AI coding agent workflow. Once installed, all tools are available as MCP tools in every session — Claude uses them automatically when relevant.

Install

npx @whenlabs/when install

This is a one-time setup. After install, all six tools are available in every project you open with Claude Code.

What it does

Running npx @whenlabs/when install will:

  • Register a single MCP server (whenlabs) in your Claude Code configuration — all six tools, including velocity, are served from one server
  • Inject CLAUDE.md instructions so Claude knows when to use each tool automatically — and prefers them over shell commands
  • Clean up any legacy velocity-mcp registrations (velocity is now bundled)

Once connected, Claude can call any tool directly without you asking. For example, after a refactor Claude might run stale_scan to check for doc drift, or before a release it might run vow_check to validate licenses.

Proactive Background Scans

Tools run automatically in the background on a schedule and report findings in the Claude Code status line:

ToolIntervalStatus line
berth15 minports:N — port conflicts found
stale30 minstale:N — docs drifted from code
envalid30 minenv:N — .env validation issues
vow60 minlic:N? — unknown licenses found
aware60 minaware:stale — AI context files outdated

Only problems are shown — if everything is clean, the status line stays uncluttered. When Claude sees an issue in the status line, it proactively tells you and offers to fix it.

MCP Tools

These tools are available to Claude in every session after install:

MCP ToolWhat it does
velocity_start_taskStart timing a coding task
velocity_end_taskEnd timing and record results
velocity_estimateEstimate time for a planned task
velocity_statsShow aggregate performance stats with insights
velocity_historyShow task history
stale_scanDetect documentation drift
stale_fixAuto-fix documentation drift (wrong paths, dead links, phantom env vars)
envalid_validateValidate .env files against schemas
envalid_detectFind undocumented env vars in codebase
envalid_generate_schemaGenerate .env.schema from code analysis
berth_statusShow active ports and conflicts
berth_checkScan project for port conflicts
berth_resolveAuto-resolve port conflicts (kill or reassign)
aware_initAuto-detect stack, generate AI context files
aware_doctorDiagnose project health and config issues
vow_scanScan and summarize dependency licenses
vow_checkValidate licenses against policy
vow_hook_installInstall pre-commit license check hook

Multi-Editor Support

Install MCP servers into other editors alongside Claude Code:

npx @whenlabs/when install --cursor     # Cursor
npx @whenlabs/when install --vscode     # VS Code
npx @whenlabs/when install --windsurf   # Windsurf
npx @whenlabs/when install --all        # All supported editors

Without flags, install targets Claude Code only.

CLI Usage

You can also run tools directly from the command line:

when init            # Onboard a project — detect stack, run all tools
when stale scan
when stale fix       # Auto-fix documentation drift
when envalid validate
when envalid detect --generate  # Generate schema from code
when berth status
when berth resolve   # Auto-resolve port conflicts
when aware init
when vow scan
when vow hook install  # Install pre-commit license hook
when status          # Show installation status
when doctor          # Run all tools, show unified health report
when doctor --watch  # Continuous monitoring dashboard
when watch           # Background daemon for status line
when ci              # Run checks for CI (exits 1 on issues)

when init

One command to onboard any project. Auto-detects your stack, runs all 5 tools in parallel, generates AI context files if missing, and shows a summary with next steps.

when doctor

Runs all 5 CLI tools against the current project and displays a unified health report card. Supports --json for machine-readable output and --watch for continuous monitoring with a live dashboard.

when watch

Background daemon that runs all 5 tools on intervals and writes results to ~/.whenlabs/status.json. Powers the Claude Code status line integration. Use --once for a single scan or --interval <seconds> to customize the schedule.

when ci

Runs stale, envalid, and vow checks — exits 1 if any tool finds issues. Designed for CI pipelines:

when ci --ci         # GitHub Actions annotations (::error file=X::message)
when ci --json       # Machine-readable JSON output

GitHub Action

- uses: WhenLabs-org/when@main
  with:
    checks: stale,envalid,vow

Uninstall

npx @whenlabs/when uninstall

Removes the MCP server and cleans up CLAUDE.md instructions.

License

MIT — see LICENSE

Built by Siddharth at WhenLabs

Keywords

whenlabs

FAQs

Package last updated on 15 Apr 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts