Documentation


Web interface


FieldDescription
Title (required)Descriptive title of the paste, limited to 256 characters
Paste (required)The actual paste's text data
Language (default: text)Language to use for syntax highlighting when displaying the paste
Visibility (default: public)Control who can see the paste. Public: everyone, indexed by search engines. Private: only the author can read it. With link: anyone with the link can access it. Organization members: accessible to all members of the organization where the paste was created.
Expiration (default: 2 weeks)Date after which the paste will be automatically deleted. If burn after reading is selected the paste will be deleted immediately after the first visualization.
Encryption key (default: none)Key used to encrypt/decrypt the paste. The encryption process happens on the client side and the encryption key is never sent to our servers. If lost, it's not possible to recover the paste.

Command line


Usage:
        
pastesafely [-h]
[--log-level {ERROR,DEBUG,INFO}]
[-u URL]
[--cfg-profile CFG_PROFILE]
[-k API_KEY] [-P PASSWORD]
[-t TITLE]
[-l <language>]
[-e EXPIRE]
[-V {org,private,link,public}]
[-f FETCH]
        
        
Arguments:
        
  -h, --help                      show the help message and exit
  --log-level {ERROR,DEBUG,INFO}  set the log level
  -u, --url URL                   API endpoint to connect to, defaults to https://www.pastesafely.com/api/
  -k, --api-key API_KEY           API key for authentication/authorization
  -P, --password PASSWORD         key to encrypt/decrypt the paste
  -t, --title TITLE               title of the new paste
  -l, --language LANGUAGE         language to use for syntax highlighting
      *see below for the full list of supported languages
  -e, --expire EXPIRE             number of days to keep the paste before destroying it ('never' for no expiration, or 'burn' for burn after reading)
  -V, --visibility                set paste visibility options
      {org,private,link,public}
  -f, --fetch FETCH               fetch an existing paste and print it
        
        

Examples

- Basic usage, creates a plain text public paste:

tail -n100 apache.log | ./pastesafely

- Public paste, plain text, specifying a title:

tail -n100 apache.log | ./pastesafely --title "Recent Apache logs"

- Private paste, authenticating using an API key, using ini for syntax highlighting:

cat mypy.ini | ./pastesafely -l ini -t"My mypy config" --api-key b5912aee352cec81be834321f342 --visibility private

- Private paste, authenticating using an API key, using Python for syntax highlighting, set to expire after 2 months. Some options are set in the configuration file instead of passed in as arguments:

cat fib.py | ./pastesafely -l python -t"Fibonacci in Python"

Contents of the configuration file ~/.pastesafely.ini to set default values for the api_key, visibility, and expire parameters:

[default]
api_key = b5912aee352cec81be834321f342
visibility = private
expire = 60
        

Supported languages

ABAP, ABNF, AL, ANTLR4, APL, AQL, ARFF, ASPNET, ActionScript, Ada, Agda, Apache, Apex, AppleScript, Arduino, AsciiDoc, Atom, AutoHotkey, AutoIt, AviSynth, Avro IDL, BASIC, BBcode, BNF, Bash, Batch, Bicep, Birb, Bison, Brainfuck, BrightScript, Bro, C, C#, C++, CFScript, CIL, CMake, COBOL, CSS CSS-Extras, CSV, ChaiScript, Clojure, CoffeeScript, Concurnas, Content, Coq, Crystal, Cypher, D, DAX, DNS-Zone, DOT, Dart, DataWeave, Dhall, Diff, Django, Docker, EBNF, EJS, ERB, EditorConfig, Eiffel, Elixir, Elm, Erlang, FSharp, FTL, Factor, False, Flow, Fortran, GAPGML, GCode, GDScript, GEDCOM, GLSL, GN, GameMakerLanguage, Gherkin, Git, GitIgnore, Go, GraphQL, Groovy, HCL, HLSL, HPKP, HSTS, HTML, HTTP, Haml, Handlebars, Haskell, Haxe, Hoon, IECST, IchigoJam, Icon, Idris, Inform7, Ini, Io, J, JQ, JS-Extras, JS-Templates, JSDoc, JSON, JSON5, JSONP, JSStackTrace, JSX, Java, JavaDoc, JavaScript, JavaStackTrace, Jexl, Jinja2, Jolie, Julia, Keepalived, Keyman, Kotlin, KuMir, Kusto, LLVM, LOLCODE, LaTeX, Latte, Less, LilyPond, Liquid, Lisp, LiveScript, Log, Lua, MATLAB, MAXScript, MEL, Magma, Makefile, Markdown, Markup, Markup-Templating, MathML, Mermaid, Mizar, MongoDB, Monkey, MoonScript, N1QL, N4JS, NASM, NEON, NSIS, NandToTetris-HDL, NaniScript, Nevod, Nim, Nix, OCaml, Objective, OpenCL, OpenQasm, Oz, PARIGP, PC, PHP, PHP-Extras, PHPDoc, PLSQL, PSL, Parser, Pascal, Pascaligo, PeopleCode, Perl, PowerQuery, PowerShell, Processing, Prolog, PromQL, Pug, Puppet, Pure, PureBasic, PureScript, Python, Q, QML, QSharp, Qore, R, RSS, Racket, Razor, Reason, Regex, Rego, Renpy, Rip, Roboconf, RobotFramework, Ruby, Rust, SAS, SML, SPARQL, SQF, SQL, SSML, SVG, Sass, Sass, Scala, Scheme, ShellSession, Smali, Smalltalk, Smarty, Solidity, Solution-File, Soy, Splunk-SPL, Squirrel, Stan, Stylus, Swift, Systemd, T4-CS, T4-Templating, T4-VB, TAP, TOML, TSX, TT2, Tcl, Text, Textile, Tremor, Turtle, Twig, TypeScript, TypoScript, URI, UnrealScript, V, VBNet, VHDL, Vala, Velocity, Verilog, Vim, Visual-Basic, WarpScript, Web-IDL, WebAssembly, Wiki, Wolfram, Wren, XLS, XML, XML-Doc, XQuery, Xeora, Xojo, YAML, YANG, Zig, nginx, properties, protobuf, reST,