Paste - Usage ============= https://paste.bea.sh QUICK START echo 'hello' | curl -q -fsSL -w '\n' --data-binary @- 'https://paste.bea.sh/' curl -q -fsSL -w '\n' --data-binary @notes.txt 'https://paste.bea.sh/' The response is the link to the new paste. ENDPOINTS POST / Create a paste from the request body; returns its link GET / View a paste in the browser (highlighted) GET /raw/ Paste contents as text/plain GET /download/ Paste contents as a file download DELETE / Delete a paste GET /new Web editor GET /usage This guide CREATE OPTIONS (query string on POST /) ttl= Expire after this many seconds; 0 never expires. Default when ttl is omitted: 30 days. burn=true Delete the paste after it is read once lang= Highlighting in the web view, e.g. bash, python, json curl -q -fsSL -w '\n' --data-binary @- 'https://paste.bea.sh/?ttl=3600&burn=true&lang=bash' SHELL FUNCTIONS Each function uploads stdin, or a file when one is given: cat notes.txt | pastebin pastebin notes.txt fish (save with: funcsave pastebin) function pastebin --description 'Upload stdin or a file to Paste' set -l source - set -q argv[1]; and set source $argv[1] curl -q -fsSL -w '\n' --data-binary "@$source" 'https://paste.bea.sh/' end zsh (~/.zshrc) and bash (~/.bashrc) pastebin() { curl -q -fsSL -w '\n' --data-binary "@${1:--}" 'https://paste.bea.sh/' } PYTHON (standard library only) import urllib.parse, urllib.request def paste(text, ttl=None, burn=False, lang="markup"): params = {"burn": str(burn).lower(), "lang": lang} if ttl is not None: # None keeps the server default; 0 never expires params["ttl"] = ttl query = urllib.parse.urlencode(params) request = urllib.request.Request( "https://paste.bea.sh/?" + query, data=text.encode(), method="POST", headers={"Content-Type": "text/plain"}) with urllib.request.urlopen(request) as response: return response.read().decode().strip() print(paste("hello from Python", ttl=3600, lang="python")) READ AND DELETE curl -fsS 'https://paste.bea.sh/raw/' curl -fsS -o paste.bin 'https://paste.bea.sh/download/' curl -fsS -X DELETE 'https://paste.bea.sh/' AI AGENTS https://paste.bea.sh/llms.txt Guide for LLMs and agents https://paste.bea.sh/openapi.json OpenAPI 3.1 description https://paste.bea.sh/mcp MCP server (Streamable HTTP, no sign-in) Add it to Claude Code: claude mcp add --transport http paste https://paste.bea.sh/mcp Send -H 'Accept: application/json' on POST / for a JSON reply with id, url, raw_url, download_url, and expires_at. NOTES -q ignores ~/.curlrc, -f fails on HTTP errors, -sS hides progress but keeps errors, and -w '\n' ends the printed link with a newline. Pastes are limited to 8 MiB. Anyone with a paste link can read or delete it. Password encryption happens in the browser, so pastes sent from the command line are stored as plain text. The creating IP address is kept with each paste for abuse handling and is deleted with it. Open https://paste.bea.sh/new in a browser for the editor.