homebrew-llm

Homebrew formulas for installing LLM and related tools

Stars
8
Committers
2

homebrew-llm

Homebrew formulas for installing the LLM family of tools.

If you have previously installed packages from this repository you may need to run brew update to ensure you have the latest versions of the formulas:

brew update

Installing llm

LLM lets you run prompts against large language models from the command-line.

brew install simonw/llm/llm

Example:

llm 'Ten great names for a pet pelican'

Installing strip-tags

strip-tags strip tags from HTML, useful for feeding content to a large language model while keeping the token count down.

brew install simonw/llm/strip-tags

Example:

curl -s 'https://www.nytimes.com/' | strip-tags | llm --system 'Summarize headlines'

Installing symbex

symbex is a tool for finding Python functions and classes within a codebase. It can also output just the signatures or docstrings of code that it finds.

brew install simonw/llm/symbex

Example - this finds the def inspect_hash() function and explains what it does:

symbex inspect_hash | llm --system 'explain this code'

Installing ttok

ttok is a tool for counting tokens. This is useful if you want to check that your content is not going to exceed the size limits for different LLM models.

brew install simonw/llm/ttok

This installation will also bring in a copy of Rust, if one is not yet available in your Homebrew setup.

Example, counting the total number of tokens in all of your test functions.

symbex 'test_*' | ttok