Skip to content

Instantly share code, notes, and snippets.

@anthonywu
Created November 2, 2025 16:31
Show Gist options
  • Select an option

  • Save anthonywu/d1ada9d96bea7f1e974bcf5c0b157884 to your computer and use it in GitHub Desktop.

Select an option

Save anthonywu/d1ada9d96bea7f1e974bcf5c0b157884 to your computer and use it in GitHub Desktop.
One liner shell command LLM helper

Usage

bind cmd or even shorter shell alias for "ask an LLM to create a shell cmd for me"

  • alias cmd='llm cmd -m gpt-5'
  • alias cmd='llm cmd -m anthropic/claude-3-7-sonnet-latest'
  • alias vision-desc='llm -m llama3.2-vision:latest '\''describe'\'' -a'
$ cmd how do I trim the first 5 seconds off of a video movie.mp4
> ffmpeg -i movie.mp4 -ss 5 -c copy trimmed_movie.mp4 # hit enter to accept and execute
$ cmd I have a json file where I have a list of docs, where each doc has a property 'name' and I only want to select the docs where the name has substring 'abc' and I only want to display the 'name' and 'id' of each doc ignoring other properties
> jq '.[] | select(.name | contains("abc")) | {name, id}' file.json

Install

llm is available via uv tool install llm and then you llm install <any/model> where llm install ... can install any of that ecosystem's plugins

I have these in my workspace:

$ llm plugins | jq -r '.[].name'
llm-fragments-github
llm-openrouter
llm-fal
llm-grok
llm-cmd
llm-fragments-pypi
llm-gemini
llm-cmd-comp
llm-ollama
llm-replicate
llm-anthropic
llm-fragments-reader
llm-venice
llm-jq
llm-azure
llm-python
llm-video-frames
llm-fragments-pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment