orchat


Nameorchat JSON
Version 1.2.5 PyPI version JSON
download
home_pagehttps://github.com/oop7/OrChat
SummaryA powerful CLI for chatting with AI models through OpenRouter.
upload_time2025-07-25 18:38:03
maintainerNone
docs_urlNone
authoroop7
requires_python>=3.7
licenseMIT License
keywords chat cli ai openrouter orchat
VCS
bugtrack_url
requirements requests tiktoken rich python-dotenv colorama packaging pyfzf cryptography prompt_toolkit
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

# 🤖 OrChat

<img src="https://github.com/user-attachments/assets/df20dccc-8971-414e-9281-74260f05bf44" width="800" alt="OrChat Interface"/>

[![PyPI version](https://img.shields.io/pypi/v/orchat?color=86efac&style=for-the-badge&logo=pypi&logoColor=black)](https://badge.fury.io/py/orchat)
[![License: MIT](https://img.shields.io/badge/License-MIT-10b981?style=for-the-badge&logo=opensource&logoColor=white)](https://opensource.org/licenses/MIT)
[![Python 3.7+](https://img.shields.io/badge/python-3.7+-10b981?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/)
[![Downloads](https://img.shields.io/pypi/dm/orchat?color=1f2937&style=for-the-badge&logo=download&logoColor=white)](https://pepy.tech/project/orchat)
[![GitHub Stars](https://img.shields.io/github/stars/oop7/OrChat?color=86efac&style=for-the-badge&logo=github&logoColor=black)](https://github.com/oop7/OrChat/stargazers)

[🚀 Installation](#installation) • [✨ Features](#features) • [💬 Chat Commands](#chat-commands) • [📁 File Attachment](#file-attachment) • [🧠 Thinking Mode](#thinking-mode) • [⚙️ Configuration](#configuration) • [🔍 Troubleshooting](#troubleshooting) • [🤝 Contributing](#contributing)

A powerful CLI for chatting with AI models through OpenRouter with streaming responses, token tracking, and extensive customization options.

</div>


<a id="features"></a>
## ✨ Features

<details>
<summary><strong>🔗 Core Features</strong></summary>

- **Universal Model Access**: Connect to any AI model available on OpenRouter with dynamic model retrieval
- **Interactive Chat**: Enjoy a smooth conversation experience with real-time streaming responses
- **Rich Markdown Rendering**: View formatted text, code blocks, tables and more directly in your terminal
- **Performance Analytics**: Track token usage, response times, and total cost for efficiency monitoring
- **Command Auto-completion**: Enhanced user experience with intelligent command suggestions
- **Pricing Display**: Real-time pricing information displayed during active chat sessions

</details>

<details>
<summary><strong>📎 File & Media Support</strong></summary>

- **Multimodal Support**: Share images and various file types with compatible AI models
- **Enhanced File Processing**: Improved file attachment with better error handling and path support
- **File Attachment Support**: Share files of various types with the AI for analysis

</details>

<details>
<summary><strong>🧠 Advanced Features</strong></summary>

- **Smart Thinking Mode**: See the AI's reasoning process with compatible models
- **Multiple Export Formats**: Save conversations as Markdown, HTML, JSON, TXT, or PDF
- **Smart Context Management**: Automatically manages conversation history to stay within token limits
- **Customizable Themes**: Choose from different visual themes for your terminal

</details>

<a id="installation"></a>
## 🚀 Installation


<details>
<summary><strong>📦 Installation Methods</strong></summary>

### From PyPI (Recommended)

```bash
pip install orchat
```
```bash
# Run the application
orchat
```

### From Source

```bash
git clone https://github.com/oop7/OrChat.git
pip install -r requirements.txt
python main.py
```

</details>

</details>

<details>
<summary><strong>📋 Prerequisites</strong></summary>

- Python 3.7 or higher
- An OpenRouter API key (get one at [OpenRouter.ai](https://openrouter.ai))
- Required packages: in `requirements.txt`

</details>

<details>
<summary><strong>🏁 Getting Started</strong></summary>

1. Install OrChat using one of the methods above
2. Run the setup wizard
   - if you follow from source PyPI:
     ```bash
     orchat --setup
     ```
   - if you follow from source method:
     ```bash
     python main.py --setup
     ```
3. Enter your OpenRouter API key when prompted
4. Select your preferred AI model and configure settings
5. Start chatting!

</details>

<details>
<summary><strong>🪛 Add-Ons</strong></summary>

### FZF fuzzy search (Enhanced Model Selection)

1. Install fzf and pyfzf

   - Install pyfzf
     ```bash
     pip install pyfzf
     ```
   - Fzf can be downloaded from https://github.com/junegunn/fzf?tab=readme-ov-file#installation

2. Ensure fzf is in your path
3. From now on, the model selection will use fzf for powerful fuzzy search and filtering capabilities!

**Note**: If fzf is not installed, OrChat will automatically fall back to standard model selection.

</details>

<a id="configuration"></a>
## ⚙️ Configuration

<details>
<summary><strong>🔧 Configuration Methods</strong></summary>

OrChat can be configured in multiple ways:

1. **Setup Wizard**: Run `python main.py --setup` for interactive configuration
2. **Config File**: Edit the `config.ini` file in the application directory
3. **Environment Variables**: Create a `.env` file with your configuration
4. **System Environment Variables**: Set environment variables directly in your system (recommended for security)

**Enhanced Environment Support**: OrChat now supports system/user environment variables, removing the strict requirement for `.env` files.

</details>

<details>
<summary><strong>📄 Configuration Examples</strong></summary>

Example `.env` file:

```
OPENROUTER_API_KEY=your_api_key_here
```

Example `config.ini` structure:

```ini
[API]
OPENROUTER_API_KEY = your_api_key_here

[SETTINGS]
MODEL = anthropic/claude-3-opus
TEMPERATURE = 0.7
SYSTEM_INSTRUCTIONS = You are a helpful AI assistant.
THEME = default
MAX_TOKENS = 8000
AUTOSAVE_INTERVAL = 300
STREAMING = True
THINKING_MODE = False
```

</details>

<details>
<summary><strong>🖥️ Command-Line Options</strong></summary>

- `--setup`: Run the setup wizard
- `--model MODEL`: Specify the model to use (e.g., `--model "anthropic/claude-3-opus"`)
- `--task {creative,coding,analysis,chat}`: Optimize for a specific task type
- `--image PATH`: Analyze an image file

</details>

<a id="chat-commands"></a>
## 💬 Chat Commands

| Command                   | Description                                           |
| ------------------------- | ----------------------------------------------------- |
| `/help`                   | Show available commands                               |
| `/exit`                   | Exit the chat                                         |
| `/quit`                   | Exit the chat                                         |
| `/new`                    | Start a new conversation                              |
| `/clear`                  | Clear conversation history                            |
| `/cls` or `/clear-screen` | Clear the terminal screen                             |
| `/save [format]`          | Save conversation (formats: md, html, json, txt, pdf) |
| `/model`                  | Change the AI model                                   |
| `/temperature <0.0-2.0>`  | Adjust temperature setting                            |
| `/system`                 | View or change system instructions                    |
| `/tokens`                 | Show token usage statistics                           |
| `/speed`                  | Show response time statistics                         |
| `/theme <theme>`          | Change the color theme (default, dark, light, hacker) |
| `/thinking`               | Show last AI thinking process                         |
| `/thinking-mode`          | Toggle thinking mode on/off                           |
| `/attach` or `/upload`    | Share a file with the AI (can be used anywhere in your message) |
| `/about`                  | Show information about OrChat                         |
| `/update`                 | Check for updates                                     |
| `/settings`               | View current settings                                 |

<a id="file-attachment"></a>
## 📁 File Attachment

<details>
<summary><strong>📎 Basic Usage</strong></summary>

Share files with the AI for analysis using the enhanced attachment system:

```
/attach path/to/your/file.ext
/upload path/to/your/file.ext
```

</details>

<details>
<summary><strong>✨ Enhanced Features</strong></summary>

- **Flexible Command Usage**: `/upload` and `/attach` can be used anywhere in your message, not just at the beginning
- **Quoted Path Support**: Handles file paths with spaces using quotes (`/attach "C:\path with spaces\file.txt"`)
- **Better Error Handling**: Improved error messages and usage examples
- **File Preview**: Shows file metadata and preview before processing
- **Security Validation**: Built-in file size and type validation (10MB limit)

</details>

<details>
<summary><strong>📋 Supported File Types</strong></summary>

- **Images**: JPG, PNG, GIF, WEBP, BMP (displayed visually with multimodal models)
- **Code Files**: Python, JavaScript, Java, C++, TypeScript, Swift, etc. (with syntax highlighting)
- **Text Documents**: TXT, MD, CSV (full content displayed)
- **Data Files**: JSON, XML (displayed with formatting)
- **Web Files**: HTML, CSS (formatted display)
- **Archives**: ZIP, TAR, GZ, RAR (basic metadata support)

</details>

<a id="thinking-mode"></a>
## 🧠 Thinking Mode

<details>
<summary><strong>🎯 Basic Usage</strong></summary>

OrChat can display the AI's reasoning process with enhanced thinking mode:

```
/thinking-mode       # Toggle thinking mode on/off
/thinking            # Show the most recent thinking process
```

This feature allows you to see how the AI approached your question before giving its final answer. **Auto Thinking Mode** automatically enables this feature when you select models with reasoning support.

</details>

<details>
<summary><strong>✨ Enhanced Features</strong></summary>

- **Improved Detection**: Better extraction of thinking content from model responses
- **Model Compatibility**: Automatic handling of models that don't support thinking mode
- **Visual Indicators**: Clear status indicators showing if thinking mode is enabled
- **Flexible Setup**: Option to enable/disable during model selection

</details>

## 🎨 Themes

<details>
<summary><strong>🎨 Available Themes</strong></summary>

Change the visual appearance with the `/theme` command:

- **default**: Blue user, green assistant
- **dark**: Cyan user, magenta assistant
- **light**: Blue user, green assistant with lighter colors
- **hacker**: Matrix-inspired green text on black

</details>

## 📊 Token Management

<details>
<summary><strong>📊 Smart Context Management</strong></summary>

OrChat intelligently manages conversation context to keep within token limits:

- Automatically trims old messages when approaching limits
- Displays comprehensive token usage statistics including total tokens and cost tracking
- Shows real-time pricing information during active sessions
- Displays total cost tracking across conversations
- Allows manual clearing of context with `/clear`

</details>

## 🔄 Updates

<details>
<summary><strong>🔄 Version Management</strong></summary>

Check for updates with the `/update` command to see if a newer version is available.

</details>



<a id="troubleshooting"></a>
## 🔍 Troubleshooting

<details>
<summary><strong>🔍 Common Issues & Solutions</strong></summary>

- **API Key Issues**: Ensure your OpenRouter API key is correctly set in config.ini, .env file, or system environment variables. OrChat will prompt for re-entry if an incorrect key is detected
- **Insufficient Account Credit**: If you receive a 402 error, check your OpenRouter account balance and add funds as needed
- **File Path Problems**: When using `/attach` or `/upload`, use quotes for paths with spaces and ensure correct path format for your OS
- **Model Compatibility**: Some features like thinking mode only work with specific models
- **Command Usage**: Remember that `/upload` and `/attach` can be used anywhere in your message for flexibility

</details>

## 📝 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

<a id="contributing"></a>
## 🤝 Contributing

Contributions are welcome! Feel free to open issues or submit pull requests.

## 🙏 Acknowledgments

<details>
<summary><strong>🙏 Special Thanks</strong></summary>

- [OpenRouter](https://openrouter.ai/) for providing unified API access to AI models
- [Rich](https://github.com/Textualize/rich) for the beautiful terminal interface
- All contributors and users who provide feedback and help improve OrChat

</details>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/oop7/OrChat",
    "name": "orchat",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "chat, cli, ai, openrouter, orchat",
    "author": "oop7",
    "author_email": "oop7 <oop7_support@proton.me>",
    "download_url": "https://files.pythonhosted.org/packages/94/3a/2bae2077058f36669bb05f7ae478503aeb3bfd1bd3a9dd6643e909bc0bc2/orchat-1.2.5.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\r\n\r\n# \ud83e\udd16 OrChat\r\n\r\n<img src=\"https://github.com/user-attachments/assets/df20dccc-8971-414e-9281-74260f05bf44\" width=\"800\" alt=\"OrChat Interface\"/>\r\n\r\n[![PyPI version](https://img.shields.io/pypi/v/orchat?color=86efac&style=for-the-badge&logo=pypi&logoColor=black)](https://badge.fury.io/py/orchat)\r\n[![License: MIT](https://img.shields.io/badge/License-MIT-10b981?style=for-the-badge&logo=opensource&logoColor=white)](https://opensource.org/licenses/MIT)\r\n[![Python 3.7+](https://img.shields.io/badge/python-3.7+-10b981?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org/downloads/)\r\n[![Downloads](https://img.shields.io/pypi/dm/orchat?color=1f2937&style=for-the-badge&logo=download&logoColor=white)](https://pepy.tech/project/orchat)\r\n[![GitHub Stars](https://img.shields.io/github/stars/oop7/OrChat?color=86efac&style=for-the-badge&logo=github&logoColor=black)](https://github.com/oop7/OrChat/stargazers)\r\n\r\n[\ud83d\ude80 Installation](#installation) \u2022 [\u2728 Features](#features) \u2022 [\ud83d\udcac Chat Commands](#chat-commands) \u2022 [\ud83d\udcc1 File Attachment](#file-attachment) \u2022 [\ud83e\udde0 Thinking Mode](#thinking-mode) \u2022 [\u2699\ufe0f Configuration](#configuration) \u2022 [\ud83d\udd0d Troubleshooting](#troubleshooting) \u2022 [\ud83e\udd1d Contributing](#contributing)\r\n\r\nA powerful CLI for chatting with AI models through OpenRouter with streaming responses, token tracking, and extensive customization options.\r\n\r\n</div>\r\n\r\n\r\n<a id=\"features\"></a>\r\n## \u2728 Features\r\n\r\n<details>\r\n<summary><strong>\ud83d\udd17 Core Features</strong></summary>\r\n\r\n- **Universal Model Access**: Connect to any AI model available on OpenRouter with dynamic model retrieval\r\n- **Interactive Chat**: Enjoy a smooth conversation experience with real-time streaming responses\r\n- **Rich Markdown Rendering**: View formatted text, code blocks, tables and more directly in your terminal\r\n- **Performance Analytics**: Track token usage, response times, and total cost for efficiency monitoring\r\n- **Command Auto-completion**: Enhanced user experience with intelligent command suggestions\r\n- **Pricing Display**: Real-time pricing information displayed during active chat sessions\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83d\udcce File & Media Support</strong></summary>\r\n\r\n- **Multimodal Support**: Share images and various file types with compatible AI models\r\n- **Enhanced File Processing**: Improved file attachment with better error handling and path support\r\n- **File Attachment Support**: Share files of various types with the AI for analysis\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83e\udde0 Advanced Features</strong></summary>\r\n\r\n- **Smart Thinking Mode**: See the AI's reasoning process with compatible models\r\n- **Multiple Export Formats**: Save conversations as Markdown, HTML, JSON, TXT, or PDF\r\n- **Smart Context Management**: Automatically manages conversation history to stay within token limits\r\n- **Customizable Themes**: Choose from different visual themes for your terminal\r\n\r\n</details>\r\n\r\n<a id=\"installation\"></a>\r\n## \ud83d\ude80 Installation\r\n\r\n\r\n<details>\r\n<summary><strong>\ud83d\udce6 Installation Methods</strong></summary>\r\n\r\n### From PyPI (Recommended)\r\n\r\n```bash\r\npip install orchat\r\n```\r\n```bash\r\n# Run the application\r\norchat\r\n```\r\n\r\n### From Source\r\n\r\n```bash\r\ngit clone https://github.com/oop7/OrChat.git\r\npip install -r requirements.txt\r\npython main.py\r\n```\r\n\r\n</details>\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83d\udccb Prerequisites</strong></summary>\r\n\r\n- Python 3.7 or higher\r\n- An OpenRouter API key (get one at [OpenRouter.ai](https://openrouter.ai))\r\n- Required packages: in `requirements.txt`\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83c\udfc1 Getting Started</strong></summary>\r\n\r\n1. Install OrChat using one of the methods above\r\n2. Run the setup wizard\r\n   - if you follow from source PyPI:\r\n     ```bash\r\n     orchat --setup\r\n     ```\r\n   - if you follow from source method:\r\n     ```bash\r\n     python main.py --setup\r\n     ```\r\n3. Enter your OpenRouter API key when prompted\r\n4. Select your preferred AI model and configure settings\r\n5. Start chatting!\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83e\ude9b Add-Ons</strong></summary>\r\n\r\n### FZF fuzzy search (Enhanced Model Selection)\r\n\r\n1. Install fzf and pyfzf\r\n\r\n   - Install pyfzf\r\n     ```bash\r\n     pip install pyfzf\r\n     ```\r\n   - Fzf can be downloaded from https://github.com/junegunn/fzf?tab=readme-ov-file#installation\r\n\r\n2. Ensure fzf is in your path\r\n3. From now on, the model selection will use fzf for powerful fuzzy search and filtering capabilities!\r\n\r\n**Note**: If fzf is not installed, OrChat will automatically fall back to standard model selection.\r\n\r\n</details>\r\n\r\n<a id=\"configuration\"></a>\r\n## \u2699\ufe0f Configuration\r\n\r\n<details>\r\n<summary><strong>\ud83d\udd27 Configuration Methods</strong></summary>\r\n\r\nOrChat can be configured in multiple ways:\r\n\r\n1. **Setup Wizard**: Run `python main.py --setup` for interactive configuration\r\n2. **Config File**: Edit the `config.ini` file in the application directory\r\n3. **Environment Variables**: Create a `.env` file with your configuration\r\n4. **System Environment Variables**: Set environment variables directly in your system (recommended for security)\r\n\r\n**Enhanced Environment Support**: OrChat now supports system/user environment variables, removing the strict requirement for `.env` files.\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83d\udcc4 Configuration Examples</strong></summary>\r\n\r\nExample `.env` file:\r\n\r\n```\r\nOPENROUTER_API_KEY=your_api_key_here\r\n```\r\n\r\nExample `config.ini` structure:\r\n\r\n```ini\r\n[API]\r\nOPENROUTER_API_KEY = your_api_key_here\r\n\r\n[SETTINGS]\r\nMODEL = anthropic/claude-3-opus\r\nTEMPERATURE = 0.7\r\nSYSTEM_INSTRUCTIONS = You are a helpful AI assistant.\r\nTHEME = default\r\nMAX_TOKENS = 8000\r\nAUTOSAVE_INTERVAL = 300\r\nSTREAMING = True\r\nTHINKING_MODE = False\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83d\udda5\ufe0f Command-Line Options</strong></summary>\r\n\r\n- `--setup`: Run the setup wizard\r\n- `--model MODEL`: Specify the model to use (e.g., `--model \"anthropic/claude-3-opus\"`)\r\n- `--task {creative,coding,analysis,chat}`: Optimize for a specific task type\r\n- `--image PATH`: Analyze an image file\r\n\r\n</details>\r\n\r\n<a id=\"chat-commands\"></a>\r\n## \ud83d\udcac Chat Commands\r\n\r\n| Command                   | Description                                           |\r\n| ------------------------- | ----------------------------------------------------- |\r\n| `/help`                   | Show available commands                               |\r\n| `/exit`                   | Exit the chat                                         |\r\n| `/quit`                   | Exit the chat                                         |\r\n| `/new`                    | Start a new conversation                              |\r\n| `/clear`                  | Clear conversation history                            |\r\n| `/cls` or `/clear-screen` | Clear the terminal screen                             |\r\n| `/save [format]`          | Save conversation (formats: md, html, json, txt, pdf) |\r\n| `/model`                  | Change the AI model                                   |\r\n| `/temperature <0.0-2.0>`  | Adjust temperature setting                            |\r\n| `/system`                 | View or change system instructions                    |\r\n| `/tokens`                 | Show token usage statistics                           |\r\n| `/speed`                  | Show response time statistics                         |\r\n| `/theme <theme>`          | Change the color theme (default, dark, light, hacker) |\r\n| `/thinking`               | Show last AI thinking process                         |\r\n| `/thinking-mode`          | Toggle thinking mode on/off                           |\r\n| `/attach` or `/upload`    | Share a file with the AI (can be used anywhere in your message) |\r\n| `/about`                  | Show information about OrChat                         |\r\n| `/update`                 | Check for updates                                     |\r\n| `/settings`               | View current settings                                 |\r\n\r\n<a id=\"file-attachment\"></a>\r\n## \ud83d\udcc1 File Attachment\r\n\r\n<details>\r\n<summary><strong>\ud83d\udcce Basic Usage</strong></summary>\r\n\r\nShare files with the AI for analysis using the enhanced attachment system:\r\n\r\n```\r\n/attach path/to/your/file.ext\r\n/upload path/to/your/file.ext\r\n```\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\u2728 Enhanced Features</strong></summary>\r\n\r\n- **Flexible Command Usage**: `/upload` and `/attach` can be used anywhere in your message, not just at the beginning\r\n- **Quoted Path Support**: Handles file paths with spaces using quotes (`/attach \"C:\\path with spaces\\file.txt\"`)\r\n- **Better Error Handling**: Improved error messages and usage examples\r\n- **File Preview**: Shows file metadata and preview before processing\r\n- **Security Validation**: Built-in file size and type validation (10MB limit)\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\ud83d\udccb Supported File Types</strong></summary>\r\n\r\n- **Images**: JPG, PNG, GIF, WEBP, BMP (displayed visually with multimodal models)\r\n- **Code Files**: Python, JavaScript, Java, C++, TypeScript, Swift, etc. (with syntax highlighting)\r\n- **Text Documents**: TXT, MD, CSV (full content displayed)\r\n- **Data Files**: JSON, XML (displayed with formatting)\r\n- **Web Files**: HTML, CSS (formatted display)\r\n- **Archives**: ZIP, TAR, GZ, RAR (basic metadata support)\r\n\r\n</details>\r\n\r\n<a id=\"thinking-mode\"></a>\r\n## \ud83e\udde0 Thinking Mode\r\n\r\n<details>\r\n<summary><strong>\ud83c\udfaf Basic Usage</strong></summary>\r\n\r\nOrChat can display the AI's reasoning process with enhanced thinking mode:\r\n\r\n```\r\n/thinking-mode       # Toggle thinking mode on/off\r\n/thinking            # Show the most recent thinking process\r\n```\r\n\r\nThis feature allows you to see how the AI approached your question before giving its final answer. **Auto Thinking Mode** automatically enables this feature when you select models with reasoning support.\r\n\r\n</details>\r\n\r\n<details>\r\n<summary><strong>\u2728 Enhanced Features</strong></summary>\r\n\r\n- **Improved Detection**: Better extraction of thinking content from model responses\r\n- **Model Compatibility**: Automatic handling of models that don't support thinking mode\r\n- **Visual Indicators**: Clear status indicators showing if thinking mode is enabled\r\n- **Flexible Setup**: Option to enable/disable during model selection\r\n\r\n</details>\r\n\r\n## \ud83c\udfa8 Themes\r\n\r\n<details>\r\n<summary><strong>\ud83c\udfa8 Available Themes</strong></summary>\r\n\r\nChange the visual appearance with the `/theme` command:\r\n\r\n- **default**: Blue user, green assistant\r\n- **dark**: Cyan user, magenta assistant\r\n- **light**: Blue user, green assistant with lighter colors\r\n- **hacker**: Matrix-inspired green text on black\r\n\r\n</details>\r\n\r\n## \ud83d\udcca Token Management\r\n\r\n<details>\r\n<summary><strong>\ud83d\udcca Smart Context Management</strong></summary>\r\n\r\nOrChat intelligently manages conversation context to keep within token limits:\r\n\r\n- Automatically trims old messages when approaching limits\r\n- Displays comprehensive token usage statistics including total tokens and cost tracking\r\n- Shows real-time pricing information during active sessions\r\n- Displays total cost tracking across conversations\r\n- Allows manual clearing of context with `/clear`\r\n\r\n</details>\r\n\r\n## \ud83d\udd04 Updates\r\n\r\n<details>\r\n<summary><strong>\ud83d\udd04 Version Management</strong></summary>\r\n\r\nCheck for updates with the `/update` command to see if a newer version is available.\r\n\r\n</details>\r\n\r\n\r\n\r\n<a id=\"troubleshooting\"></a>\r\n## \ud83d\udd0d Troubleshooting\r\n\r\n<details>\r\n<summary><strong>\ud83d\udd0d Common Issues & Solutions</strong></summary>\r\n\r\n- **API Key Issues**: Ensure your OpenRouter API key is correctly set in config.ini, .env file, or system environment variables. OrChat will prompt for re-entry if an incorrect key is detected\r\n- **Insufficient Account Credit**: If you receive a 402 error, check your OpenRouter account balance and add funds as needed\r\n- **File Path Problems**: When using `/attach` or `/upload`, use quotes for paths with spaces and ensure correct path format for your OS\r\n- **Model Compatibility**: Some features like thinking mode only work with specific models\r\n- **Command Usage**: Remember that `/upload` and `/attach` can be used anywhere in your message for flexibility\r\n\r\n</details>\r\n\r\n## \ud83d\udcdd License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n<a id=\"contributing\"></a>\r\n## \ud83e\udd1d Contributing\r\n\r\nContributions are welcome! Feel free to open issues or submit pull requests.\r\n\r\n## \ud83d\ude4f Acknowledgments\r\n\r\n<details>\r\n<summary><strong>\ud83d\ude4f Special Thanks</strong></summary>\r\n\r\n- [OpenRouter](https://openrouter.ai/) for providing unified API access to AI models\r\n- [Rich](https://github.com/Textualize/rich) for the beautiful terminal interface\r\n- All contributors and users who provide feedback and help improve OrChat\r\n\r\n</details>\r\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "A powerful CLI for chatting with AI models through OpenRouter.",
    "version": "1.2.5",
    "project_urls": {
        "Bug-Tracker": "https://github.com/oop7/orchat/issues",
        "Homepage": "https://github.com/oop7/orchat",
        "Reddit": "https://www.reddit.com/r/NO-N_A_M_E/"
    },
    "split_keywords": [
        "chat",
        " cli",
        " ai",
        " openrouter",
        " orchat"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "83ae22d64749bad5f3ec36f99b2e0570cd80d26aff2e7d0e16d1942ad759dd19",
                "md5": "c6e2f992d41f8b14c084aaae1af257b4",
                "sha256": "aa4e5ede4c3ae8d929fb9ac0e021f4ee8673d1e4e412442285e91f5489f0043e"
            },
            "downloads": -1,
            "filename": "orchat-1.2.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c6e2f992d41f8b14c084aaae1af257b4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 31896,
            "upload_time": "2025-07-25T18:38:01",
            "upload_time_iso_8601": "2025-07-25T18:38:01.660081Z",
            "url": "https://files.pythonhosted.org/packages/83/ae/22d64749bad5f3ec36f99b2e0570cd80d26aff2e7d0e16d1942ad759dd19/orchat-1.2.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "943a2bae2077058f36669bb05f7ae478503aeb3bfd1bd3a9dd6643e909bc0bc2",
                "md5": "b77bbeba3eb74051438efb0ea01b5487",
                "sha256": "094a3741cc87cd98410961742fd4cfbd667b17aae6f8811aa2774bc8f134c6dc"
            },
            "downloads": -1,
            "filename": "orchat-1.2.5.tar.gz",
            "has_sig": false,
            "md5_digest": "b77bbeba3eb74051438efb0ea01b5487",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 36244,
            "upload_time": "2025-07-25T18:38:03",
            "upload_time_iso_8601": "2025-07-25T18:38:03.090230Z",
            "url": "https://files.pythonhosted.org/packages/94/3a/2bae2077058f36669bb05f7ae478503aeb3bfd1bd3a9dd6643e909bc0bc2/orchat-1.2.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-25 18:38:03",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "oop7",
    "github_project": "OrChat",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": []
        },
        {
            "name": "tiktoken",
            "specs": []
        },
        {
            "name": "rich",
            "specs": []
        },
        {
            "name": "python-dotenv",
            "specs": []
        },
        {
            "name": "colorama",
            "specs": []
        },
        {
            "name": "packaging",
            "specs": []
        },
        {
            "name": "pyfzf",
            "specs": []
        },
        {
            "name": "cryptography",
            "specs": []
        },
        {
            "name": "prompt_toolkit",
            "specs": []
        }
    ],
    "lcname": "orchat"
}
        
Elapsed time: 1.03473s