llm-cli
A simple CLI for using LLM APIs
Links
README
From the repo.
llm-cli
A simple but full-featured CLI powered by Deno for chatting with LLMs.
Thanks to Justin Bennett for the script that inspired this.
Features
Supports a bunch of models
And it's easy to add more.
Beautiful output powered by markdown
Equations render as images in Ghostty and Kitty, with raw TeX elsewhere. Try
deno task math-demo for examples.
Continue chat with replies
Read input from stdin
Upload chat to GitHub Gist for sharing or permanent storage
https://gist.github.com/david-crespo/a2bf06be5db310db967b2e35f6140da2
Limitations
No vision, no streaming responses (yet).
Setup
API keys
Set any or all of these, depending on which models you want to use. It is often convenient
to put them in a .env file like below and call source .env.
export OPENAI_API_KEY=abc-123
export ANTHROPIC_API_KEY=def-456
export GEMINI_API_KEY=ghi-789
The script does not automatically pick up a .env file; the variables need to be set in the
environment.
Dependencies
- Deno (essential)
gh(GitHub CLI, optional)- Only needed if you want to upload chats as GitHub gists
- You'll need to be logged in
(
gh auth login)
Installation
Clone the repo. Then you just need a way to run main.ts. I use this function in my
.zprofile:
function ai() {
source ~/path/to/.env
~/repos/llm-cli/main.ts "$@"
}
The "$@" passes all command-line arguments to main.ts.
You'll need to chmod +x the script in order to be able to execute it directly like above.
Otherwise, you could run it with deno run path/to/main.ts, but that is less convenient
because you'll have to set all the permissions I've set in the shebang line.
Contributions
This is mostly for me (though I'd be thrilled if people find it useful), so I'm not really interested in changes that make this tool more general-purpose unless a) I want to use them, b) they don't make the interface any more complicated. The open issues include features I'd be interested in adding.
Collected info
- ★ 19 stars
- ⎇ 3 forks
- Language: TypeScript
- Source updated: 9/15/2026
Config for your environment
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.