Skip to content

kavith-k/llm-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

LLM CLI Tool

A command-line interface for interacting with large language models through OpenRouter.

This tool was mostly built using LLMs: ChatGPT 4o and Claude 3.5 Sonnet via Aider.

Setup

  1. Get an API key from OpenRouter
  2. Store your API key in the macOS Keychain:
security add-generic-password -s "OPENROUTER_API_KEY" -a "$USER" -w "<your-api-key>"
  1. Make sure you have jq installed

Usage

Basic usage:

llm "your question here"

Use Gemini model:

llm -g "your question here"

Use Claude 3.5 Sonnet:

llm -c "your question here"

Use DeepSeek R1:

llm -r1 "your question here"

Features

  • Direct access to powerful language models from the command line
  • Automatic token usage and cost tracking
  • Support for multiple models:
    • Meta's Llama 3.3 70B (default)
    • Google's Gemini 2.0 Flash
    • Anthropic's Claude 3.5 Sonnet
    • DeepSeek R1
  • Secure API key storage using macOS Keychain

Output

The tool provides:

  • The model's response
  • Statistics including:
    • Input tokens used
    • Output tokens generated
    • Generation time
    • Total cost

About

CLI tool to interact with LLMs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages