A simplistic, command line focused pastebin.


Create a paste


Submit an urlencoded body. The response will include a cookie with a token needed to explicitly delete the paste. By default the response body will be the URL of the created paste.


Example shell function:

crpaste() { param="${1:-txt}"; url="$(curl --data-urlencode @- "undefined/?format=${param/,/&}")"; echo "$url"; }

Retrieve a paste

GET /<id>

Returns the raw paste with content type `application/octect-stream.

GET /<id>.txt

Returns the paste with content type text/plain; charset=utf8. May fail if the paste is not valid UTF-8.

GET /<id>.<format>

Render paste as HTML with line numbers and syntax highlighting in the language by format. Syntax highlighting is done with highlightjs.

GET /<token>/<id>, GET /<token>/<id>.txt, GET /<token>/<id>.<format>

Same as above, except for private pastes.

Delete a paste

DELETE /<id>

Delete the given paste. The request must include the cookie that was returned by POST /.