Access large language models from the command-line
Find a file
2023-07-02 12:41:40 -07:00
.github/workflows Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
docs llm models default command, plus refactored env variables 2023-07-01 14:01:29 -07:00
llm Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
tests Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
.gitignore Initial prototype, refs #1 2023-04-01 14:28:24 -07:00
Justfile Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
LICENSE Initial prototype, refs #1 2023-04-01 14:28:24 -07:00
MANIFEST.in Don't include tests/ in the package 2023-07-01 11:45:00 -07:00
mypy.ini Added mypy, plus some fixes to make it happy - refs #77 2023-07-02 12:36:22 -07:00
README.md Link to license on main 2023-07-03 13:10:30 -07:00
ruff.toml Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00
setup.py Lint using Ruff, refs #78 2023-07-02 12:41:40 -07:00

LLM

PyPI Documentation Changelog Tests License

Access large language models from the command-line

Full documentation: llm.datasette.io

See llm, ttok and strip-tags—CLI tools for working with ChatGPT and other LLMs for more on this project.

Installation

Install this tool using pip:

pip install llm

Or using Homebrew:

brew install simonw/llm/llm

Detailed installation instructions.

Getting started

First, create an OpenAI API key and save it to the tool like this:

llm keys set openai

This will prompt you for your key like so:

$ llm keys set openai
Enter key:

Now that you've saved a key you can run a prompt like this:

llm "Five cute names for a pet penguin"
1. Waddles
2. Pebbles
3. Bubbles
4. Flappy
5. Chilly

Read the usage instructions for more.

Help

For help, run:

llm --help

You can also use:

python -m llm --help