A Windows Python script that generates two clickable shortcuts for any GitHub repository:
- A
.urlfile that opens the repo in your browser - A
.code-workspacefile that opens the repo in VS Code (via GitHub Codespaces)
- Run the script
- On first run: rename your username (ctrl+n)
- Type the repo name you want shortcuts for
- Two files appear in the script's directory, ready to click
- Press Ctrl+N anytime before Enter to change username again
Open {repo-name} in VS Code.code-workspace— VS Code workspace fileOpen {repo-name} on GitHub.url— Browser shortcut to GitHub repo
- uhhh python. I suggest going for
winget install python.launcher.
- Set your windows to use the newer terminal, as it does support text dimming, instead of the old command prompt
- Username persistence: Saves your GitHub username inside the script itself (in the
# USERNAME:comment line) on first run - Minimal input: Only prompts for the repo name — username is reused automatically
- Quick username change: Press Ctrl+N while entering the repo name to change your username without re-running
- Plain-text UI: Works in any Windows terminal (no emoji rendering required)
- Self-modifying: The script rewrites its own
# USERNAME:line when you update it
- Uses
msvcrtfor raw keystroke detection (Windows only) - ANSI escape codes for dimmed text styling
- Regex-based self-modification for username storage
- Custom input reader that watches for Ctrl+N while capturing typed characters