fix-cursor-tunnel
v0.2.0
Published
Fix Cursor tunnel issues via a simple CLI.
Readme
fix-cursor-tunnel
A minimal Node.js CLI to fix Cursor tunnel issues.
Usage
- Run directly via npx (recommended):
npx fix-cursor-tunnel- Install globally and run:
npm i -g fix-cursor-tunnel
fix-cursor-tunnel- Options:
-h, --help Show help
-v, --version Show version
--dry-run Show what would happen without making changes
-b, --bin-dir <path> Override Cursor bin directory
--src <path> Explicit source file to rename (cursor-tunnel)
--dest <path> Explicit destination path/name (code-tunnel)Arguments
- --dry-run
- Prints the resolved paths and intended action without modifying files.
- -b, --bin-dir
- Directory that contains
cursor-tunnel/code-tunnel. - Alternative: set environment variable
CURSOR_BIN_DIR.
- Directory that contains
- --src, --dest
- Provide fully-qualified paths to override detection entirely.
- When both are provided, they take precedence over
--bin-dir.
Cross-platform defaults
If --src/--dest and --bin-dir/CURSOR_BIN_DIR are not provided, the CLI tries OS-specific defaults:
- macOS:
/Applications/Cursor.app/Contents/Resources/app/bin - Windows:
- Per-user:
%LocalAppData%\Programs\Cursor\resources\app\bin - Fallback:
C:\\Program Files\\Cursor\\resources\\app\\bin
- Per-user:
- Linux:
/opt/Cursor/resources/app/bin
If your installation lives elsewhere, pass --bin-dir or set CURSOR_BIN_DIR.
Examples
macOS
- Dry run:
node bin/cli.js --dry-run - Apply (may require sudo due to
/Applications):sudo node bin/cli.js
- Dry run:
Windows (PowerShell)
- Dry run using default detection:
node bin/cli.js --dry-run - Apply (run from elevated/Administrator shell if under Program Files):
node bin/cli.js - Target a specific install:
node bin/cli.js --bin-dir "$env:LocalAppData\Programs\Cursor\resources\app\bin"
- Dry run using default detection:
Linux
- Dry run:
node bin/cli.js --dry-run - Apply (use sudo if needed):
sudo node bin/cli.js - Specify a custom path:
node bin/cli.js --bin-dir /opt/Cursor/resources/app/bin
- Dry run:
Verify
- macOS/Linux:
ls -l <bin-dir>/{cursor-tunnel,code-tunnel} - Windows (PowerShell):
dir "<bin-dir>\cursor-tunnel" dir "<bin-dir>\code-tunnel"
Revert
If needed, you can revert manually:
- macOS/Linux:
mv <bin-dir>/code-tunnel <bin-dir>/cursor-tunnel - Windows (PowerShell):
ren "<bin-dir>\code-tunnel" "cursor-tunnel"
Development
- Node.js >= 18 is required.
- Entrypoint:
bin/cli.js(bin mapping inpackage.json). - Implementation:
src/index.js.
Local testing
# Make the CLI executable
chmod +x bin/cli.js
# Run locally
node bin/cli.js --helpPublishing
- Update the version in
package.json. - Ensure you are logged in to npm:
npm login. - Publish:
npm publish.
Once published, users can run:
npx fix-cursor-tunnelLicense
MIT
