Copy Path as URI extension for WSL-aware VS Code and Cursor workflows.
  • TypeScript 100%
Find a file
2026-02-27 23:47:35 +01:00
.github/workflows [WIP] Fix quoting in release.yml to resolve syntax error (#5) 2026-02-27 23:45:16 +01:00
src Pull request review (#2) 2026-02-27 18:37:47 +01:00
.gitignore Add "Copy Path as URI" VS Code extension 2026-02-27 18:37:47 +01:00
.vscodeignore Add "Copy Path as URI" VS Code extension 2026-02-27 18:37:47 +01:00
package-lock.json Add CI and release GitHub Actions workflows 2026-02-27 18:37:47 +01:00
package.json chore: bump version to 0.1.2 2026-02-27 23:47:35 +01:00
README.md ci: publish extension to VS Code and OpenVSX 2026-02-27 21:05:19 +01:00
tsconfig.json Add "Copy Path as URI" VS Code extension 2026-02-27 18:37:47 +01:00

vsc-wslpath-copy

VS Code / Cursor extension that adds a "Copy Path as URI" context menu entry.

When connected to a WSL remote, the copied URI uses the file://wsl.localhost/… format so it can be opened directly from Windows browsers and other tools:

file://wsl.localhost/Ubuntu/home/dikka/projs/presentations-website/.dev/presentations/project-status-presentation.html

For local (non-remote) files, a standard file:// URI is produced.

Usage

Right-click a file in the Explorer or an editor tabCopy Path as URI.

The URI is written to your clipboard.

Install from source

npm install
npm run compile
# then either:
npx vsce package   # produces a .vsix you can install
# or press F5 in VS Code to launch the Extension Development Host

Publish to both VS Code and Cursor

If you want this extension discoverable in both editors:

  • Publish to the VS Code Marketplace (for VS Code users)
  • Publish to OpenVSX (for Cursor users)

Cursor staff states that Cursor's in-app extension library uses OpenVSX, and that extensions must be available there to be installable/searchable in Cursor:

CI release flow in this repo

On pushes to main, .github/workflows/release.yml now:

  1. Builds and packages a .vsix
  2. Publishes the package to VS Code Marketplace (if VSCE_PAT is set)
  3. Publishes the same package to OpenVSX (if OVSX_PAT is set)
  4. Creates a GitHub release and uploads the .vsix

Required GitHub secrets

How it works

Context Example URI
WSL remote (Ubuntu) file://wsl.localhost/Ubuntu/home/user/file.txt
Local Linux / macOS file:///home/user/file.txt
Local Windows file:///C:/Users/user/file.txt