{"_id":"@dutch.casa/mete-rs","_rev":"3-b3173586ce533c69a660c78bc0ca8c14","name":"@dutch.casa/mete-rs","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@dutch.casa/mete-rs","version":"0.1.0","keywords":["metrics","complexity","analysis","code-quality","cyclomatic","maintainability","static-analysis"],"license":"MIT","_id":"@dutch.casa/mete-rs@0.1.0","maintainers":[{"name":"dutch.casa","email":"caz.dutch@gmail.com"}],"homepage":"https://github.com/dutch-casa/mete.rs","bugs":{"url":"https://github.com/dutch-casa/mete.rs/issues"},"bin":{"mete":"bin.js"},"dist":{"shasum":"edd3350c227b26e73f243830e13fb42b8f0f3b01","tarball":"https://registry.npmjs.org/@dutch.casa/mete-rs/-/mete-rs-0.1.0.tgz","fileCount":3,"integrity":"sha512-7aMtzmhPpCQM+21FLhz3w3K/iTDgPrqlMklRbC1ch3wA0GWCa1SGTiRYbZgdvMxBOEyHIvbwNm+LTrDtxcEgOQ==","signatures":[{"sig":"MEYCIQCm3mRWc7qWcp3B+Bgo3l3lCIDTzXRwerbd8sslsrwHKgIhAKh1nSNcKgryjzlbr1TNHpfXBzBNYk+GJZ5Xl+4qBORG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3008},"engines":{"node":">=16"},"gitHead":"2876d6df5e91bc363dce52094caca71671d815e4","scripts":{"postinstall":"node install.js"},"_npmUser":{"name":"dutch.casa","email":"caz.dutch@gmail.com"},"repository":{"url":"git+https://github.com/dutch-casa/mete.rs.git","type":"git"},"_npmVersion":"11.6.2","description":"Structural metrics engine for code quality analysis","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mete-rs_0.1.0_1768804694473_0.6547282107744286","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@dutch.casa/mete-rs","version":"0.1.1","keywords":["metrics","complexity","analysis","code-quality","cyclomatic","maintainability","static-analysis"],"license":"MIT","_id":"@dutch.casa/mete-rs@0.1.1","maintainers":[{"name":"dutch.casa","email":"caz.dutch@gmail.com"}],"homepage":"https://github.com/dutch-casa/mete.rs","bugs":{"url":"https://github.com/dutch-casa/mete.rs/issues"},"bin":{"mete":"bin.js"},"dist":{"shasum":"1afe6f7522c4a3282ef8aac98b0c41f5268e368e","tarball":"https://registry.npmjs.org/@dutch.casa/mete-rs/-/mete-rs-0.1.1.tgz","fileCount":3,"integrity":"sha512-A+taahrpJSzdHdofRp91KpcgucxRCOkX2GVr73MvK8hIjUYJ1aeG0poPA6fONsWq/LQ1RZ4aguxrT3vbVIuBcQ==","signatures":[{"sig":"MEQCIGn9kJH+DnE5sm/4pXENzPu2N/+XONiftwQYIBliNRGHAiAYGJaWw0KA9AtxtltpeuT9JpSZA0+rvMpuaSLPrqF8eg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":3025},"engines":{"node":">=16"},"gitHead":"c71bf2be4ef7f7fb21c0c3480c20090766690e3c","scripts":{"postinstall":"node install.js"},"_npmUser":{"name":"dutch.casa","email":"caz.dutch@gmail.com"},"repository":{"url":"git+https://github.com/dutch-casa/mete.rs.git","type":"git"},"_npmVersion":"11.6.2","description":"Structural metrics engine for code quality analysis","directories":{},"_nodeVersion":"25.2.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mete-rs_0.1.1_1768808828509_0.8231165020855409","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@dutch.casa/mete-rs","version":"0.1.2","description":"Structural metrics engine for code quality analysis","license":"MIT","repository":{"type":"git","url":"git+https://github.com/dutch-casa/mete.rs.git"},"homepage":"https://github.com/dutch-casa/mete.rs","keywords":["metrics","complexity","analysis","code-quality","cyclomatic","maintainability","static-analysis"],"bin":{"mete":"bin.js"},"scripts":{"postinstall":"node install.js"},"engines":{"node":">=16"},"gitHead":"2daeef0383e402e1650e4c0a7e3b337e2b084530","_id":"@dutch.casa/mete-rs@0.1.2","bugs":{"url":"https://github.com/dutch-casa/mete.rs/issues"},"_nodeVersion":"25.2.1","_npmVersion":"11.6.2","dist":{"integrity":"sha512-qWB8p5/UHuX7kwbi4J5xx4ke3gsvTJKZ1dZFesaJZFCPc2Z2O0pWG8VRAQguiWb4TsE15w11TpwOVLFmBOq0Fg==","shasum":"c9a49ced1f12d02e8ca706c3283375f3f6487aa6","tarball":"https://registry.npmjs.org/@dutch.casa/mete-rs/-/mete-rs-0.1.2.tgz","fileCount":4,"unpackedSize":8334,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDEKzBdGqOMrX/9RaifqYR7TSlMZTcpmhTgF9FfxA5tJQIge9zADxBGZqWgoaO2irx78gMvgXIy+m5BZvNX+hRRnPE="}]},"_npmUser":{"name":"dutch.casa","email":"caz.dutch@gmail.com"},"directories":{},"maintainers":[{"name":"dutch.casa","email":"caz.dutch@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mete-rs_0.1.2_1768808892356_0.9355102126703458"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-19T06:38:14.399Z","modified":"2026-01-19T07:48:12.598Z","0.1.0":"2026-01-19T06:38:14.608Z","0.1.1":"2026-01-19T07:47:08.780Z","0.1.2":"2026-01-19T07:48:12.506Z"},"bugs":{"url":"https://github.com/dutch-casa/mete.rs/issues"},"license":"MIT","homepage":"https://github.com/dutch-casa/mete.rs","keywords":["metrics","complexity","analysis","code-quality","cyclomatic","maintainability","static-analysis"],"repository":{"type":"git","url":"git+https://github.com/dutch-casa/mete.rs.git"},"description":"Structural metrics engine for code quality analysis","maintainers":[{"name":"dutch.casa","email":"caz.dutch@gmail.com"}],"readme":"<p align=\"center\">\n  <img src=\"mete.rs-logo.png\" alt=\"mete.rs\" width=\"200\">\n</p>\n\n<h1 align=\"center\">mete</h1>\n\n<p align=\"center\">\n  <strong>Structural metrics engine for code quality analysis</strong>\n</p>\n\n<p align=\"center\">\n  <a href=\"https://crates.io/crates/mete\"><img src=\"https://img.shields.io/crates/v/mete.svg\" alt=\"Crates.io\"></a>\n  <a href=\"https://www.npmjs.com/package/@dutch.casa/mete-rs\"><img src=\"https://img.shields.io/npm/v/@dutch.casa/mete-rs.svg\" alt=\"npm\"></a>\n  <a href=\"https://github.com/dutch-casa/mete.rs\"><img src=\"https://img.shields.io/github/stars/dutch-casa/mete.rs?style=social\" alt=\"GitHub stars\"></a>\n  <a href=\"https://crates.io/crates/mete\"><img src=\"https://img.shields.io/crates/d/mete.svg\" alt=\"Crates.io downloads\"></a>\n  <a href=\"https://www.npmjs.com/package/@dutch.casa/mete-rs\"><img src=\"https://img.shields.io/npm/dm/@dutch.casa/mete-rs.svg\" alt=\"npm downloads\"></a>\n  <a href=\"https://github.com/dutch-casa/mete.rs/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/license-MIT-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#install-as-mcp-server\">MCP Server</a> |\n  <a href=\"#cli-usage\">CLI Usage</a> |\n  <a href=\"#metrics\">Metrics</a> |\n  <a href=\"#installation\">Installation</a>\n</p>\n\n---\n\n## What is mete?\n\nmete analyzes your codebase and reports structural quality metrics:\n\n- **Maintainability Index (MI)** - Overall code health score (0-100)\n- **Cyclomatic Complexity (CC)** - Number of independent paths through code\n- **Cognitive Complexity** - How hard code is to understand\n- **Nesting Depth** - Maximum control structure depth\n- **Code Duplication** - Repeated code blocks across files\n- **Structural Entropy** - Complexity distribution via Shannon entropy\n\nSupports: Rust, TypeScript, JavaScript, Python, Go, Java, C#, C++, Elixir\n\n---\n\n## Install as MCP Server\n\nmete works as an MCP (Model Context Protocol) server, giving AI assistants direct access to code quality analysis.\n\n### Claude Code\n\n```bash\nclaude mcp add mete -- mete mcp\n```\n\n### Cursor\n\n<a href=\"https://dutch-casa.github.io/mete.rs/cursor.html\">\n  <img src=\"https://img.shields.io/badge/Add_to-Cursor-000000?style=for-the-badge&logo=cursor&logoColor=white\" alt=\"Add to Cursor\">\n</a>\n\nOr manually add to `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"mete\": {\n      \"command\": \"mete\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\n### VS Code\n\nAdd to your VS Code MCP settings:\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"mete\": {\n        \"command\": \"mete\",\n        \"args\": [\"mcp\"]\n      }\n    }\n  }\n}\n```\n\n### OpenCode\n\nAdd to `~/.config/opencode/config.json`:\n\n```json\n{\n  \"mcp\": {\n    \"mete\": {\n      \"command\": \"mete\",\n      \"args\": [\"mcp\"]\n    }\n  }\n}\n```\n\n### MCP Tools Available\n\n| Tool | Description |\n|------|-------------|\n| `analyze` | File/directory quality metrics (MI, CC, cognitive complexity, depth) |\n| `targets` | AI-friendly refactoring suggestions sorted by priority |\n| `functions` | Function-level metrics with filtering by complexity/size/depth |\n| `duplicates` | Detect duplicate code blocks (exact and cross-file similar) |\n| `entropy` | Measure structural complexity distribution |\n\n---\n\n## Installation\n\n### From crates.io (Rust)\n\n```bash\ncargo install mete --features mcp\n```\n\n### From npm (Node.js)\n\n```bash\nnpm install -g @dutch.casa/mete-rs\n```\n\n### From source\n\n```bash\ngit clone https://github.com/dutch-casa/mete.rs\ncd mete.rs\ncargo install --path . --features mcp\n```\n\n---\n\n## CLI Usage\n\n### Analyze a file or directory\n\n```bash\nmete analyze src/\nmete analyze src/main.rs\n```\n\n### Find refactoring targets (AI-friendly)\n\n```bash\nmete targets src/ --limit 10\n```\n\n### Function-level metrics\n\n```bash\nmete functions src/ --complex    # Show only complex functions\nmete functions src/ --large      # Show only large functions (>50 LOC)\nmete functions src/ --deep       # Show only deeply nested functions\n```\n\n### Find duplicate code\n\n```bash\nmete duplicates src/\nmete duplicates src/ --cross-file --threshold 0.8\n```\n\n### Measure structural entropy\n\n```bash\nmete entropy src/\n```\n\n### Explain metrics\n\n```bash\nmete explain mi\nmete explain cc\nmete explain depth\n```\n\n---\n\n## Metrics\n\n### Maintainability Index (MI)\n\nMeasures code maintainability on a scale of 0-100. Higher is better.\n\n| Range | Rating |\n|-------|--------|\n| 85-100 | Excellent |\n| 65-84 | Good |\n| 50-64 | Moderate |\n| 0-49 | Poor |\n\n### Cyclomatic Complexity (CC)\n\nNumber of linearly independent paths through code. Lower is better.\n\n| Range | Rating |\n|-------|--------|\n| 1-5 | Simple |\n| 6-10 | Moderate |\n| 11-20 | Complex |\n| 21+ | Very Complex |\n\n### Nesting Depth\n\nMaximum depth of nested control structures. Lower is better.\n\n| Range | Rating |\n|-------|--------|\n| 1-2 | Flat |\n| 3-4 | Moderate |\n| 5-6 | Deep |\n| 7+ | Very Deep |\n\n---\n\n## Star History\n\n<a href=\"https://star-history.com/#dutch-casa/mete.rs&Date\">\n <picture>\n   <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://api.star-history.com/svg?repos=dutch-casa/mete.rs&type=Date&theme=dark\" />\n   <source media=\"(prefers-color-scheme: light)\" srcset=\"https://api.star-history.com/svg?repos=dutch-casa/mete.rs&type=Date\" />\n   <img alt=\"Star History Chart\" src=\"https://api.star-history.com/svg?repos=dutch-casa/mete.rs&type=Date\" />\n </picture>\n</a>\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}