gptlint  by gptlint

LLM-powered linter for enforcing code best practices

Created 1 year ago
279 stars

Top 93.2% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

GPTLint is a code quality tool that leverages Large Language Models (LLMs) to enforce higher-level best practices beyond the capabilities of traditional AST-based linters like ESLint. It targets developers seeking to improve code quality by integrating LLM-driven analysis into their existing workflows, offering a novel approach to static analysis.

How It Works

GPTLint augments existing linters by using LLMs to analyze code for complex best practices that are difficult to capture with static analysis alone. Rules are defined in a simple markdown format, allowing for customization and the creation of project-specific rules. The tool supports various LLM providers and local models, features content-based caching for efficiency, and provides detailed LLM usage statistics per run.

Quick Start & Requirements

  • Install via npm: npm install -g gptlint
  • Requires an OpenAI API key by default. Supports other LLM providers and local models.
  • See docs for detailed setup.

Highlighted Details

  • Enforces higher-level best practices impossible with AST-based approaches.
  • Simple markdown format for rules with customization and override capabilities.
  • Supports major LLM providers and local models.
  • Augments ESLint, maintaining compatibility with existing workflows.

Maintenance & Community

  • Follow @transitive_bs on Twitter for updates.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and closed-source linking.

Limitations & Caveats

MVP rules are currently limited to JavaScript/TypeScript and single-file context. Autofixing is not yet supported.

Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by David Cournapeau David Cournapeau(Author of scikit-learn), Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), and
7 more.

repomix by yamadashy

0.6%
19k
CLI tool to pack codebases into AI-friendly formats for LLMs
Created 1 year ago
Updated 2 days ago
Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), Eric Zhu Eric Zhu(Coauthor of AutoGen; Research Scientist at Microsoft Research), and
41 more.

guidance by guidance-ai

0.1%
21k
Guidance is a programming paradigm for steering LLMs
Created 2 years ago
Updated 1 day ago
Feedback? Help us improve.