1.1.0 • Published 3 years ago
pasty v1.1.0
pasty
pasty is a cli for pastebin.com. With it you can:
- upload files
- upload strings
- list all your pastes
- delete a paste
- get paste content
- get user information (signed in user)
usage
first, login:
- visit pastebin.com and login
- visit https://pastebin.com/doc_api#1
- save your api key in a file called
pasty.apiin your home directory (~/.pasty.api)- the contents of your
.pasty.apishould just be the key, nothing else
- the contents of your
then run
$ pasty login <username>then, create a paste:
$ pasty create -s 'hello world!'alternativly, you can upload a file:
$ pasty create -f hello_world.txtother commands
list all your pastes:
$ pasty listdelete a paste:
$ pasty delete <unique id>get a paste's content:
$ pasty get <unique id>get info about signed in user:
$ pasty userlogout:
$ pasty logoutmore options
you can customize your newly created paste:
- syntax highlighting (default: text)
- expiry date (default: never)
- never (N)
- 10 minutes (10M)
- 1 hour (1H)
- 1 day (1D)
- 1 week (1W)
- 1 month (1M)
- 6 months (6M)
- 1 year (1Y)
- paste visibilty (default: public)
- public
- unlisted
- private
folders are not supported! This is due to the pasting API not processing the folder option when making the request. It can't be fixed within this repository
installation
npm install -g pasty