gptlint

gptlint

A linter with superpowers! 🔥 Use LLMs to enforce best practices across your codebase.

Stars: 171

Visit
 screenshot

GPTLint is a tool that utilizes Large Language Models (LLMs) to enforce higher-level best practices across a codebase. It offers features such as enforcing rules that are impossible with AST-based approaches, simple markdown format for rules, easy customization of rules, support for custom project-specific rules, content-based caching, and outputting LLM stats per run. GPTLint supports all major LLM providers and local models, augments ESLint instead of replacing it, and includes guidelines for creating custom rules. However, the MVP rules are currently limited to JS/TS only, single-file context only, and do not support autofixing.

README:

How it works

Use LLMs to enforce best practices across your codebase.

NPM Build Status MIT License Prettier Code Formatting Discuss on Twitter

GPTLint

A fundamentally new approach to code quality. Use LLMs to enforce higher-level best practices across your codebase in a way that takes traditional static analysis tools like eslint to the next level.

Features

  • ✅️ enforce higher-level best practices that are impossible with ast-based approaches
  • ✅️ simple markdown format for rules (example, spec)
  • ✅️ easy to disable or customize rules
  • ✅️ add custom, project-specific rules
  • ✅️ same cli and config format as eslint
  • ✅️ supports gptlint.config.js and inline overrides /* gptlint-disable */
  • ✅️ content-based caching
  • ✅️ outputs LLM stats per run (cost, tokens, etc)
  • ✅️ built-in rules are extensively tested w/ evals
  • ✅️ supports all major LLM providers and local models
  • ✅️ augments eslint instead of trying to replace it (we love eslint!)
  • ✅️ includes guidelines for creating your own rules
  • ❌ MVP rules are JS/TS only for now
  • ❌ MVP rules are single-file context only for now
  • ❌ MVP does not support autofixing for now

Demo

Here's a demo of gptlint running on its own codebase:

Check out our docs to get started.

How it works

How it works

Check out our docs on how it works to learn more.

Getting Started

Installation is simple, with the only external dependency required by default being an OpenAI API key.

Check out our docs to get started.

FAQ

Citations

@software{agentic2024gptlint,
  title  = {GPTLint},
  author = {Travis Fischer, Scott Silvi},
  year   = {2024},
  month  = {4},
  url    = {https://github.com/gptlint/gptlint}
}

Huge shoutout to Laurentiu Raducu for gifting us the NPM package name. 🙏

License

MIT © Travis Fischer

To stay up to date or learn more, follow @transitive_bs on Twitter.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for gptlint

Similar Open Source Tools

For similar tasks

For similar jobs