OSS Tanbou

pathpida — generate type-safe internal links and query parameters for Next.js routes

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
518
Primary language
TypeScript
License
MIT
Repository last updated
Sep 12, 2026

Overview

pathpida generates TypeScript helpers from Next.js and Vinext page routes. The resulting `pagesPath` API lets applications build static and dynamic URLs while checking route parameters and query values at compile time.

Features and best fit

Based on official documentation; not hands-on tested · Content checked:

Generate `$path.ts` from the pages structure

Route files are converted into typed pagesPath helpers, and watch mode can regenerate them as pages change.

Sources: [2]

Type query parameters and public asset paths

Page-level Query and OptionalQuery types can constrain URL generation, while --enableStatic can generate helpers for files under public.

Sources: [2]

For reducing stringly typed internal links in Next.js apps

It fits projects with growing dynamic routes and queries that want Link and router navigation to be checked by TypeScript.

Sources: [2]

Verify routing-layout and release compatibility

The README examples are based on the pages/ directory. Projects using different routing conventions should verify support in the version they adopt.

Sources: [2][3]

Official sources

  1. [1]aspida/pathpida repository(2026-09-21)
  2. [2]pathpida README(2026-09-21)
  3. [3]pathpida package.json(2026-09-21)
  4. [4]pathpida MIT license(2026-09-21)
Supplemental curator note

pathpida is a code-generation tool rather than a runtime dependency: it produces `$path.ts` from the route structure. The current main `package.json` uses version `0.0.0` as a development placeholder, so that value is not treated as a published release version. README examples are based on the `pages/` layout, so verify compatibility with other routing setups.

Try it in 3 steps

  1. 1

    Add pathpida as a development dependency

    Install the path generator and npm-run-all using the official README npm path.

    npm install pathpida npm-run-all --save-dev
  2. 2

    Add the generation script to package.json

    Follow the README setup example so $path.ts regenerates as pages change.

    "dev:path": "pathpida --ignorePath .gitignore --watch"
  3. 3

    Generate and use typed paths

    Use generated $url() helpers and verify that dynamic route and query arguments are checked by TypeScript.

    npm run dev:path → import { pagesPath } from "../lib/$path"
Check the official README

Growth

Growth trends · Last 30 days

518 Stars

Trend data is still being collected.

Development activity

Last 90 days · weekly

Commits (last 30 days)
4
Open PRs
5

Development activity is still being collected.

Built with

Categories and tags

GitHub data

GitHub dataView detailed GitHub data

GitHub Topics

  • typescript
  • nextjs
Stars
518
Forks
32
Watchers
1
Open issues
8
Contributors
13
Primary language
TypeScript
License
MIT
Repository last updated
Sep 12, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.