Astro vs Next.js: source lines of code compared
The Astro vs Next.js comparison on OctoCounts shows side-by-side source line counts for withastro/astro and vercel/next.js, counted under the rules and on the dates stated below: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.
This page compares the source lines of code (SLOC) of withastro/astro and vercel/next.js using cached OctoCounts reports. Code size is not code quality: a larger count only means more source material, not a better or worse project.
As of 2026-11-23, withastro/astro contains 224,631 total lines (131,939 code) across 1,765 files, while vercel/next.js contains 1,017,124 total lines (822,157 code) across 8,566 files as of 2026-11-24. vercel/next.js has about 6.2x the counted code lines of withastro/astro under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
| Metric | withastro/astro | vercel/next.js |
|---|---|---|
| Files | 1,765 | 8,566 |
| Total lines | 224,631 | 1,017,124 |
| Code lines | 131,939 | 822,157 |
| Comment lines | 55,811 | 96,150 |
| Blank lines | 36,881 | 98,817 |
| Languages counted | 14 | 28 |
Top languages in withastro/astro: TypeScript (67.6% of code), YAML (19.9% of code), Astro (4.7% of code). Top languages in vercel/next.js: Rust (35.8% of code), TypeScript (30.8% of code), TSX (10.6% of code). TypeScript, JSON, JavaScript appear in both top language lists; YAML, Astro appear only in withastro/astro's top languages; Rust, TSX appear only in vercel/next.js's top languages.
Methodology: both counts come from cached OctoCounts reports generated with tokei. withastro/astro was counted at ref main (commit 28a925e016fa) on 2026-11-23; vercel/next.js was counted at ref canary (commit 254c50c3fd10) on 2026-11-24. See the counting methodology for ignored directories and analysis options.
Both reports use the same engine and effective counting rules. Repository declarations, when enabled, are specific to each repository. withastro/astro: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed. vercel/next.js: tokei-15.0.0, policy directories-v1; docs excluded, tests excluded, generated excluded. Excluded directory names: .cache, .generated, .git, .next, __tests__, build, dist, doc, docs, documentation, fixtures, gen, generated, node_modules, target, test, tests, vendor. Ignored languages: none. Repository declarations: off. Exclusions are rule-based; they do not prove that every test, document or generated file was removed.
About this comparison
Background observations recorded on 2026-09-16; language descriptions here are historical context, not claims about the current filtered shares. Use this page's measured language breakdown for current counts. Repository layout before counting filters: withastro/astro is the Astro core repository: the static-site generator, its rendering and island integrations, and the documentation included in the repo. vercel/next.js is the Next.js monorepo — framework packages, examples, documentation site, and test suites. Both are framework repositories aimed at web content, but organized differently, and the contains were taken on the dates shown above.
Astro's counted code is written predominantly in TypeScript, as is Next.js's — the per-language tables show two projects in the same implementation language with different repository organization rather than different languages.
Both counts describe framework source trees, not the sites built with them; output size and runtime behavior of a site depend on its own content, components, and configuration, not on these repository totals.
Sources: withastro/astro repository · vercel/next.js repository structure (monorepo with examples and docs). Statements verified 2026-09-16.
Evidence and next steps:
- withastro/astro SLOC report
- vercel/next.js SLOC report
- Compare withastro/astro and vercel/next.js interactively
- withastro/astro saved report
- vercel/next.js saved report
Saved reports remain subject to cache cleanup and replacement. Export their JSON for durable citation; live report URLs can change.
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, withastro/astro or vercel/next.js?
As of 2026-11-23, withastro/astro contains 224,631 total lines (131,939 code) across 1,765 files, while vercel/next.js contains 1,017,124 total lines (822,157 code) across 8,566 files as of 2026-11-24. vercel/next.js has about 6.2x the counted code lines of withastro/astro under the same engine and counting rules. Code size is not code quality: a larger count only means more source material, not a better or worse project.
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 withastro/astro, vercel/next.js, or any repository.
How is this comparison calculated?
Methodology: both counts come from cached OctoCounts reports generated with tokei. withastro/astro was counted at ref main (commit 28a925e016fa) on 2026-11-23; vercel/next.js was counted at ref canary (commit 254c50c3fd10) on 2026-11-24. 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.