
Security News
rv Is a New Rust-Powered Ruby Version Manager Inspired by Python's uv
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
butter-code-health
Advanced tools
Global Node.js CLI for code health analysis with browser dashboard
A global Node.js CLI tool that analyzes code health in TypeScript/JavaScript projects and provides a beautiful browser-based dashboard for visualizing static analysis results.
Install globally:
npm install -g butter-code-health
Or run directly with npx:
npx butter-code-health dashboard
Launch an interactive dashboard to explore your code health:
# Basic dashboard
code-health dashboard
# With file watching and auto-refresh
code-health dashboard --watch
# Auto-open browser
code-health dashboard --open
Run a one-time analysis and view results:
code-health analyze
# With custom directory
code-health analyze --cwd /path/to/project
Output analysis results to stdout:
# Text format (default)
code-health print
# JSON format for CI/CD pipelines
code-health print --format json
# Fails with exit code 1 if thresholds exceeded
code-health print --max-lines 300 --complexity-threshold 10
--cwd <path>
- Set root directory for analysis (default: current directory)--include <glob,glob>
- Include specific file patterns--exclude <glob,glob>
- Exclude specific file patterns--no-gitignore
- Don't use .gitignore for exclusions--port <number>
- Dashboard server port (default: 43110)--open
- Auto-open browser when server starts--max-lines <n>
- Max lines per file (default: 400)--max-lines-per-function <n>
- Max lines per function (default: 80)--complexity-threshold <n>
- Cognitive complexity threshold (default: 15)The tool includes an MCP server for AI assistant integration. Add to your .mcp.json
:
{
"mcpServers": {
"code-health": {
"command": "npx",
"args": ["butter-code-health@latest", "code-health-mcp"],
"env": {
"CODE_HEALTH_AUTO_START": "true",
"CODE_HEALTH_PORT": "3020"
}
}
}
}
This allows AI assistants to analyze your code health directly.
The browser dashboard provides:
The tool automatically ignores:
node_modules/
.git/
dist/
, build/
, .next/
)Plus anything in your .gitignore
(unless --no-gitignore
is used).
Automatically detects and analyzes:
package.json
)pnpm-workspace.yaml
)apps/*
, packages/*
)While the tool works with zero configuration, it respects existing project configs:
.gitignore
for file exclusionscd /path/to/monorepo
npx butter-code-health dashboard --watch --open
# In your CI pipeline
npx butter-code-health print --format json > code-health.json
# Or fail on violations
npx butter-code-health print --max-lines 500 --complexity-threshold 20
# Analyze specific directories
code-health analyze --include "src/**/*.ts" --exclude "**/*.test.ts"
# Override thresholds
code-health dashboard --max-lines 600 --max-lines-per-function 100
This tool can be used as an MCP server, making it available to AI assistants like Claude Code for automatic code analysis.
Install globally:
npm install -g butter-code-health
Add to your .mcp.json
file in your project root:
{
"mcpServers": {
"code-health": {
"command": "code-health-mcp",
"args": []
}
}
}
Or use with npx (if not installed globally):
{
"mcpServers": {
"code-health": {
"command": "npx",
"args": ["butter-code-health", "code-health-mcp"]
}
}
}
Once configured, the following tools are available to AI assistants:
code_health_analyze
: Run comprehensive code health analysiscode_health_dashboard
: Start the dashboard server with browser UIcode_health_stop_dashboard
: Stop the running dashboard servercode_health_summary
: Get a quick summary of code health metricsAI assistants can now run commands like:
The dashboard will be automatically available at http://localhost:43110
when started via MCP.
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
Global Node.js CLI for code health analysis with browser dashboard
The npm package butter-code-health receives a total of 23 weekly downloads. As such, butter-code-health popularity was classified as not popular.
We found that butter-code-health demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.
Security News
AGENTS.md is a fast-growing open format giving AI coding agents a shared, predictable way to understand project setup, style, and workflows.