Wraps the official Imgur v3 API for AI agents. Upload images by file or URL, fetch metadata, delete by delete-hash, and manage albums — all as subcommands that print JSON.
Trigger this skill when:
nano-banana-pro, generate-image, ffmpeg, matplotlib, etc.) and another step needs a public URL.Pairs well with: instagram-api (needs hosted URLs), nano-banana-pro, generate-image, Discord/Telegram posting skills.
pip install -e .
Then set either:
IMGUR_CLIENT_ID — anonymous uploads (get one at https://api.imgur.com/oauth2/addclient)IMGUR_ACCESS_TOKEN — OAuth2 bearer token (takes precedence if both are set)imgur-cli upload <file-or-url> [--title T] [--description D] [--album HASH]
imgur-cli get <image-hash>
imgur-cli delete <delete-hash-or-id>
imgur-cli album-create [--title T] [--description D] [--privacy public|hidden|secret] [--image ID ...]
imgur-cli album-add <album-hash> --image ID [--image ID ...]
All commands print the Imgur API data object as indented JSON. Errors exit non-zero with the Imgur error payload on stderr.
# Anonymous upload, grab the shareable link
export IMGUR_CLIENT_ID="<client id>"
imgur-cli upload ./photo.jpg --title "cat pic" | jq -r '.link'
# Upload to user account
export IMGUR_ACCESS_TOKEN="<oauth token>"
imgur-cli upload https://example.com/pic.png --description "from pipeline"
# Save the delete-hash for later cleanup
imgur-cli upload ./tmp.png | jq -r '.deletehash' > .imgur-delete
# Create a private album of existing images
imgur-cli album-create --title "run-042" --privacy hidden --image aBc12 --image xYz34
deletehash is the only way to remove anonymous uploads — store it.共 1 个版本