vscode-extension.md (1309B)
1 --- 2 label: VS Code Extension 3 icon: file-code 4 order: 650 5 --- 6 7 # VS Code Extension 8 9 ## Installation & setup 10 11 ### 1. Install the extension 12 13 - **Marketplace** — search for "Githrun" in the VS Code Extensions view and click Install 14 - **Manual** — if installing from a VSIX file, go to Extensions → **...** → Install from VSIX 15 16 ### 2. Install the core CLI (required) 17 18 The extension acts as a bridge to the Githrun CLI — you must have it installed on your system: 19 20 ```bash 21 pip install githrun 22 ``` 23 24 ## Extension features & usage 25 26 ### CodeLens integration 27 28 The extension automatically scans Markdown, Python, and Text files for GitHub or Gist URLs. Look for the "Run with Githrun" link appearing above any detected URL — click it to open a terminal and run the script immediately. 29 30 ### Context menu 31 32 Highlight any GitHub URL in your editor, right-click the selection, and choose **Githrun: Run Selected Text**. 33 34 ### Command palette 35 36 Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac), type `Githrun: Run from URL...`, and paste your target link. 37 38 ## Extension settings 39 40 The extension tries to auto-detect your Githrun installation: 41 42 1. First checks for `githrun` in your global PATH 43 2. If not found, falls back to `python -m githrun` (or `python3` on Mac/Linux) 44 45 Continue to [Configuration](configuration.md).