VS Code extensionMITTypeScript

terminal-path-resolver

Resolve terminal file paths to the right file in your workspace — even when the emitted path doesn't match your local machine.

web:dev:  src/page.tsx:12:3  Type error: Property 'id' does not exist
web:dev:  C:\repo\apps\web\src\layout.tsx:4:1
web:dev:  /repo/apps/web/src/utils/format.ts:88:14
⌘-click → apps/web/src/page.tsx, line 12, col 3 ✓
$

Why we built it

In a monorepo, the path your terminal prints is usually only a suffix of the real file — so ⌘-clicking an error does nothing. We work in Turborepo output all day across our products, so we made the terminal links actually resolve.

What it supports

  • Unix absolute paths — /repo/apps/web/src/page.tsx:12:3
  • Windows absolute paths — C:\repo\…\page.tsx:12:3
  • Workspace-relative paths
  • Task-prefixed paths — web:dev: src/page.tsx
  • Stack traces split across multiple lines

How it resolves paths.

Three passes, in order. When more than one file is plausible, you get a Quick Pick instead of a silent guess at the first match.

Exact absolute path

If the printed path exists on this machine, it opens immediately.

Workspace-relative

Matched against every open workspace folder in the window.

Ranked suffix match

Scored against a cached workspace file index — built for monorepos and Turborepo output.

Usage

Terminal links

⌘-click on macOS, Ctrl-click on Windows and Linux, straight from the integrated terminal.

Manual command

Select a path in the editor and run Terminal Path Resolver: Open File Path from the command palette.

Install

# Marketplace or OpenVSX
$ code --install-extension maydotinc.terminal-path-resolver
# or build it yourself
$ npm install && npm run package
$ code --install-extension builds/terminal-path-resolver-0.0.2.vsix

Settings cover ambiguous-match Quick Picks, exclude globs, index size caps, and extra file extensions. 40+ languages supported out of the box.

Built by

Noah Gomes and Aleem Rehmtulla at May Inc.

License

MIT. Free and open, forever. Issues and PRs welcome.