chatcmd


Namechatcmd JSON
Version 2.0.1 PyPI version JSON
download
home_pagehttps://github.com/naifalshaye/chatcmd
SummaryOpen-source AI CLI for command lookup, SQL generation, and developer tools with multi-model support (OpenAI, Anthropic, Google, Cohere, Ollama).
upload_time2025-09-16 14:35:27
maintainerNone
docs_urlNone
authorNaif Alshaye
requires_python>=3.8.9
licenseMIT License
keywords cli command command-line commandline terminal development linux ai artificial-intelligence chatcmd chatgpt gpt-4 gpt-3.5-turbo gpt-3.5-turbo claude gemini ollama lookup sql regex base64 qr open source mit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ChatCMD #

[![PyPI version](https://img.shields.io/pypi/v/chatcmd.svg?style=flat-square)](https://pypi.org/project/chatcmd)
[![Supported Python versions](https://img.shields.io/pypi/pyversions/chatcmd.svg?style=flat-square)](https://pypi.org/project/chatcmd)
[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)

#### **ChatCMD** is an open source AI-driven CLI-based command lookup using multiple AI models to lookup relevant CLI commands based on user input and other generating and lookup features. ####

#### Boost Your Productivity, ***Say Goodbye*** to Manual Searches ####

### What's New in 2.0
- Multi-provider workflow with unified model management (list models, model info, current model, performance stats)
- Provider-specific API key storage via secure keyring; legacy OpenAI flags kept for backward compatibility
- Optional length argument for `--random-password` (default 18)
- Enhanced, colored help and unified header output
- Stability and error handling improvements

## Features ##

### Core Features
- CLI-based command lookup using multiple AI models (OpenAI, Anthropic, Google, Cohere, Ollama)
- Generate SQL query using AI
- Generate a random user-agent
- Generate a random password
- Get your public IP address
- Get a color Hex code by describing the color
- Lookup HTTP Code
- Lookup any port number
- Auto copy command to clipboard
- Disable copy feature
- Store Data in Sqlite Database
- Add or update API keys for multiple providers
- Validate API keys
- Display API Keys
- Display last command
- Display last {number} of commands
- Delete last Command
- Delete last {number} of commands
- Display the total number of commands
- Clear all history records
- Display the database file size
- Clear and validate user inputs
- Clear and validate lookup results to ensure only valid CLI commands are returned
- Enhanced error handling with human-readable messages
- Display library information

#### Core Features Implementation Types

| Feature | Implementation | AI/API Usage | Description |
|---------|---------------|--------------|-------------|
| **CLI Command Lookup** | 🟢 AI-Powered | ✅ AI Models | Uses OpenAI, Anthropic, Google, Cohere, Ollama |
| **SQL Query Generation** | 🟢 AI-Powered | ✅ AI Models | AI generates SQL based on natural language |
| **Random User-Agent** | 🔴 Static Code | ❌ No AI | Uses predefined user-agent strings |
| **Random Password** | 🔴 Static Code | ❌ No AI | Uses Python's random library |
| **Public IP Address** | 🟡 External API | ⚠️ External Service | Uses external IP service (not AI) |
| **Color Hex Code** | 🔴 Static Code | ❌ No AI | Uses predefined color database |
| **HTTP Code Lookup** | 🔴 Static Code | ❌ No AI | Uses predefined HTTP status codes |
| **Port Lookup** | 🔴 Static Code | ❌ No AI | Uses predefined port database |
| **Database Operations** | 🔴 Static Code | ❌ No AI | Uses SQLite for local storage |
| **API Key Management** | 🔴 Static Code | ❌ No AI | Local storage and validation |
| **Command History** | 🔴 Static Code | ❌ No AI | Local database operations |
| **Clipboard Operations** | 🔴 Static Code | ❌ No AI | Uses pyperclip library |
| **Input Validation** | 🔴 Static Code | ❌ No AI | Regex and string validation |

**Summary:**
- **🟢 AI-Powered (2 features)**: CLI lookup and SQL generation
- **🔴 Static Code (10 features)**: Most core features work offline
- **🟡 External API (1 feature)**: IP address lookup only

### Developer Tools
- **Regex Pattern Generator** - Create regex patterns for common use cases
- **Base64 Encoder/Decoder** - Encode or decode base64 strings
- **UUID Generator** - Generate UUIDs in different formats
- **Timestamp Converter** - Convert between different timestamp formats
- **QR Code Generator** - Generate QR codes for text/URLs

#### Developer Tools Implementation Types

| Feature | Implementation | AI/API Usage | Benefits |
|---------|---------------|--------------|----------|
| **Regex Pattern Generator** | 🔴 Static Code | ❌ No AI | Instant response, predefined patterns |
| **Base64 Encoder/Decoder** | 🔴 Static Code | ❌ No AI | Fast, built-in Python library |
| **UUID Generator** | 🔴 Static Code | ❌ No AI | Fast, uses Python's uuid library |
| **Timestamp Converter** | 🔴 Static Code | ❌ No AI | Reliable, uses datetime library |
| **QR Code Generator** | 🟡 External API | ⚠️ External Service | Uses api.qrserver.com (not AI) |

**Key Benefits:**
- **86% Static Code**: Most tools work offline without API calls
- **No AI Costs**: Developer tools don't consume AI API credits
- **Fast Response**: Instant results without network latency
- **Reliable**: No dependency on external AI services
- **Offline Capable**: Works without internet (except QR codes)

### Multi-Model AI Support
- **OpenAI Models**: GPT-3.5 Turbo, GPT-4, GPT-4 Turbo
- **Anthropic Claude Models**: Claude 3 Haiku, Sonnet, Opus
- **Google Models**: Gemini Pro
- **Cohere Models**: Command, Command Light
- **Local Models (Ollama)**: Llama 2, Code Llama, Mistral, Llama 3.2 3B

## Requirements ##
    Python >= 3.8.9
    AI provider account and valid API key (OpenAI, Anthropic, Google, Cohere, or Ollama for local models)
    
    Get API keys:
    - OpenAI: https://platform.openai.com/signup
    - Anthropic: https://console.anthropic.com/
    - Google: https://makersuite.google.com/app/apikey
    - Cohere: https://dashboard.cohere.ai/
    - Ollama: https://ollama.ai/ (for local models)

## Installation ##
    pip3 install chatcmd
    
If pip not installed:

    python3 -m pip install chatcmd

Installation output should display:

    Collecting chatcmd
    Using cached chatcmd-2.0.1-py3-none-any.whl (6.8 kB)
    Installing collected packages: chatcmd
    Successfully installed chatcmd-2.0.1

### Upgrade ###
    pip3 install --upgrade chatcmd

If pip not installed:

    python3 -m pip install --upgrade chatcmd

### Uninstall ###
    pip3 uninstall chatcmd

If pip not installed:

    python3 -m pip uninstall chatcmd

## Quick Start ##

### 1. Set Up API Keys
```bash
# Set OpenAI API key
chatcmd --set-model-key openai

# Set Anthropic API key
chatcmd --set-model-key anthropic

# Set Google API key
chatcmd --set-model-key google

# Set Cohere API key
chatcmd --set-model-key cohere
```

### 2. List Available Models
```bash
chatcmd --list-models
```

### 3. Basic Usage
```bash
# Use default model (GPT-3.5 Turbo)
chatcmd --cmd

# Use specific model
chatcmd --model gpt-4 --cmd

# Generate a random password with custom length (default is 18)
chatcmd --random-password 24

```

## Usage ##

```
Usage:

chatcmd [options]

Core Features:
  -c, --cmd                         looking up a CLI command.
  -q, --sql                         generate SQL query.

Tools:
  --random-useragent                generate a random user-agent
  --get-ip                          get your public IP address.
  --random-password [<length>]      generate a random password (default: 18).
  --color-code                      get a color Hex code.
  --lookup-http-code                lookup HTTP Code by code number.
  --port-lookup                     lookup any port number.
  --regex-pattern                   generate regex pattern for description.
  --base64-encode                   encode text to base64.
  --base64-decode                   decode base64 text.
  --generate-uuid <version>         generate UUID (1, 3, 4, 5).
  --timestamp-convert <format>      convert timestamp (unix, iso, readable).
  --qr-code                         generate QR code for text/URL.

Library Options:
  -k, --set-key                     set or update API key (legacy OpenAI only).
  -o, --get-key                     display API key (legacy OpenAI only).
  -m, --model <model>               select AI model (gpt-3.5-turbo, gpt-4, claude-3-haiku, etc.)
  --list-models                     list all available AI models
  --model-info <model>              show information about a specific model
  --set-model-key <provider>        set API key for specific provider
  --get-model-key <provider>        get API key for specific provider
  --current-model                   show current model and provider
  --performance-stats               show model performance statistics
  -g, --get-cmd                     display the last command.
  -G, --get-last=<value>            display the last [number] of commands.
  -d, --delete-cmd                  delete the last command.
  -D, --delete-last-cmd=<value>     delete the last [number] of commands.
  -t, --cmd-total                   display the total number of commands.
  -r, --clear-history               clear all history records.
  -s, --db-size                     display the database size.
  -n, --no-copy                     disable copy feature.
  -h, --help                        display this screen.
  -v, --version                     display ChatCMD version.
  -x, --library-info                display library information.

```

## Usage Examples ##

### Basic CLI Command Lookup
```bash
# Use default model
chatcmd --cmd "find all files larger than 100MB"

# Use specific model
chatcmd --model gpt-4 --cmd "create a backup of my database"
```

### Developer Tools
```bash
# Generate regex pattern
chatcmd --regex-pattern "email validation"


# Generate UUID
chatcmd --generate-uuid 4

# Convert timestamp
chatcmd --timestamp-convert unix

# Generate QR code
chatcmd --qr-code
```

### Multi-Model Usage
```bash
# List available models
chatcmd --list-models

# Use Claude 3 Sonnet
chatcmd --model claude-3-sonnet --cmd

# Use local Llama 2 (requires Ollama)
chatcmd --model llama2 --cmd

# Check current model
chatcmd --current-model

# View performance statistics
chatcmd --performance-stats
```

### Provider Key Management
```bash
# Set API key for a specific provider (recommended)
chatcmd --set-model-key openai
chatcmd --set-model-key anthropic
chatcmd --set-model-key google
chatcmd --set-model-key cohere

# Get masked API key for a provider
chatcmd --get-model-key openai
```

### Local Models Setup (Ollama)
```bash
# Install Ollama
# macOS: brew install ollama
# Linux: curl -fsSL https://ollama.ai/install.sh | sh

# Pull models
ollama pull llama2
ollama pull codellama
ollama pull mistral
ollama pull llama3.2:3b

# Use local models
chatcmd --model llama2 --cmd
chatcmd --model codellama --cmd
chatcmd --model llama3.2:3b --cmd
```

## Model Comparison ##

| Model | Speed | Quality | Cost | Best For |
|-------|-------|---------|------|----------|
| gpt-3.5-turbo | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ | General use, fast responses |
| gpt-4 | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐ | Complex commands, best quality |
| claude-3-haiku | ⭐⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐ | Fast, good quality |
| claude-3-sonnet | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | Balanced performance |
| claude-3-opus | ⭐⭐ | ⭐⭐⭐⭐⭐ | ⭐ | Best quality, complex tasks |
| gemini-pro | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐ | Google ecosystem |
| command | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐ | Cost-effective |
| llama2 (local) | ⭐⭐⭐ | ⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Privacy, no API costs |
| codellama (local) | ⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Coding tasks, privacy |
| llama3.2:3b (local) | ⭐⭐⭐⭐ | ⭐⭐⭐⭐ | ⭐⭐⭐⭐⭐ | Small, fast local model |

## Error Codes ##
Include an exception message for each error if occurs.

| Code |             Description             |
|------|:-----------------------------------:|
| 1001 |          General exception          |
| 1002 |    Failed to connect to database    |
| 1003 | Failed to get API key from database |
| 1004 |      Failed to output API key       |
| 1005 | Failed to save API key to database  |
| 1006 |       Invalid ChatGPT API key       |
| 1007 |      Failed requesting API key      |
| 1008 |        Failed to add command        |
| 1009 |    API key is invalid or missing    |
| 1010 |      OpenAI API error occurred      |
| 1011 |      Lookup exception occurred      |
| 1012 |        Failed to add command        |
| 1013 |     Failed to get last command      |
| 1014 |    Failed to get list of command    |
| 1015 |    Failed deleting last command     |
| 1016 |     Failed to get last command      |
| 1017 |       Failed clearing history       |
| 1018 |       Failed to copy command        |

### Linux copy command issue
In order to perform a Graphics-related job in a Unix environment,
the DISPLAY variable needs to be set initially.
An error can occur when connecting to Linux via SSH, particularly if there is no copy/paste mechanism like Xclip installed.
To resolve this, you can try installing Xclip using the following command: "sudo apt-get install xclip".
Additionally, you need to export the DISPLAY variable by running: "export DISPLAY=:0.0".

To avoid the error message, you can use the "-no-copy" option when looking up a command, as it disables the copy feature.
## Support ##
[Issues](https://github.com/naifalshaye/chatcmd/issues)


Developed and maintained by:\
Naif Alshaye\
[https://naif.io](https://naif.io)\
naif@naif.io



## License
The MIT License (MIT). Please see License File [MIT License](https://choosealicense.com/licenses/mit/) for more information.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/naifalshaye/chatcmd",
    "name": "chatcmd",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8.9",
    "maintainer_email": null,
    "keywords": "cli, command, command-line, commandline, terminal, development, linux, ai, artificial-intelligence, chatcmd, chatgpt, gpt-4, gpt-3.5-turbo, gpt-3.5-turbo, claude, gemini, ollama, lookup, SQL, regex, base64, qr, open source, MIT",
    "author": "Naif Alshaye",
    "author_email": "Naif Alshaye <naif@naif.io>",
    "download_url": "https://files.pythonhosted.org/packages/4d/42/16129875758c635b30a8d88885acaf60b8bd30ec40a5cd626e0715cbf397/chatcmd-2.0.1.tar.gz",
    "platform": null,
    "description": "# ChatCMD #\n\n[![PyPI version](https://img.shields.io/pypi/v/chatcmd.svg?style=flat-square)](https://pypi.org/project/chatcmd)\n[![Supported Python versions](https://img.shields.io/pypi/pyversions/chatcmd.svg?style=flat-square)](https://pypi.org/project/chatcmd)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://en.wikipedia.org/wiki/MIT_License)\n\n#### **ChatCMD** is an open source AI-driven CLI-based command lookup using multiple AI models to lookup relevant CLI commands based on user input and other generating and lookup features. ####\n\n#### Boost Your Productivity, ***Say Goodbye*** to Manual Searches ####\n\n### What's New in 2.0\n- Multi-provider workflow with unified model management (list models, model info, current model, performance stats)\n- Provider-specific API key storage via secure keyring; legacy OpenAI flags kept for backward compatibility\n- Optional length argument for `--random-password` (default 18)\n- Enhanced, colored help and unified header output\n- Stability and error handling improvements\n\n## Features ##\n\n### Core Features\n- CLI-based command lookup using multiple AI models (OpenAI, Anthropic, Google, Cohere, Ollama)\n- Generate SQL query using AI\n- Generate a random user-agent\n- Generate a random password\n- Get your public IP address\n- Get a color Hex code by describing the color\n- Lookup HTTP Code\n- Lookup any port number\n- Auto copy command to clipboard\n- Disable copy feature\n- Store Data in Sqlite Database\n- Add or update API keys for multiple providers\n- Validate API keys\n- Display API Keys\n- Display last command\n- Display last {number} of commands\n- Delete last Command\n- Delete last {number} of commands\n- Display the total number of commands\n- Clear all history records\n- Display the database file size\n- Clear and validate user inputs\n- Clear and validate lookup results to ensure only valid CLI commands are returned\n- Enhanced error handling with human-readable messages\n- Display library information\n\n#### Core Features Implementation Types\n\n| Feature | Implementation | AI/API Usage | Description |\n|---------|---------------|--------------|-------------|\n| **CLI Command Lookup** | \ud83d\udfe2 AI-Powered | \u2705 AI Models | Uses OpenAI, Anthropic, Google, Cohere, Ollama |\n| **SQL Query Generation** | \ud83d\udfe2 AI-Powered | \u2705 AI Models | AI generates SQL based on natural language |\n| **Random User-Agent** | \ud83d\udd34 Static Code | \u274c No AI | Uses predefined user-agent strings |\n| **Random Password** | \ud83d\udd34 Static Code | \u274c No AI | Uses Python's random library |\n| **Public IP Address** | \ud83d\udfe1 External API | \u26a0\ufe0f External Service | Uses external IP service (not AI) |\n| **Color Hex Code** | \ud83d\udd34 Static Code | \u274c No AI | Uses predefined color database |\n| **HTTP Code Lookup** | \ud83d\udd34 Static Code | \u274c No AI | Uses predefined HTTP status codes |\n| **Port Lookup** | \ud83d\udd34 Static Code | \u274c No AI | Uses predefined port database |\n| **Database Operations** | \ud83d\udd34 Static Code | \u274c No AI | Uses SQLite for local storage |\n| **API Key Management** | \ud83d\udd34 Static Code | \u274c No AI | Local storage and validation |\n| **Command History** | \ud83d\udd34 Static Code | \u274c No AI | Local database operations |\n| **Clipboard Operations** | \ud83d\udd34 Static Code | \u274c No AI | Uses pyperclip library |\n| **Input Validation** | \ud83d\udd34 Static Code | \u274c No AI | Regex and string validation |\n\n**Summary:**\n- **\ud83d\udfe2 AI-Powered (2 features)**: CLI lookup and SQL generation\n- **\ud83d\udd34 Static Code (10 features)**: Most core features work offline\n- **\ud83d\udfe1 External API (1 feature)**: IP address lookup only\n\n### Developer Tools\n- **Regex Pattern Generator** - Create regex patterns for common use cases\n- **Base64 Encoder/Decoder** - Encode or decode base64 strings\n- **UUID Generator** - Generate UUIDs in different formats\n- **Timestamp Converter** - Convert between different timestamp formats\n- **QR Code Generator** - Generate QR codes for text/URLs\n\n#### Developer Tools Implementation Types\n\n| Feature | Implementation | AI/API Usage | Benefits |\n|---------|---------------|--------------|----------|\n| **Regex Pattern Generator** | \ud83d\udd34 Static Code | \u274c No AI | Instant response, predefined patterns |\n| **Base64 Encoder/Decoder** | \ud83d\udd34 Static Code | \u274c No AI | Fast, built-in Python library |\n| **UUID Generator** | \ud83d\udd34 Static Code | \u274c No AI | Fast, uses Python's uuid library |\n| **Timestamp Converter** | \ud83d\udd34 Static Code | \u274c No AI | Reliable, uses datetime library |\n| **QR Code Generator** | \ud83d\udfe1 External API | \u26a0\ufe0f External Service | Uses api.qrserver.com (not AI) |\n\n**Key Benefits:**\n- **86% Static Code**: Most tools work offline without API calls\n- **No AI Costs**: Developer tools don't consume AI API credits\n- **Fast Response**: Instant results without network latency\n- **Reliable**: No dependency on external AI services\n- **Offline Capable**: Works without internet (except QR codes)\n\n### Multi-Model AI Support\n- **OpenAI Models**: GPT-3.5 Turbo, GPT-4, GPT-4 Turbo\n- **Anthropic Claude Models**: Claude 3 Haiku, Sonnet, Opus\n- **Google Models**: Gemini Pro\n- **Cohere Models**: Command, Command Light\n- **Local Models (Ollama)**: Llama 2, Code Llama, Mistral, Llama 3.2 3B\n\n## Requirements ##\n    Python >= 3.8.9\n    AI provider account and valid API key (OpenAI, Anthropic, Google, Cohere, or Ollama for local models)\n    \n    Get API keys:\n    - OpenAI: https://platform.openai.com/signup\n    - Anthropic: https://console.anthropic.com/\n    - Google: https://makersuite.google.com/app/apikey\n    - Cohere: https://dashboard.cohere.ai/\n    - Ollama: https://ollama.ai/ (for local models)\n\n## Installation ##\n    pip3 install chatcmd\n    \nIf pip not installed:\n\n    python3 -m pip install chatcmd\n\nInstallation output should display:\n\n    Collecting chatcmd\n    Using cached chatcmd-2.0.1-py3-none-any.whl (6.8 kB)\n    Installing collected packages: chatcmd\n    Successfully installed chatcmd-2.0.1\n\n### Upgrade ###\n    pip3 install --upgrade chatcmd\n\nIf pip not installed:\n\n    python3 -m pip install --upgrade chatcmd\n\n### Uninstall ###\n    pip3 uninstall chatcmd\n\nIf pip not installed:\n\n    python3 -m pip uninstall chatcmd\n\n## Quick Start ##\n\n### 1. Set Up API Keys\n```bash\n# Set OpenAI API key\nchatcmd --set-model-key openai\n\n# Set Anthropic API key\nchatcmd --set-model-key anthropic\n\n# Set Google API key\nchatcmd --set-model-key google\n\n# Set Cohere API key\nchatcmd --set-model-key cohere\n```\n\n### 2. List Available Models\n```bash\nchatcmd --list-models\n```\n\n### 3. Basic Usage\n```bash\n# Use default model (GPT-3.5 Turbo)\nchatcmd --cmd\n\n# Use specific model\nchatcmd --model gpt-4 --cmd\n\n# Generate a random password with custom length (default is 18)\nchatcmd --random-password 24\n\n```\n\n## Usage ##\n\n```\nUsage:\n\nchatcmd [options]\n\nCore Features:\n  -c, --cmd                         looking up a CLI command.\n  -q, --sql                         generate SQL query.\n\nTools:\n  --random-useragent                generate a random user-agent\n  --get-ip                          get your public IP address.\n  --random-password [<length>]      generate a random password (default: 18).\n  --color-code                      get a color Hex code.\n  --lookup-http-code                lookup HTTP Code by code number.\n  --port-lookup                     lookup any port number.\n  --regex-pattern                   generate regex pattern for description.\n  --base64-encode                   encode text to base64.\n  --base64-decode                   decode base64 text.\n  --generate-uuid <version>         generate UUID (1, 3, 4, 5).\n  --timestamp-convert <format>      convert timestamp (unix, iso, readable).\n  --qr-code                         generate QR code for text/URL.\n\nLibrary Options:\n  -k, --set-key                     set or update API key (legacy OpenAI only).\n  -o, --get-key                     display API key (legacy OpenAI only).\n  -m, --model <model>               select AI model (gpt-3.5-turbo, gpt-4, claude-3-haiku, etc.)\n  --list-models                     list all available AI models\n  --model-info <model>              show information about a specific model\n  --set-model-key <provider>        set API key for specific provider\n  --get-model-key <provider>        get API key for specific provider\n  --current-model                   show current model and provider\n  --performance-stats               show model performance statistics\n  -g, --get-cmd                     display the last command.\n  -G, --get-last=<value>            display the last [number] of commands.\n  -d, --delete-cmd                  delete the last command.\n  -D, --delete-last-cmd=<value>     delete the last [number] of commands.\n  -t, --cmd-total                   display the total number of commands.\n  -r, --clear-history               clear all history records.\n  -s, --db-size                     display the database size.\n  -n, --no-copy                     disable copy feature.\n  -h, --help                        display this screen.\n  -v, --version                     display ChatCMD version.\n  -x, --library-info                display library information.\n\n```\n\n## Usage Examples ##\n\n### Basic CLI Command Lookup\n```bash\n# Use default model\nchatcmd --cmd \"find all files larger than 100MB\"\n\n# Use specific model\nchatcmd --model gpt-4 --cmd \"create a backup of my database\"\n```\n\n### Developer Tools\n```bash\n# Generate regex pattern\nchatcmd --regex-pattern \"email validation\"\n\n\n# Generate UUID\nchatcmd --generate-uuid 4\n\n# Convert timestamp\nchatcmd --timestamp-convert unix\n\n# Generate QR code\nchatcmd --qr-code\n```\n\n### Multi-Model Usage\n```bash\n# List available models\nchatcmd --list-models\n\n# Use Claude 3 Sonnet\nchatcmd --model claude-3-sonnet --cmd\n\n# Use local Llama 2 (requires Ollama)\nchatcmd --model llama2 --cmd\n\n# Check current model\nchatcmd --current-model\n\n# View performance statistics\nchatcmd --performance-stats\n```\n\n### Provider Key Management\n```bash\n# Set API key for a specific provider (recommended)\nchatcmd --set-model-key openai\nchatcmd --set-model-key anthropic\nchatcmd --set-model-key google\nchatcmd --set-model-key cohere\n\n# Get masked API key for a provider\nchatcmd --get-model-key openai\n```\n\n### Local Models Setup (Ollama)\n```bash\n# Install Ollama\n# macOS: brew install ollama\n# Linux: curl -fsSL https://ollama.ai/install.sh | sh\n\n# Pull models\nollama pull llama2\nollama pull codellama\nollama pull mistral\nollama pull llama3.2:3b\n\n# Use local models\nchatcmd --model llama2 --cmd\nchatcmd --model codellama --cmd\nchatcmd --model llama3.2:3b --cmd\n```\n\n## Model Comparison ##\n\n| Model | Speed | Quality | Cost | Best For |\n|-------|-------|---------|------|----------|\n| gpt-3.5-turbo | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50 | \u2b50\u2b50 | General use, fast responses |\n| gpt-4 | \u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50\u2b50 | \u2b50 | Complex commands, best quality |\n| claude-3-haiku | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50 | \u2b50\u2b50 | Fast, good quality |\n| claude-3-sonnet | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50 | Balanced performance |\n| claude-3-opus | \u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50\u2b50 | \u2b50 | Best quality, complex tasks |\n| gemini-pro | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50 | Google ecosystem |\n| command | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50 | Cost-effective |\n| llama2 (local) | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50\u2b50 | Privacy, no API costs |\n| codellama (local) | \u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50\u2b50 | Coding tasks, privacy |\n| llama3.2:3b (local) | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50 | \u2b50\u2b50\u2b50\u2b50\u2b50 | Small, fast local model |\n\n## Error Codes ##\nInclude an exception message for each error if occurs.\n\n| Code |             Description             |\n|------|:-----------------------------------:|\n| 1001 |          General exception          |\n| 1002 |    Failed to connect to database    |\n| 1003 | Failed to get API key from database |\n| 1004 |      Failed to output API key       |\n| 1005 | Failed to save API key to database  |\n| 1006 |       Invalid ChatGPT API key       |\n| 1007 |      Failed requesting API key      |\n| 1008 |        Failed to add command        |\n| 1009 |    API key is invalid or missing    |\n| 1010 |      OpenAI API error occurred      |\n| 1011 |      Lookup exception occurred      |\n| 1012 |        Failed to add command        |\n| 1013 |     Failed to get last command      |\n| 1014 |    Failed to get list of command    |\n| 1015 |    Failed deleting last command     |\n| 1016 |     Failed to get last command      |\n| 1017 |       Failed clearing history       |\n| 1018 |       Failed to copy command        |\n\n### Linux copy command issue\nIn order to perform a Graphics-related job in a Unix environment,\nthe DISPLAY variable needs to be set initially.\nAn error can occur when connecting to Linux via SSH, particularly if there is no copy/paste mechanism like Xclip installed.\nTo resolve this, you can try installing Xclip using the following command: \"sudo apt-get install xclip\".\nAdditionally, you need to export the DISPLAY variable by running: \"export DISPLAY=:0.0\".\n\nTo avoid the error message, you can use the \"-no-copy\" option when looking up a command, as it disables the copy feature.\n## Support ##\n[Issues](https://github.com/naifalshaye/chatcmd/issues)\n\n\nDeveloped and maintained by:\\\nNaif Alshaye\\\n[https://naif.io](https://naif.io)\\\nnaif@naif.io\n\n\n\n## License\nThe MIT License (MIT). Please see License File [MIT License](https://choosealicense.com/licenses/mit/) for more information.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Open-source AI CLI for command lookup, SQL generation, and developer tools with multi-model support (OpenAI, Anthropic, Google, Cohere, Ollama).",
    "version": "2.0.1",
    "project_urls": {
        "Bug Tracker": "https://github.com/naifalshaye/chatcmd/issues",
        "Documentation": "https://github.com/naifalshaye/chatcmd/blob/master/README.md",
        "Homepage": "https://github.com/naifalshaye/chatcmd",
        "Repository": "https://github.com/naifalshaye/chatcmd.git"
    },
    "split_keywords": [
        "cli",
        " command",
        " command-line",
        " commandline",
        " terminal",
        " development",
        " linux",
        " ai",
        " artificial-intelligence",
        " chatcmd",
        " chatgpt",
        " gpt-4",
        " gpt-3.5-turbo",
        " gpt-3.5-turbo",
        " claude",
        " gemini",
        " ollama",
        " lookup",
        " sql",
        " regex",
        " base64",
        " qr",
        " open source",
        " mit"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c9ba3b3d23ecb2f48a983f0a53dd3c505d571cef991600e0c32fbd7ad0e55467",
                "md5": "de8ca2f43994f160af9ef726bc8543e6",
                "sha256": "0b62cedc2bf28db8c5baff2b7c03c6041f76a3f1ef039ec2e781d7902419460c"
            },
            "downloads": -1,
            "filename": "chatcmd-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "de8ca2f43994f160af9ef726bc8543e6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8.9",
            "size": 52822,
            "upload_time": "2025-09-16T14:35:25",
            "upload_time_iso_8601": "2025-09-16T14:35:25.495366Z",
            "url": "https://files.pythonhosted.org/packages/c9/ba/3b3d23ecb2f48a983f0a53dd3c505d571cef991600e0c32fbd7ad0e55467/chatcmd-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "4d4216129875758c635b30a8d88885acaf60b8bd30ec40a5cd626e0715cbf397",
                "md5": "498664e2e0ef8f9007f06c79627da725",
                "sha256": "ecd11d92faae4470d695bcb712745d27b50939d0b25963b47890df296a1dc626"
            },
            "downloads": -1,
            "filename": "chatcmd-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "498664e2e0ef8f9007f06c79627da725",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8.9",
            "size": 44153,
            "upload_time": "2025-09-16T14:35:27",
            "upload_time_iso_8601": "2025-09-16T14:35:27.101744Z",
            "url": "https://files.pythonhosted.org/packages/4d/42/16129875758c635b30a8d88885acaf60b8bd30ec40a5cd626e0715cbf397/chatcmd-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-16 14:35:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "naifalshaye",
    "github_project": "chatcmd",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "chatcmd"
}
        
Elapsed time: 0.83503s