PortholeThe manual

04 / Outside links · Experimental

Open a page from a terminal.

Write the page to disk. Send its local path to VS Code with a vscode:// link.

View Markdown

Open a local file.

Keep VS Code running with your project open. On macOS, replace the example path with an existing local HTML file, then run:

open 'vscode://jlumbroso.porthole/v1/open?file=/absolute/path/tasks.html&width=420&height=640'

Keep the quotes: the shell must leave the & characters alone. The page must be a local HTML or Markdown file. Web addresses and localhost URLs are not supported.

What the link means.

Parameters for /v1/open
ParameterMeaning
fileRequired. An absolute local path, or a path relative to a workspace folder in the receiving VS Code window.
width, heightBoth or neither; positive whole pixels. Without them, the window uses the first size preset. VS Code raises dimensions below 400 × 270.
repoA workspace folder’s name, used to disambiguate a relative path. It is not a repository URL.

The VS Code window used most recently receives the link. Relative paths are looked up only in its workspace folders. Use an absolute path if the person may be working in another project. An ambiguous relative path is refused.

Encode the path once.

Preserve the separating slashes. In JavaScript:

path.split('/').map(encodeURIComponent).join('/')

Spaces become %20, + becomes %2B, and # becomes %23. Do not use encodeURI, which leaves some query-significant characters alone.

One current limit: a filename containing & followed by letters and = cannot be sent through this interface, even encoded. Rename that file before using the link.

Disabled outside links or page-opening actions are refused. When both are enabled, files in permitted locations open without another Porthole prompt. For other files, Porthole offers Open Once, Allow This Folder, and Cancel. VS Code also has its own first-use permission prompt.

Opening a window moves keyboard focus. On macOS, a new floating window takes focus. Avoid opening a page while the person is typing in another application: their keystrokes can go into the page.

Do not change these permission settings without the person’s approval. See outside-link settings for the individual controls.

Update the page, then check the result.

Save changes to HTML files; Markdown previews update as you edit. Sending the same link again without dimensions brings the existing window forward, where the person put it. Sending it with dimensions requests reopening at that size.

Sending a link does not prove that a page became visible. Read the Porthole output channel for receipt, opening, or refusal messages. When reporting the result, distinguish those messages from observing the rendered window.

Install the Porthole skill.

Run Porthole: Install the Skill for Models in This Project, or send:

open 'vscode://jlumbroso.porthole/v1/install-skill'

Porthole writes .claude/skills/porthole/SKILL.md in a workspace folder. If the receiving window has several folders, add ?repo=<folder name>. The first installation link asks permission for that VS Code workspace; approval also covers its other folders. Replacing an edited copy asks again.

Claude Code discovers the installed skill. Other agents can read the same file explicitly.

Outside links currently open pages and install the skill. Listing, closing, docking, pinning, and independently resizing windows through this interface are not implemented.