Pastebin connects VS Code to pb, a GitHub-backed personal scratchpad for notes and snippets. It keeps GitHub authentication in the GitHub CLI and uses the pb binary for storage, sync, conflict handling, and version history.
Features
- Browse all pastebin notes from a native VS Code sidebar.
- Create a note from VS Code and push it with the editor title upload icon.
- Sync notes with the configured GitHub-backed
pbstore. - See the active GitHub account and storage repository in the sidebar.
- Build a local
pbbinary from this repository for extension development.
Requirements
ghinstalled and authenticated withgh auth login.pbinstalled and initialized withpb init.- For
Push Current Note,pbmust supportpb save <path> --stdin. If your installed release is older, runPastebin: Build Local pbfrom this repository workspace.
Getting Started
- Install and authenticate GitHub CLI:
gh auth login. - Initialize storage:
pb init. - Open the Pastebin sidebar in VS Code.
- Use
New Note, write content, then click the editor title upload icon. - Enter a pastebin path such as
notes/today.md.
Commands
Pastebin: New NotePastebin: InitializePastebin: Push Current NotePastebin: Build Local pbPastebin: Open NotePastebin: Delete NotePastebin: SyncPastebin: RefreshPastebin: Show StatusPastebin: Configure pb PathPastebin: Filter
Troubleshooting
- If push says your
pbCLI is too old, runPastebin: Build Local pbor updatepb. - If the extension cannot find
pb, runPastebin: Configure pb Path. - If GitHub access fails, run
gh auth statusand refresh the Pastebin sidebar. - The extension does not store GitHub tokens; authentication stays delegated to
gh.
Development
cd vscode-extension
npm install
npm test
npx @vscode/vsce package