Skip to main content

summarizer | Summarize a link or text using LLM

summarizer is a command-line tool that uses large language models (LLMs) to summarize text or any content from a URL. It currently supports Anthropic (Claude), OpenAI (GPT), Google (Gemini), and local Ollama models. You can configure it to use your preferred provider/model or even direct it to your on-device models.

Source code is available on GitHubGitHub.

To install realpacific/summarizer,

uv tool install git+https://github.com/realpacific/summarizer

After installation, you need to run a one-time setup to configure the tool with your preferred provider and model.

summarizer init

#? Choose a provider: Anthropic (Claude)
#? Choose a model: claude-haiku-4-5
#? Enter your Anthropic (Claude) API key: ***********************************

Re-run it anytime to switch providers or models.

You can even configure it to use your locally running models. Make sure you have Ollama running and serving your desired model, then point the summarizer to it during initialization.

ollama serve

ollama list
# NAME SIZE MODIFIED
# gemma3:latest 3.3 GB 35 hours ago

summarizer init

#? Choose a provider: Ollama (local)
#? Choose a model: gemma3 <-------- choose your model
#? Base URL: http://localhost:11434 <------- point to your local Ollama server

Usage Instructions

Summarize an article from a URL

summarizer https://prashantbarahi.com.np/blog/your-readme-md-is-obsolete

Summarize a text

summarizer "some text to summarize"

Pipe your file or your clipboard to it. This is best for dynamic pages or contents behind paywalls.

cat file.txt | summarizer
pbpaste | summarizer

Is the article you're trying to summarize too complex? You can override the model for current run using:

summarizer --model claude-opus-4-8 https://prashantbarahi.com.np/blog/your-readme-md-is-obsolete

Still confused? You can ask the model to follow-up questions. Just add the --ask flag:

summarizer https://prashantbarahi.com.np/blog/your-readme-md-is-obsolete --ask

My personal favorite use case—Pipe the summary to a TTS tool like readthis and turn any summary into audio you can listen to.

summarizer https://prashantbarahi.com.np/blog/your-readme-md | readthis