Library of the Week — Cohere Tokenizer (tiktoken alternative: `tokenizers`) A weekly teardown of one open-source AI/ML library: what it does, why it stands out, and when to use it. 2026-09-04T12:00:00.000Z Library of the Week Library of the Week open-sourcelibrariestoolsdeveloper-tools

Library of the Week — Cohere Tokenizer (tiktoken alternative: `tokenizers`)

A weekly teardown of one open-source AI/ML library: what it does, why it stands out, and when to use it.

Weekly One open-source library you should know about.

Cohere Tokenizer (tiktoken alternative: tokenizers) — wait, let me pick the right one.


llm — a CLI tool and Python library for interacting with language models from the command line

GitHub · Language: Python · License: Apache 2.0

What it does

llm is Simon Willison’s Swiss-army-knife CLI and Python library for running prompts against virtually any LLM — local or remote — from your terminal or scripts. It stores every prompt and response in a local SQLite database, making it uniquely useful for developers who want a lightweight, auditable scratchpad across models without spinning up an observability stack.

Why it stands out

  • Plugin ecosystem that actually covers the landscape — first-party and community plugins support Claude Opus 5, GPT-5.6 Sol, Gemini 3.7 Flash, Ollama-served local models, and more; switching providers is a one-flag change
  • Built-in logging by default — every call is persisted to SQLite automatically; llm logs lets you replay, inspect, and pipe past responses without any configuration
  • Composable Unix-style designcat file.txt | llm "summarize this" just works; chains naturally with grep, jq, and shell pipelines in ways that LangChain-style frameworks don’t encourage
  • Embeddings support baked inllm embed and llm similar give you a local vector search workflow without a separate vector DB for small-to-medium collections

Quick start

import llm

model = llm.get_model("claude-opus-5")
response = model.prompt(
    "Explain chain-of-thought prompting in two sentences",
    system="You are a concise technical writer.",
)
print(response.text())

# Every call is automatically logged — retrieve it later:
# $ llm logs --model claude-opus-5 -n 1

Or from the terminal:

llm -m gemini-3.7-flash "What changed in HTTP/3?" | tee notes.txt

When to use it

  • You’re rapidly prototyping across multiple providers and don’t want to rewrite API boilerplate each time you switch models
  • You want a zero-infrastructure audit trail of all your LLM experiments — the SQLite log is immediately queryable with standard tools
  • You’re building lightweight automation scripts where a full agent framework is overkill but raw API calls are tedious

When to skip it

  • You need streaming, tool-calling, or multi-turn conversation logic at production scale — llm supports these but it’s not designed around them the way PydanticAI or LangGraph is
  • Your team works primarily in TypeScript; llm is Python/CLI-first and the ecosystem doesn’t extend to JS

The verdict

llm earns its place on every AI developer’s machine as the fastest path from “I have a question for a model” to an answer — with receipts. It won’t replace a structured agent framework for complex workflows, but as a daily-driver scratchpad with a plugin ecosystem that keeps pace with the frontier model landscape, nothing else comes close.