GP

goldziher/poly

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

20 stars 1 forks 质量 76 趋势 30MIT

通用零依赖的linter和formatter。一个纯Rust二进制(poly),正在处理中Lint和格式化约30种语言——ruff、oxc、biome、mago等——并设有树置层级......

概览

多边形lints和格式化整个仓库只需几秒钟:为重要语言策划Rust后端,其他语言有树状备份,还有十一个编码代理插件配置文件和MCP服务器,让代理直接驱动,无需额外付费。 lint + format ·一个poly.toml ·纯Rust,零deps ·blake3 缓存 + rayon 并行性 ·git 钩子和提交检查 ·MCP + 编码代理插件 两者都会检测平台,下载匹配的版本归档,并与sha256sums.txt进行验证。设置 POLY_VERSION=0.28.2 以固定一个精确的版本。 转发到 install.sh 并按版本和平台缓存已安装的二进制文件。完整的输入/输出参考见 ACTION_USAGE.md。 Homebrew的tap是一个单一滚动公式,目前还没有版本别名——把它当作获取最新通道,使用安装脚本或GitHub Action,如果置顶版本很重要。cargo binstall --git https://github.

概述(AI 翻译)

一个二进制。~30种语言。无需安装工具链。

多边形lints和格式化整个仓库只需几秒钟:为语言定制的Rust后端 最重要的是,其他所有内容都有一个树上临时备份,以及十一个编码代理插件配置文件和一个MCP 服务器上,所以客服可以直接驾驶,而不是自己掏钱。

lint + 格式 ·一个 poly.toml ·纯 Rust,零 deps ·blake3 缓存 + 人造丝并行 ·git 钩子与提交检查 ·MCP + 编码代理插件

安装 ·你得到什么 ·开箱即用 · AI代理与MCP ·性能 · 文档 ·贡献


你得到了什么

能力 功能
在真实仓库上快速运行 Lints Django 只需 0.82 秒,home assistant 的 25,000 个文件只需 3.5 秒,冷缓存;参见性能。
一个二进制文件,无工具链 为Python、JavaScript、TypeScript、JSX、TSX、JSON、YAML、TOML、Markdown、MDX、CSS、SCSS、Less、HTML、Vue、Svelte、Astro、Angular、XML、PHP、Ruby、SQL、GraphQL、Nix、HCL、Dockerfile、INI和.env编译的Rust后端。Go、Rust、Zig、Java、Kotlin、Swift、Dart、R、Gleam和shell安装时使用自己的工具链,其他工具链则由树置层覆盖。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。


What You Get

Capability What it does
Fast on real repos Lints Django in 0.82s and home-assistant’s 25,000 files in 3.5s, cold cache; see Performance.
One binary, no toolchain Compiled-in Rust backends for Python, JavaScript, TypeScript, JSX, TSX, JSON, YAML, TOML, Markdown, MDX, CSS, SCSS, Less, HTML, Vue, Svelte, Astro, Angular, XML, PHP, Ruby, SQL, GraphQL, Nix, HCL, Dockerfile, INI and .env. Go, Rust, Zig, Java, Kotlin, Swift, Dart, R, Gleam and shell use their own toolchain when it is installed, and a tree-sitter tier covers everything else. No Node, Python, or Ruby runtime needed. See the language table.
Built for agents Coding-agent plugin profiles and a stdio MCP server ship in the box — an agent calls poly’s tools directly instead of shelling out and parsing text. See AI Agents & MCP.
One config poly.toml drives linting, formatting, git hooks, and commit-message policy.
Cache + parallelism A blake3 content-hash cache skips unchanged work; rayon parallelizes the rest across cores.
Git hooks & commit checks poly hooks install wires lint, format, and Conventional-Commit checks into git — no external hook framework.
Two lint tiers on every language A code-quality metrics engine and a built-in 26-rule ast-grep pack (13 rules on by default) run on top of the backends above, at warning severity so they never redden an unconfigured CI.
Simple distribution Prebuilt binaries via a shell/PowerShell installer, a GitHub Action, Homebrew, Scoop, npm, and PyPI.
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "poly": { "command": "poly", "args": ["mcp"] } } }