# Vuex vs Pinia: source lines of code compared

The Vuex vs Pinia comparison on OctoCounts shows side-by-side source line counts for vuejs/vuex and vuejs/pinia, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-08-26, vuejs/vuex contains 4,905 total lines (3,396 code) across 116 files, while vuejs/pinia contains 24,630 total lines (19,125 code) across 157 files as of 2026-09-19. vuejs/pinia is about 5.6x the size of vuejs/vuex by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [vuejs/vuex](https://octocounts.com/github/vuejs/vuex) | [vuejs/pinia](https://octocounts.com/github/vuejs/pinia) |
| --- | ---: | ---: |
| Files | 116 | 157 |
| Total lines | 4,905 | 24,630 |
| Code lines | 3,396 | 19,125 |
| Comment lines | 632 | 2,841 |
| Blank lines | 877 | 2,664 |
| Languages counted | 7 | 10 |

Top languages in vuejs/vuex: JavaScript (77.7% of code), TypeScript (6.5% of code), CSS (4.7% of code). Top languages in vuejs/pinia: YAML (62.1% of code), TypeScript (33.1% of code), JSON (2.5% of code). JavaScript, TypeScript, JSON appear in both top language lists; CSS, HTML appear only in vuejs/vuex's top languages; YAML, Vue appear only in vuejs/pinia's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. vuejs/vuex was counted at ref main (commit bd907467b839) on 2026-08-26; vuejs/pinia was counted at ref f4e0cb7a8193f564c27f6527b3f954e114a7534c (commit f4e0cb7a8193) on 2026-09-19. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

vuejs/vuex counts Vuex — the state-management library that preceded Pinia in the Vue ecosystem — including its core, tests, and documentation. vuejs/pinia counts Pinia, the state store that the Vue documentation now presents as the default recommendation, with its own core, tests, and docs. Both are Vue-ecosystem state-management source trees, counted on the dates shown above.

The two repositories solve the same problem for the same framework, which makes this one of the more like-for-like comparisons on the site: the counts describe two successive libraries' reading and maintenance surface rather than different layers of a stack.

Both trees are written predominantly in TypeScript as the per-language tables show, reflecting that Pinia was developed in the Vue 3 era and Vuex's later major releases followed the same implementation language.

_Line count should not be used to declare a successor or a winner: the Vue documentation's recommendation of Pinia is a project-level statement, and neither the totals nor the language shares are evidence about which store fits a given application._

Sources: [vuejs/vuex repository](https://github.com/vuejs/vuex) · [vuejs/pinia repository](https://github.com/vuejs/pinia). Statements verified 2026-09-16.

Evidence and next steps:

- [vuejs/vuex SLOC report](https://octocounts.com/github/vuejs/vuex)
- [vuejs/pinia SLOC report](https://octocounts.com/github/vuejs/pinia)
- [Compare vuejs/vuex and vuejs/pinia interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2Fvuejs%2Fvuex&right=https%3A%2F%2Fgithub.com%2Fvuejs%2Fpinia)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, vuejs/vuex or vuejs/pinia?

vuejs/pinia has more code: 19,125 code lines versus 3,396 for vuejs/vuex, about 5.6x as much, based on cached OctoCounts reports as of 2026-09-19.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for vuejs/vuex, vuejs/pinia, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. vuejs/vuex was counted at ref main (commit bd907467b839) on 2026-08-26; vuejs/pinia was counted at ref f4e0cb7a8193f564c27f6527b3f954e114a7534c (commit f4e0cb7a8193) on 2026-09-19. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
