首页 文档

文档

REST、MCP、CLI 和代理集成参考。
用户指南

用好 pastebin.ca 所需的一切。

pastebin.ca 是面向文本和代码的短链接文本服务。先创建文本,选择它应如何被发现,分享合适的链接,并通过过期时间、账户、修订和自动化工具保持控制。

创建文本 比较分享模式

文本创建界面的插图,包含标题、设置、编辑器和发布按钮。
选择路径

你想做什么?

Workflow guides

Practical pastebin.ca workflows

Use these guides as working recipes for logs, private handoffs, release notes, revisions, encryption, CI, raw reads, MCP clients, lifecycle controls, and embeds.

Share terminal output Capture one command, keep stderr, and publish a short-lived paste with syntax and title metadata. Send a private debug bundle Package diagnostic text, encode binary archives as text when needed, and use secret-key or signed URL access rather than the public feed. Publish release notes to the feed Create a public, reusable plaintext paste with title and syntax so it appears in the public feed and profile surfaces. Version configuration revisions Create amendments instead of overwriting mutable state, then use lineage and diff views to review what changed. Deliver encrypted content Use client-side encryption for secret-key URLs or recipient delivery, and fetch ciphertext with the matching signed capability. Set up your encryption mailbox and sync keys Publish a recipient public key so others can seal pastes to your account, then sync the matching private key across your devices through an end-to-end encrypted keybag — no manual key transport. Attach CI artifacts to a run Post selected text artifacts from CI with a scoped API key, then expose paste URLs in job summaries or failure comments. Read and transform raw content Use raw URLs for plaintext streams, the JSON read endpoint for metadata, and MCP body_format when agents need base64-safe reads. Set up an MCP client Connect Claude Desktop, Cursor, Windsurf, or MCP Inspector to the hosted /mcp endpoint with OAuth or an API-key Authorization header. Report, revoke, and delete a paste Use reports for abuse, revocation tokens for anonymous cleanup, and authenticated deletes for owned pastes. Embed a code excerpt Render a plaintext paste or line range in an embeddable HTML surface with theme and line-number controls.
创建和分享

创建并分享文本

文本是带短 URL 的不可变文本快照。你可以粘贴文本或代码,添加标题和文件名,选择语法高亮,并一步发布。

  1. 编写或粘贴内容。编辑器接受不超过文本大小上限的纯文本和代码。发布前可以自动检测或手动选择语法。
  2. 选择过期时间、可见性、访问方式和读取上限。过期时间控制保留期限。可见性控制文本列出的位置。访问方式控制谁能打开 URL。
  3. 发布并复制链接。发布后,分享查看 URL。账户文本之后也可在“你的文本”中找到。

新建文本发布帮助

分享决策

可见性和访问方式是两个独立选择

可见性决定文本列出的位置。访问方式决定打开文本前需要什么。分享前请同时选择两者。

可见性:文本出现的位置
模式出现位置适用场景
公开动态公开动态、RSS 式发现和公开页面。你希望广泛发现,并接受索引、复制和归档。
个人资料你的公开个人资料,不一定会在主动态中推广。你想要与账户关联的持久公开作品集或参考列表。
未列出不会被 pastebin.ca 主动列在任何位置。你只希望拥有完整 URL 的人能找到它。
访问方式:什么能打开文本
模式打开方式适用场景
公开访问任何拥有文本 URL 的人都可在过期或撤销前读取明文。内容可以安全地披露给每个链接持有者。
签名 URLURL 的查询字符串中包含一个能力令牌。你想要比单纯文本 ID 更强的 Bearer 链接。
端到端加密浏览器使用 URL 片段密钥或收件人密钥解密密文。你希望服务存储密文而不是明文。

未列出和签名 URL 都是 Bearer 链接:任何收到完整链接的人都可以使用它。端到端加密会保护内容,但大小、时间、过期和访问事件等元数据仍可能存在。

阅读

使用阅读控件查看代码和文本

文本页面针对阅读和分享精确引用进行了优化。工具栏会将查看偏好保存在你的浏览器本地。

行号和行链接
需要指向具体段落时,可以点击或复制行引用。
换行和字体控件
切换自动换行、字体大小、制表符宽度、条纹和等宽字体偏好,让阅读更舒适。
搜索和复制
在长文本中查找内容,并在可用时复制单行或整个文本。
原始、JSON、下载和嵌入
需要纯文本输出、元数据、下载或 iframe 安全嵌入时,使用其他表示形式。
文本查看器的插图,包含代码行、行号和查看控件。
身份

账户、passkey 和自动化令牌

快速匿名发布文本不需要账户。需要持久文本历史、撤销控制、收件人加密、已连接应用或 API 令牌时,请登录。

集成

CLI、API 和 MCP 入口

选择适合你工作流的界面:浏览器用于交互式分享,CLI 用于终端,REST 用于脚本,MCP 用于支持代理的客户端。

信任和安全

隐私、滥用和安全

把公开文本视为公开内容,把未列出链接视为 Bearer 密钥;除非理解所选模式,否则不要发布凭据或敏感数据。