lesshero

command module
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2026 License: MIT Imports: 19 Imported by: 0

README

Less Hero!

Less Hero explainer

Demo: https://kaihendry.github.io/lesshero/

Goal: Highlight efforts to reduce bloat

It's important for your health to watch your weight.

Same for code.

Aim of this project is to celebrate those who refactor and put code on a diet!

Install

With Go 1.27 or later installed:

go install github.com/kaihendry/lesshero@latest

Usage

lesshero -b will show source code additions over time in a chart in your browser.

Explicit usage:

lesshero /path/to/a/full/git/checkout > sloc.jsonl
lesshero -o chart.html sloc.jsonl

Exclude data files from the entire history:

lesshero -ignore all.json,static/all.json /path/to/a/full/git/checkout

Paths are exact, relative to the repository root, and separated by commas. Include previous names when a file has moved. The same exclusions apply to every commit, including additions, deletions, and renames. No files or Git history are changed. When reading existing JSONL, counts have already been computed; apply -ignore when generating the JSONL from the repository.

Docker
docker run -v $(pwd):/repo hendry/lesshero -o /repo/chart.html /repo

Create a SLOC chart via a GitHub action

First you need to enable Github Pages with the source of Github Actions.

The action accepts the same exclusions through its ignore input:

- uses: kaihendry/lesshero@main
  with:
    ignore: all.json,static/all.json

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址