Skip to content

Self-hosted alternatives to GitHub Gist

GitHub Gist is GitHub’s hosted service for sharing code snippets and notes, where each gist is a small Git repository. One listed app does its main job and runs in your own Cloudflare account.

Each answer comes from the app’s README and source code, compared with the features GitHub Gist describes on its own site.

  • pbnj homepage grid of code pastes with syntax highlighting in the Flexoki Dark theme

    Single-user pastebin with a terminal CLI, syntax highlighting and memorable links, on a Worker with a D1 database

    Deploy
    One-click
    License
    MIT
    GitHub stars
    148 stars
    Last commit

GitHub Gist features, app by app

Featurepbnj
Share code snippets by linkYes
Syntax highlightingYes
Secret gists that are unlistedYes
Revision history through GitNo
Several files in one gistNo
Stars, forks and commentsNo
Embedding in web pagesNo
Creating gists from the command line with ghYes

Single-user pastebin with a terminal CLI, syntax highlighting and memorable links, on a Worker with a D1 database

What a GitHub Gist user would miss
There is no revision history, no multi-file pastes, no stars, forks or comments, and no embed code.
What it adds
MIT and runs in your own Cloudflare account and domain, without a GitHub account, with memorable links and 12 themes.
  • Yes Share code snippets by link. Every paste gets a link, and its raw text is served at /r/ followed by the ID.
  • Yes Syntax highlighting. More than 100 languages in 12 themes.
  • Yes Secret gists that are unlisted. Private pastes stay off the homepage and can require a secret key in the link.
  • No Revision history through Git. A paste can be updated, but earlier versions are not kept.
  • No Several files in one gist. One file per paste.
  • No Stars, forks and comments. Left out on purpose.
  • No Embedding in web pages. No embed code.
  • Yes Creating gists from the command line with gh. The pbnj CLI pastes a file or piped output and copies the link.

Sources:github.com/bhavnicksm/pbnj#readmegithub.com/bhavnicksm/pbnj/tree/main/docsdocs.github.com/en/get-started/writing-on-github/editing-and-sharing-content-with-gists/creating-gists