starship/starship
By the numbers
Data collected on 2026-04-30 from git rev-parse HEAD = 6a2096608ecafe76a0b87a6f876e4f786b2157f5.
Size
xychart-beta horizontal
title "Lines by language (top categories)"
x-axis ["Markdown (docs+repo)", "Rust (src/)", "JSON (schemas, etc.)", "Shell (init scripts)", "TOML"]
y-axis "Lines of code" 0 --> 160000
bar [156982, 50370, 17076, 854, 2540]| Category | Files | Lines |
|---|---|---|
Rust source under src/ |
244 | 50,370 |
Per-module Rust files (src/modules/*.rs) |
99 | ~24,800 |
Per-module config Rust files (src/configs/*.rs) |
109 | 4,516 |
Top-level Rust files (src/*.rs) |
11 | 5,574 |
Shell init scripts (src/init/starship.*) |
10 | 854 |
Markdown docs (excludes node_modules) |
many | 156,982 (mostly translations under docs/<locale>/) |
TOML configs (incl. Cargo.toml, presets, manifests) |
17 | 2,540 |
| YAML files (CI, codecov, crowdin, β¦) | 12 | small |
Generated .github/config-schema.json |
1 | ~5,800 |
The largest single source files are all individual modules:
| File | Lines |
|---|---|
src/modules/git_status.rs |
2,299 |
src/modules/directory.rs |
1,909 |
src/modules/package.rs |
1,710 |
src/modules/kubernetes.rs |
1,642 |
src/modules/aws.rs |
1,295 |
src/modules/rust.rs |
953 |
src/modules/status.rs |
887 |
src/modules/git_metrics.rs |
883 |
src/modules/custom.rs |
822 |
The smallest are stubs like src/modules/line_break.rs (16 lines) and src/configs/line_break.rs (10 lines).
Module count
| Count | What |
|---|---|
| 100 | Entries in ALL_MODULES (src/module.rs) |
| 99 | Module files in src/modules/ (excluding mod.rs, utils/) |
| 109 | Config files in src/configs/ |
| 12 | Built-in presets in docs/public/presets/toml/ |
| 10 | Supported shells (Bash, Zsh, Fish, PowerShell, Cmd, Nushell, Elvish, Ion, Tcsh, Xonsh) |
Why are there more configs than modules? Some configs cover the multi-language modules (c and cc, vlang config in v.rs, golang config in go.rs, rlang config in rlang.rs), and some are split out for shared structures.
Activity
| Window | Commits |
|---|---|
| All time (since 2019-04-01) | 4,236 |
| Last 90 days | 131 |
Top files by churn in the last 90 days:
| File | Commits |
|---|---|
Cargo.lock |
72 |
Cargo.toml |
67 |
.github/workflows/spell-check.yml |
11 |
.github/workflows/release.yml |
11 |
docs/package-lock.json |
10 |
docs/config/README.md |
9 |
.github/workflows/format-workflow.yml |
7 |
.github/config-schema.json |
6 |
.github/workflows/publish-docs.yml |
5 |
src/context.rs |
3 |
src/print.rs |
2 |
src/modules/git_status.rs |
2 |
Most churn comes from automated dependency updates (Renovate touching Cargo.lock and Cargo.toml) and CI workflow tuning. Source code outside dependency updates is changed selectively.
Bot-attributed commits
These author identities account for substantial portions of the history:
| Author | Commits | Share of all commits |
|---|---|---|
renovate[bot] |
1,308 | 30.9% |
dependabot[bot] |
322 | 7.6% |
dependabot-preview[bot] (legacy) |
283 | 6.7% |
allcontributors[bot] |
83 | 2.0% |
github-actions[bot] |
41 | 1.0% |
Total bot-author commits: ~2,037 / 4,236 = 48.1% of commits in git history.
This counts only commits where the author is a bot. AI-assisted edits (Copilot, Claude) by human authors leave no signal in git history. There are also 882 commits with a Co-authored-by trailer (mostly Renovate and Dependabot grouping).
Complexity
Average lines per Rust file in src/modules/ is approximately 250. The distribution is heavily right-skewed: a handful of huge modules (git_status, directory, package) and many small ones (most toolchain modules sit at 100-300 lines).
The deepest import chains are inside the formatter (src/formatter/string_formatter.rs) and the directory module (src/modules/directory.rs), both of which use a fair amount of internal helper modules.
TODOs in source
grep -rn 'TODO\|FIXME\|HACK' over src/ finds 16 occurrences. Notable themes:
- Git modules waiting on
gixfeatures: sparse-index trees, staged-change detection, reftables (src/modules/git_metrics.rs,src/modules/git_status.rs,src/modules/git_state.rs). - Cleanup hinges on a future starship 2.0: deprecated kubernetes alias keys (
src/modules/kubernetes.rs), Fennel config alias (src/configs/fennel.rs). - Standard-library readiness:
recv_deadlineonce stable (src/context.rs).
See Cleanup opportunities for the full list.
Test surface
Almost every module has its own #[cfg(test)] mod tests { ... } block at the bottom of its .rs file. Test code is interleaved with production code in the same file (Rust convention), so the line counts above include tests.
Tests that need real binaries on PATH (hg, git, real package managers) are gated behind #[ignore] and CI runs them with cargo test --include-ignored.
Bus factor
Top human contributors over the lifetime of the project (excluding bots):
| Author | Commits |
|---|---|
| Matan Kushner | 623 |
| David Knaack | 317 |
| Thomas O'Donnell | 127 |
| Kevin Song | 60 |
| Dario VladoviΔ | 44 |
| Shu Kutsuzawa | 32 |
| Zhenhui Xie | 23 |
In the last 90 days, the same names dominate human contributions, with David Knaack and Shu Kutsuzawa most active. The project is community-driven; no single person carries a high percentage of recent work.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.