Skip to content

Instantly share code, notes, and snippets.

@zalez
Created December 23, 2025 08:16
Show Gist options
  • Select an option

  • Save zalez/5477c89ca7ab01e04204cee3829caf0e to your computer and use it in GitHub Desktop.

Select an option

Save zalez/5477c89ca7ab01e04204cee3829caf0e to your computer and use it in GitHub Desktop.
alt-text Fish script for auto-creating Alt text descriptions of images
# 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