🛠️ IndieKit

Quick Paste:代码分享就该这么简单

2026-02-09 · 3 分钟阅读 · 工具, 代码分享, Pastebin

想分享一段代码,你会怎么做?

Quick Paste 就是为这个场景设计的。

功能

使用方式

# 创建代码片段
curl -X POST https://p.indiekit.ai/api/paste \
  -H "Content-Type: application/json" \
  -d '{
    "content": "def hello():\n    print(\"Hello World\")",
    "language": "python"
  }'

# 返回 {"id": "abc123", "url": "https://p.indiekit.ai/abc123"}

阅后即焚

分享敏感信息(密码、API Key)时特别有用:

curl -X POST https://p.indiekit.ai/api/paste \
  -H "Content-Type: application/json" \
  -d '{
    "content": "SECRET_KEY=abc123",
    "burn_after_read": true
  }'

对方打开链接看一次后,内容自动删除。

命令行集成

加到你的 shell 配置里:

# ~/.bashrc 或 ~/.zshrc
paste() {
  curl -s -X POST https://p.indiekit.ai/api/paste \
    -H "Content-Type: application/json" \
    -d "{\"content\": $(cat | jq -Rs .), \"language\": \"${1:-text}\"}" \
    | jq -r .url
}

# 使用
cat script.py | paste python
# 输出: https://p.indiekit.ai/abc123

为什么不用 pastebin.com

  1. 广告太多
  2. 免费版限制
  3. 数据在别人手里
  4. 不能自定义域名

部署

git clone https://github.com/indiekitai/quick-paste
cd quick-paste
uvicorn src.main:app --port 8084

在线体验p.indiekit.ai

GitHubindiekitai/quick-paste