# ed code-stats run

> ed code-stats run in the Edith ed command line reference. ed code-stats

- Canonical URL: https://getedith.pro/docs/cli/code-stats/run
- Updated: 2026-12-02

[`ed code-stats`](https://getedith.pro/docs/cli/code-stats)

[The `ed` command line](https://getedith.pro/docs/cli)

```bash
ed code-stats run [--wait] [--json]
```

Starts a refresh in the background agent, or joins the one already running, since only one refresh runs at a time. The refresh reads the profile of every account signed in to `gh`, lists the repositories each account can see, clones or fetches each one with the token of the account that listed it, counts your commits in parallel and stores a new report. The command refuses with exit code 4, and starts nothing, when the mirror folder is not chosen, missing, not writable or on a disconnected drive, or when `git` is missing. Without `--wait` the command returns the task id at once. `--wait` prints progress lines on stderr, then the outcome: `completed`, `cancelled`, `failed`, `storageUnavailable`, `volumeDisconnected` when the drive went away part way through, or `interrupted` when the background agent restarted during the refresh. `--json` prints that outcome as an object with the counts, the errors and a `github` field that is `null`, or names the `state` (`unavailable`, `signedOut` or `failed`) and a `summary` such as the `gh auth login` hint. The command exits 0 only when the refresh completed, and 1 for every other outcome. An empty identity list is filled from your GitHub accounts first.

## Get Edith

Edith is a native Mac app for macOS 14 or later on Apple silicon with 100+ extensions, the `ed` command line and an MCP server. $35 once for one Mac, plus $7 for each additional Mac, with no subscription and a 30-day refund.

- [Buy Edith](https://getedith.pro/pricing): $35 once for one Mac, plus $7 for each additional Mac
- [Download Edith](https://getedith.pro/download): the installer, or Homebrew
