sharkdp/fd
By the numbers
Data collected on 2026-04-30 against commit 2250bb0. Counts come from git, wc -l, and Cargo.toml.
Size
The codebase is small and overwhelmingly Rust.
xychart-beta horizontal
title "Lines of code by area"
x-axis ["src/walk.rs", "src/cli.rs", "src/main.rs", "src/exec/", "src/fmt/", "src/filter/", "tests/tests.rs"]
y-axis "Lines" 0 --> 3000
bar [738, 953, 536, 652, 368, 561, 2803]| Area | Files | Lines |
|---|---|---|
src/ (Rust source, excluding tests) |
21 .rs files |
~4,780 |
tests/tests.rs (integration tests) |
1 | 2,803 |
tests/testenv/mod.rs (test harness) |
1 | 344 |
Cargo.toml |
1 | ~100 |
Makefile |
1 | 56 |
doc/fd.1 (groff man page) |
1 | ~600 |
CHANGELOG.md |
1 | 861 |
README.md |
1 | ~700 |
The biggest single file is tests/tests.rs at 2,803 lines. The biggest production module is src/cli.rs at 953 lines (the entire clap definition lives there). After that the largest source files are src/walk.rs (738) and src/exec/mod.rs (473).
Activity
| Metric | Value |
|---|---|
| Total commits | 1,894 |
| First commit | 2145973 — Initial commit, 2017-05-09 |
| Latest commit (at snapshot) | 2250bb0 — Merge pull request #1980 …, 2026-04-24 |
| Commits in the last 12 months | ~480 |
| Unique authors (all time) | 230 |
| Unique authors in the last 12 months | 31 |
| Tags / releases shipped | 60+ (see git tag) |
| Latest release | 10.4.2 (declared in Cargo.toml) |
Bot-attributed commits
git log --all --pretty=format:"%H %s%n%b" \
| grep -ciE "co-authored-by:.*(bot|dependabot|github-actions|copilot|factory-droid)"Returns 8 commits with bot or AI co-authorship trailers. Of those:
- 7 carry
Co-authored-by: dependabot[bot] - 1 carries
Co-authored-by: Copilot <…@users.noreply.github.com> - 2 unrelated lines mention Anthropic Claude in commit bodies (older PR descriptions)
Among first-author commits, dependabot[bot] accounts for 230 of 1,894 commits (≈12%) — the only bot in fd's commit history. This is a lower bound for AI-assisted work because IDE-integrated assistants leave no git trace.
Churn hotspots (last 90 days)
The most touched files in the most recent 90-day window are:
| File | Recent commits | What changed |
|---|---|---|
src/cli.rs |
many | Several flag/UX fixes (path-separator pattern detection, --ignore-parent, ...) |
src/main.rs |
many | Argument validation, --full-path handling |
tests/tests.rs |
many | Tests added alongside almost every behavioural change |
CHANGELOG.md |
regular | Updated by every contributor (per CONTRIBUTING.md) |
.github/workflows/CICD.yml |
several | Action version bumps via dependabot |
Cargo.lock / Cargo.toml |
regular | Dependency bumps |
Complexity snapshot
| Module / dir | Files | Lines | Notes |
|---|---|---|---|
src/cli.rs |
1 | 953 | Single file with clap derive + custom Exec parser. Heaviest doc-comment density in the project (long --help strings). |
src/walk.rs |
1 | 738 | Hot path: parallel walker, batching, receiver buffer. Has its own unit tests. |
src/main.rs |
1 | 536 | run, construct_config, extract_command, determine_ls_command, the DEFAULT_LS_COLORS constant. |
src/exec/ |
3 | 652 | mod.rs (473) + command.rs (115) + job.rs (64). |
src/fmt/ |
2 | 368 | mod.rs (281) + input.rs (87). Used by both --exec and --format. |
src/filter/ |
4 | 572 | size.rs (219) + time.rs (202) + owner.rs (140) + mod.rs (11). |
src/dir_entry.rs |
1 | 155 | Lazily computes metadata and color style. |
src/output.rs |
1 | 175 | Path printing with colors, hyperlinks, custom separators. |
src/regex_helper.rs |
1 | 105 | Smart-case + leading-dot detection. |
src/hyperlink.rs |
1 | 87 | OSC 8 URL builder. |
src/filesystem.rs |
1 | 156 | Cross-platform path helpers. |
src/error.rs |
1 | 3 | A single print_error function. |
The test-to-code ratio is unusually high: ~2,800 lines of integration tests for ~4,800 lines of production code, plus per-module #[cfg(test)] mod tests blocks in every filter and helper module.
Dependency counts
From Cargo.toml:
| Kind | Count |
|---|---|
| Direct runtime dependencies | 18 (e.g. clap, regex, ignore, globset, crossbeam-channel, lscolors, nu-ansi-term, argmax, jiff, etcetera, normpath, aho-corasick, anyhow, ctrlc, faccess) |
| Optional features | 2 (use-jemalloc, completions) |
| Unix-only deps | 2 (nix, libc) |
| Selectively-targeted deps | 1 (tikv-jemallocator, gated by a long target-cfg list) |
| Dev dependencies | 4 (diff, tempfile, filetime, test-case) |
Test coverage signal
| Indicator | Value |
|---|---|
Integration tests (tests/tests.rs) |
2,803 lines |
| Inline unit-test modules | At least 6 (in walk.rs, regex_helper.rs, filesystem.rs, exit_codes.rs, exec/mod.rs, fmt/mod.rs, fmt/input.rs, filter/size.rs, filter/time.rs, filter/owner.rs, hyperlink.rs) |
| Custom test harness | tests/testenv/mod.rs (344 lines) builds the binary once and provides TestEnv::assert_output |
| CI matrix | Multiple targets per .github/workflows/CICD.yml, plus a separate MSRV job |
For a closer look at how tests are organised see how-to-contribute/testing.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.