CodeHerderSearch⌘KRequest access →

Tracking codebase size

See how a workspace's or a single repo's production and test line counts trend over time, in the web app or from the CLI.

CodeHerder measures how big your codebase is: production lines, test lines, and how the two compare over time. You can see this for a whole workspace or for a single repo, in the web app or with the CLI. The CLI also reports comment and documentation lines, which the web app doesn’t chart.

The workspace view, on the Repos page

Open Repos in the sidebar, under Set up. A Codebase panel sits below the repo list. It adds up every repo your workspace can see, including repos inherited from a parent group.

With no repos registered, the page shows “No repos yet.” With repos but none measured, the Codebase panel says “No repo has been measured yet.” Measurements arrive on their own schedule (see How measurement works). Once one repo is measured, the full view appears.

The Totals section shows four tiles, each with a small trend line:

  • Production LOC: lines in your application code, with the file count and net change.
  • Test LOC: lines in your test code, shown the same way.
  • Test-to-production ratio: how much test code you have relative to production code.
  • Net change over range: the overall line count change, split into production and test.

The production and test tiles show the latest snapshot. The net changes, trend lines, ratio and Net change over range follow the range you pick.

The range control sits in the Totals section. Its presets are Rolling 24 hours, Rolling 7 days, Rolling 30 days, Rolling 90 days, Rolling 180 days and All time. The default is 30 days. All time covers the last 365 days, which is as far back as CodeHerder keeps this history. You can also set a custom From and To date. Custom dates are whole days in UTC. Dragging across the History chart narrows the range the same way.

Export CSV downloads the selected range as a spreadsheet, with one row per day: production lines, test lines, the ratio and whether the day was truncated. The button is disabled when no measurements are loaded for the range. If the range has none, the page says “No measurements for” followed by the range.

Below the tiles are two charts. History plots daily production and test line counts. Daily movement plots additions minus removals per day, so you can spot the days that changed the most code. Both charts show production and test lines only.

Where the lines live splits the latest snapshot by repo. The History section carries a “Snapshot” date for the most recent measurement. Each row links to its repo. A repo inherited from a group can lead to a page you can’t open (see Who can see this).

A repo’s own codebase sections

Open Set up → Repos, then click a repo. The codebase sections come after the Activity split panel. They are History, Daily movement and Where the lines live, and the “on this page” rail lists them. Before the first measurement, the page shows a single Codebase section instead.

A caption gives the branch CodeHerder measured, when it measured it, and how many days of history are on record. The tiles, range control, Export CSV button and charts work as they do for the workspace, scoped to this repo. Where the lines live splits the latest snapshot by area of the codebase instead of by repo.

An unmeasured repo reads “This repo hasn’t been measured yet.” A device measures it on its next sweep. Measurements don’t run on demand, so give it time.

Archiving a repo pauses measurement. A repo that was never measured stays unmeasured while archived. An archived repo with history keeps showing it, and restoring the repo resumes measurement.

From the command line

ch repo loc my-app

This prints the repo’s latest snapshot: the branch, the day, the commit and when it was measured. Next come the production, test, comment and documentation line counts, the test-to-production ratio, whether the day was truncated, and how many days of history are on record. A per-area breakdown follows, the same split as “Where the lines live” on the repo’s page. A repo with no measurement prints “never measured”.

Add --history for the daily series instead:

ch repo loc my-app --history --since 30d

This prints a short summary, then one row per measured day. Each row has the day’s counts for production, test, comment and documentation lines, the net change in each, the ratio, and whether the day was truncated. Days without a measurement get no row.

--since and --until bound the window. Without --since you get the last 365 days, and a --since older than that is rejected. Both commands take --json for machine-readable output.

Across your whole workspace

ch workspace loc rolls every repo in your workspace into one view. It shows the same figures as the Repos page, plus comment and documentation lines.

ch workspace loc

This shows how many repos are visible and how many are measured, then the combined totals and ratio. A breakdown per repo follows. At workspace scope, lines break down by repo, not by area.

Add --history for the daily series across every repo:

ch workspace loc --history --since 30d

The same 365-day limit applies. If a repo misses a day’s measurement, its last known value carries forward into that day’s total. One missed measurement doesn’t make your workspace total dip.

ch workspace loc uses your active workspace. Pass a workspace name or ID to check a different one.

How measurement works

A device measures a repo’s line counts at most once a day per repo. CodeHerder picks an online, enabled device that can run work and is linked to the repo’s workspace or a group above it. You don’t need to set anything up. The first measurement of a new repo can also fill in past days.

Some terms you may see:

  • Never measured means CodeHerder has no snapshot for this repo yet.
  • Not measured, next to a figure like comment or documentation lines, means that dimension wasn’t captured that day. It isn’t the same as a count of zero.
  • Truncated marks a day whose measurement hit a size cap partway through, so its counts are partial.

Who can see this

A repo’s own page, charts and ch repo loc need membership in the workspace that owns the repo, or in a group above it. The workspace view and ch workspace loc are open to any member of that workspace. They include repos inherited from a group, so a row can link to a repo page you can’t open.

Last updated

Try it on one repository for two weeks.

File a task. An agent builds it. A person reads every request. You see the cost of each task.

Try "pricing", "connect a device", or "who reviews the code"

↑↓ move · ↵ open · esc close