A cli tool to upload and delete images on Imgur
- Anonymous upload of images to imgur.
- Delete anonymous image uploads.
Execute
go install github.com/ananthvk/imgur-cli@latest
This program requires a client id to work. Get a client id from https://api.imgur.com/oauth2/addclient
set IMGUR_CLIENT_ID=[CLIENT_ID]
$ export IMGUR_CLIENT_ID=[CLIENT_ID]
$ imgur-cli upload cat.png
Or
$ IMGUR_CLIENT_ID=[CLIENT_ID] imgur-cli upload cat.png
You can also place it in your shell profile, for example ~/.bashrc
or ~/.zshrc
imgur-cli upload <path to image file>
$ IMGUR_CLIENT_ID=xxxxxxxx imgur-cli upload TBJLzvUqnh4i6vtAnhCs--1--lvv9j_2x.jpg
Success: uploaded image to imgur!
Image URL: https://i.imgur.com/Sl0hhG1.jpg
Delete hash: xxxxxxxxxxxx
Please keep the above delete hash safe as it is required to remove the image from imgur.
Note after uploading, a delete hash will be shown. Please copy it as it is required if you want to remove the image in the future.
imgur-cli delete <delete hash>