Skip to content

pinkpixel-dev/CLIche

Repository files navigation

CLIche

CLIche Banner

A command-line interface for interacting with LLMs.

Features

  • Chat with LLMs from your terminal
  • Support for multiple LLM providers (Ollama, OpenAI, Anthropic, Google, DeepSeek, OpenRouter)
  • Modular memory system for storing and retrieving important information
  • Professional mode for more formal responses
  • System information inclusion for relevant queries
  • User profile for personalized interactions
  • Family information detection and storage
  • Natural language memory recall
  • Command-line memory retrieval
  • Syntax highlighting for code blocks in responses
  • Colored terminal output for improved readability
  • Playful CLI messages with personality

Installation

pip install cliche-cli

Or install from source:

git clone https://github.com/pinkpixel-dev/cliche.git
cd cliche
pip install -e .

Configuration

CLIche uses a configuration file located at ~/.config/cliche/config.json. You can create this file manually or let CLIche create it for you on first run.

Example configuration:

{
  "provider": "ollama",
  "providers": {
    "openai": {
      "api_key": "your-api-key",
      "model": "gpt-4o",
      "max_tokens": 16000
    },
    "anthropic": {
      "api_key": "your-api-key",
      "model": "claude-3-5-sonnet-20241022",
      "max_tokens": 8192
    },
    "google": {
      "api_key": "your-api-key",
      "model": "gemini-2.0-flash-exp",
      "max_tokens": 100000
    },
    "ollama": {
      "host": "http://localhost:11434",
      "model": "phi4",
      "max_tokens": 100000
    },
    "deepseek": {
      "api_key": "your-api-key",
      "model": "deepseek-chat",
      "max_tokens": 8192,
      "api_base": "https://api.deepseek.com/v1"
    },
    "openrouter": {
      "api_key": "your-api-key",
      "model": "meta-llama/llama-3.3-70b-instruct:free",
      "max_tokens": 100000
    }
  },
  "memory": {
    "enabled": true,
    "auto_memory": true,
    "user_id": "default",
    "data_dir": "~/.config/cliche/memory",
    "max_memories_per_query": 5,
    "memory_format": "paragraph",
    "store_user_profile": true,
    "store_family_info": true
  }
}

Usage

Basic Chat

cliche ask "What is the capital of France?"

Professional Mode

cliche ask --professional "Write a business email to schedule a meeting."

Including System Information

cliche ask --sys-info "What kind of CPU do I have?"

Memory Commands

Store a memory:

cliche remember "Python dictionaries use square brackets for accessing items."

Recall memories:

cliche recall "Python dictionaries"
# or
cliche memory recall "Python dictionaries"

Check memory status:

cliche memory stats

Ask a question with memory context:

# Memory is automatically used with ask command when enabled
cliche ask "question that might benefit from memory context"

# To disable memory for a specific query
cliche ask --no-memory "question without memory context"

Toggle memory system:

cliche memory toggle on  # Enable memory system
cliche memory toggle off  # Disable memory system

Toggle automatic memory creation:

cliche memory automemory on  # Enable automatic memory creation
cliche memory automemory off  # Disable automatic memory creation

Delete a memory:

cliche memory delete [MEMORY_ID]
# or
cliche forget [MEMORY_ID]

Memory System

CLIche includes a modular memory system that allows you to:

  1. Store important information for later recall
cliche remember "Important fact or information"
  1. Recall information with semantic search
cliche recall "search term"
# or
cliche memory recall "search term"
  1. Ask questions with memory context to get more personalized answers
# Memory is automatically used with the ask command when enabled
cliche ask "question that might benefit from memory context"

# To disable memory for a specific query
cliche ask --no-memory "question without memory context"
  1. Toggle the memory system on or off
cliche memory toggle on|off
  1. Enable or disable automatic memory creation
cliche memory automemory on|off
  1. List stored memories
cliche memory list
# Filter by category
cliche memory list --category programming
# Search for specific content
cliche memory list --query "Python"
  1. Show detailed information about a specific memory
cliche memory show [MEMORY_ID]
  1. Link related memories together
cliche memory link [SOURCE_ID] [TARGET_ID] --link-type "related"
  1. Get memory system statistics
cliche memory stats

For complete documentation on the memory system, see Memory System Documentation.

Interactive Chat

You can start an interactive chat session:

cliche chat

Within the chat, you can use these commands:

  • /help - Show help
  • /exit or /quit - Exit chat
  • /clear - Clear the screen
  • /save [filename] - Save chat history
  • /system - Toggle system info
  • /professional - Enable professional mode
  • /casual - Enable casual mode
  • /memory on|off - Enable/disable memory for this session
  • /remember text - Add specific text to memory
  • /forget - Manage memories (with search/deletion options)
  • /recall [query] - Recall memories

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Made with ❤️ by Pink Pixel

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published