Configs2026年7月6日·1 分钟阅读

OpenGist — Self-Hosted Pastebin Powered by Git

OpenGist is a self-hosted pastebin alternative that stores snippets as Git repositories, enabling versioning, forking, and search across all your pastes.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
OpenGist Pastebin
直接安装命令
npx -y tokrepo@latest install 6420941d-78f2-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

OpenGist is a self-hosted, open-source pastebin service that uses Git under the hood. Every gist is a full Git repository, so you get version history, diffs, and the ability to clone or push snippets from the command line.

What OpenGist Does

  • Hosts code snippets and text pastes with syntax highlighting for 250+ languages
  • Stores each gist as a Git repository with full version history
  • Supports public, unlisted, and private visibility levels
  • Provides a search engine across all gists with full-text indexing
  • Enables user accounts with SSH key authentication for Git push/pull

Architecture Overview

OpenGist is a single Go binary that embeds a web server, a Git backend, and a SQLite or PostgreSQL database for metadata. The web frontend is built with server-side rendered templates. Each gist maps to a bare Git repository on disk, and the application exposes both HTTP and SSH endpoints for Git operations.

Self-Hosting & Configuration

  • Deploy via Docker or download the single binary for Linux, macOS, or Windows
  • Configure with environment variables or a YAML config file
  • Set OG_EXTERNAL_URL to your public domain for correct link generation
  • Use SQLite for small deployments or PostgreSQL for larger instances
  • Place behind a reverse proxy with TLS for production use

Key Features

  • Git-native storage means every paste supports branching, cloning, and history
  • Syntax highlighting via Chroma covers 250+ languages and formats
  • Embeddable gists with JavaScript or iframe snippets
  • OAuth login support for GitHub, Gitea, and OpenID Connect providers
  • Lightweight single binary with minimal resource requirements

Comparison with Similar Tools

  • GitHub Gist — cloud-hosted, proprietary; OpenGist is fully self-hosted
  • PrivateBin — encrypted pastes but no Git versioning; OpenGist tracks history
  • Hastebin — simple paste server; lacks user accounts and Git integration
  • Gitea Gists — built into Gitea; OpenGist is standalone and lighter
  • dpaste — minimal Python pastebin; OpenGist offers richer features

FAQ

Q: Can I migrate existing GitHub Gists to OpenGist? A: Yes. OpenGist can clone gists from GitHub since each gist is a standard Git repo.

Q: Does OpenGist support private pastes? A: Yes. Gists can be set to public, unlisted, or private per user preference.

Q: What database backends are supported? A: SQLite (default, zero-config) and PostgreSQL for larger deployments.

Q: How do I push a gist from the command line? A: Add your SSH key in settings, then use git push to the gist SSH URL shown on each gist page.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产