docs

git clone https://github.com/notamitgamer/docs.git
· rebuilt hourlyOpen on GitHub
root / githrun / vscode-extension.mdx

vscode-extension.mdx (1334B)


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