plainhub_open
Open a GitHub repository file in the PlainHub browser editor, or change editor settings like theme, preview, and line numbers when no repo or path is given.
Instructions
Open a file from a GitHub repository in the PlainHub browser editor, or change editor settings (theme, fontSize, preview, sidebar, lineNumbers, whitespace, header) when called without repo and path. Use it when the user wants to see or edit a file in the browser. The browser signs in on its own; the saved token is handed over only when noAuth is false. Opens https://app.plainhub.dev unless PLAINHUB_APP_URL is set (lab or localhost; the token is only passed to https://app.plainhub.dev). Example: {"repo": "octocat/hello-world", "path": "README.md", "preview": "on"}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| line | No | Line number to jump to | |
| path | No | File path in the repository, e.g. docs/setup.md | |
| repo | No | GitHub repository as owner/name, e.g. octocat/hello-world | |
| theme | No | Editor theme | |
| branch | No | Branch name (default: the repository's default branch) | |
| header | No | Show the header | |
| noAuth | No | Set to false to hand the saved token to the page (default: the browser signs in on its own) | |
| scroll | No | Scroll the preview to this heading (section name) | |
| preview | No | Markdown preview | |
| sidebar | No | Show the file sidebar | |
| fontSize | No | Font size (slider 8-72, input accepts any) | |
| whitespace | No | Show whitespace | |
| lineNumbers | No | Show line numbers |