Skip to content

ahhcash/llm-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LLM CLI 🚀

A command-line interface for getting instant coding help and technical explanations while maintaining conversational context.

Supported Models

  • ✅ Anthropic (Claude)
  • ✅ Mistral AI
  • ✅ OpenAI (GPT)

Features

  • Coding Assistant: Get concise explanations for programming concepts, debugging help, and code reviews
  • Context-Aware: Conversations persist locally, enabling follow-up questions and detailed discussions
  • Multi-Model: Switch between different LLMs while maintaining conversation context
  • Multiple Sessions: Manage parallel conversations with unique contexts

Installation

Using Go Install

go install github.com/ahhcash/llm-cli/cmd/llm@latest

Building from Source

git clone https://github.com/ahhcash/llm-cli
cd llm-cli
make

Quick Start

  1. Set API keys:
export ANTHROPIC_API_KEY="your-key"
export MISTRAL_API_KEY="your-key"
export OPENAI_API_KEY="your-key"
  1. Set default model:
export DEFAULT_COMPLETER="claude"  # or "mistral" or "gpt"

Usage

Get Coding Help

llm claude "Explain goroutines in Go"
llm claude "Review my function: func add(a, b int) int { return a + b }"
llm claude "Debug error: fatal: not a git repository"

Interactive Sessions

llm claude chat     # Start chat session
llm session list    # List all sessions
llm session switch <uuid>  # Switch context

Advanced Usage

llm claude -S "You are a security expert" "Review my SSH config"
llm claude --model claude-3-opus-20240229 "Complex system design"

Troubleshooting

  • Check environment variables if API calls fail
  • Ensure Go 1.21+ for building
  • Verify config directory permissions

License

MIT License - See LICENSE file

About

Use LLMs from the command line!

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published