Created
December 23, 2025 08:16
-
-
Save zalez/5477c89ca7ab01e04204cee3829caf0e to your computer and use it in GitHub Desktop.
alt-text Fish script for auto-creating Alt text descriptions of images
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Prerequisites: | |
| # - llm command line tool: https://github.com/simonw/llm | |
| # - llm-anthropic plugin for llm: https://github.com/simonw/llm-anthropic | |
| # - Anthropic account with access to Claude Haiku models | |
| # - Anthropic API key configured in llm ('llm keys set anthropic') | |
| function alt-text | |
| set prompt "\ | |
| Create an alt text for this image for people with visual impairments.\ | |
| Only output the alt text, nothing else." | |
| llm -m claude-haiku-4.5 -a "$argv" -s "$prompt" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment