Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Repo Viewer — a Notepad++ plugin

A docked side panel that lists every GitHub repository your token can access — like a file explorer for GitHub. Expand any repo to browse its folders/files, double-click a file to open it in Notepad++, edit it, and just save (Ctrl+S) to push the change back to GitHub. Works with public and private repos.

A prebuilt 64‑bit DLL is included at dist/GitHubRepoViewer.dll — no compiler needed.


1. Install

Requires a 64‑bit Notepad++ (the standard download since v7.6). This plugin is x64‑only.

  1. Find your Notepad++ plugins folder (usually C:\Program Files\Notepad++\plugins).

  2. Create a folder named exactly GitHubRepoViewer inside plugins.

  3. Copy GitHubRepoViewer.dll into it, so the final path is:

    C:\Program Files\Notepad++\plugins\GitHubRepoViewer\GitHubRepoViewer.dll
    

    The folder name and the DLL name must match — this is a Notepad++ requirement.

  4. Restart Notepad++.

You should now see a Plugins → GitHub Repo Viewer menu.


2. Create a GitHub token

The plugin uses the GitHub REST API, so it needs a Personal Access Token (PAT).

  • Go to https://github.com/settings/tokens
  • Classic token (simplest for "see all my repos"): tick the repo scope. This lets the panel list all of your repositories (and ones you collaborate on).
  • Fine‑grained token: grant access to the repos you want, with Contents → Read and write. Only repos the token is scoped to will appear.

Copy the token — you'll paste it into the plugin's Settings.


3. Configure & use

  1. Plugins → GitHub Repo Viewer → Settings (Token)… → paste your PAT → Save.
  2. Plugins → GitHub Repo Viewer → Show GitHub Panel → the panel docks on the left and automatically lists all your repositories as top-level items (owner/repo).

In the panel:

  • Icons distinguish repositories, folders and files at a glance.
  • Filter box (top) — start typing to instantly narrow the repo list (e.g. api). Your last filter is remembered between sessions.
  • Refresh — re-fetch the repository list from GitHub.
  • Expand a repository to load its files/folders (fetched on demand). Repos you leave expanded are re-opened automatically next time.
  • Hover a truncated name to see the full name/path in a tooltip; a horizontal scrollbar also appears for long names.
  • Right-click any item for: Open (files), Copy path / Copy repo name, and Copy raw URL (files) / Copy GitHub URL (folders & repos).
  • Double‑click a file to download and open it in a new tab.
  • Edit, then press Ctrl+S — the plugin commits the new content back to GitHub via the Contents API and shows a confirmation. (No local git needed.) Each repo uses its own default branch automatically.

Downloaded files are cached under the plugin config folder (…\plugins\config\GitHubRepoViewerCache\owner\repo\branch\…) so extensions and syntax highlighting are preserved.

Notes / limitations (v1.1)

  • Lists up to ~2000 repositories (20 pages × 100).
  • Text files up to 1 MB are supported (GitHub Contents API limit). Larger/binary files show a message instead of opening.
  • Each save commits directly to the repo's default branch.
  • If a push fails with a "409 / sha" error, click Refresh and reopen the file to get the latest version, then edit again.

4. Build it yourself (optional)

Cross‑compiled with MinGW‑w64:

sudo apt-get install -y mingw-w64
cd npp-github-plugin
make            # produces dist/GitHubRepoViewer.dll

Only Win32 APIs (WinHTTP + common controls) plus header-only nlohmann/json are used, so the DLL is statically linked with no extra runtime dependencies.

Project layout

npp-github-plugin/
├── dist/GitHubRepoViewer.dll   # prebuilt 64-bit plugin
├── src/
│   ├── main.cpp                # plugin logic (panel, repo list, tree, GitHub API, push-on-save)
│   ├── plugin.rc               # settings dialog + version info
│   ├── resource.h
│   └── plugin.def              # exported plugin functions
├── headers/                    # official Notepad++ plugin API headers
├── third_party/nlohmann/       # JSON library (header-only)
└── Makefile

About

Browse a GitHub repository inside a **docked side panel** (tree view), double‑click any file to open it in Notepad++, edit it, and just **save (Ctrl+S) to push the change back** to GitHub. Works with **public and private** repos.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages