← Catalog

lessloc

Keeps AI coding agents such as Claude Code, Codex, GitHub Copilot, Gemini CLI and Cursor to the least code that does the job and still works.

Package

Install

Install with PiG

pig install npm:lessloc

Install with Pi

pi install npm:lessloc
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "skills": [],
  "extensions": [
    "./pi/extension.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.10.0 (README.md). PiG does not review it.

lessloc: less lines of code

Your AI coding agent, without the bloat

Up to 36% less code and 26% lower cost, with the same results.

For Claude Code, Codex, OpenCode, GitHub Copilot, Gemini CLI, Cursor and many more.

npm version tests license: Apache-2.0

lessloc installs

Install in one sentence

Tell your coding agent:

Install lessloc for this project by following https://lessloc.org/install.md

Claude Code? Or type these in its prompt box:

/plugin marketplace add rextail-ai/lessloc
/plugin install lessloc@lessloc

To remove it: Remove lessloc by following https://lessloc.org/remove.md

On npm? Install it with the sentence above; your agent sets up the hooks.

Measured on real work

117 real changes in 3 open-source projects, judged by hidden tests: 27% less code, 23% lower cost, the same results

Less code and lower cost on every project: starlette, pydantic-settings and w3lib

Every task and the method

Same task, less code

starlette #3517: 13 lines without lessloc, 6 lines with lessloc, in both runs, and all four runs passed the hidden tests

What changes

  • Less code to review. It reuses what your project already has.
  • A smaller bill. Fewer tokens per task.
  • No junk. Placeholders, commented-out code and stray backup files are refused.
  • It finishes the job. If its own tests still fail at "done", it goes back to fix them.

Free and private

Open source (Apache-2.0). No account, no API key, no network calls, no dependencies.

Learn more

Getting started · How it works · Settings · Commits and CI · FAQ

Contributing · Security · Changelog · License