WhenLabs/When
A unified developer toolkit for AI-assisted workflows. Task timing, doc drift detection, env validation, secret scanning, port conflict resolution, AI context generation, and license auditing — one MCP server, one install.
README
@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.
Five tools (stale, envalid, berth, aware, vow) have CLI scan modes and run on a schedule. Velocity is the sixth tool — it is always-on and embedded (SQLite-backed), so it does not have a CLI scan mode and does not appear in doctor/watch/init/ci output.
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-mcpregistrations (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:
| Tool | Interval | Status line |
|---|---|---|
| berth | 15 min | ports:N — port conflicts found |
| stale | 30 min | stale:N — docs drifted from code |
| envalid | 30 min | env:N — .env validation issues |
| vow | 60 min | lic:N? — unknown licenses found |
| aware | 60 min | aware: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 Tool | What it does |
|---|---|
velocity_start_task |
Start timing a coding task |
velocity_end_task |
End timing and record results |
velocity_estimate |
Estimate time for a planned task |
velocity_stats |
Show aggregate performance stats with insights |
velocity_history |
Show task history |
stale_scan |
Detect documentation drift |
stale_fix |
Auto-fix documentation drift (wrong paths, dead links, phantom env vars) |
stale_auto_fix |
Scan + auto-fix drift in one call |
envalid_validate |
Validate .env files against schemas |
envalid_detect |
Find undocumented env vars in codebase |
envalid_generate_schema |
Generate .env.schema from code analysis |
envalid_auto_fix |
Detect undocumented vars + auto-generate schema entries |
berth_status |
Show active ports and conflicts |
berth_check |
Scan project for port conflicts |
berth_resolve |
Auto-resolve port conflicts (kill or reassign) |
berth_auto_resolve |
Check + auto-resolve conflicts in one call |
aware_init |
Auto-detect stack, generate AI context files |
aware_doctor |
Diagnose project health and config issues |
aware_auto_sync |
Diagnose + auto-sync stale AI context files |
vow_scan |
Scan and summarize dependency licenses |
vow_check |
Validate licenses against policy |
vow_hook_install |
Install pre-commit license check hook |
This table shows a highlights subset. Run
when <tool> --helpfor all available commands per tool.
Cross-tool Intelligence
Tools automatically suggest follow-up actions when they detect issues relevant to other tools. For example, aware_init triggers a stale_scan when it generates new files, and envalid_detect suggests berth_register when it finds service URL env vars. These cascading suggestions surface as "Tip:" lines in tool output.
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 — bootstrap configs, run all tools, auto-fix
when config # Show unified .whenlabs.yml config
when config init # Generate .whenlabs.yml from existing tool configs
when config validate # Validate config structure
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 fully onboard any project:
- Bootstrap — creates
.env.schema,.vow.json,.stale.yml, and registers berth ports based on your project - Scan — runs all 5 CLI tools in parallel
- Auto-fix — automatically fixes stale drift if detected
- Config — generates a unified
.whenlabs.ymlfrom the bootstrapped configs
when config
Manage the unified .whenlabs.yml project config. All six tools read their settings from this single file instead of separate config files. Subcommands: init (generate from existing configs), validate (check structure).
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 CLI 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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。