Metadata-Version: 2.4
Name: claude-api-desktop
Version: 1.0.0
Summary: A modern desktop client for the Anthropic Claude API with streaming support and extended context capabilities
Author-email: Anthony Maio <anthony.maio@gmail.com>
Maintainer-email: Anthony Maio <anthony.maio@gmail.com>
Project-URL: Homepage, https://github.com/anthony-maio/claude-api-desktop
Project-URL: Documentation, https://github.com/anthony-maio/claude-api-desktop#readme
Project-URL: Repository, https://github.com/anthony-maio/claude-api-desktop
Project-URL: Bug Tracker, https://github.com/anthony-maio/claude-api-desktop/issues
Project-URL: Feature Requests, https://github.com/anthony-maio/claude-api-desktop/discussions
Project-URL: Changelog, https://github.com/anthony-maio/claude-api-desktop/releases
Keywords: claude,anthropic,ai,chatbot,api-client,desktop-application,streaming,gui,artificial-intelligence,machine-learning,natural-language-processing,llm,conversation-branching
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Communications :: Chat
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Desktop Environment
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS
Classifier: Environment :: X11 Applications
Classifier: Environment :: Win32 (MS Windows)
Classifier: Environment :: MacOS X
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.31.0
Requires-Dist: Pillow>=10.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest>=7.0.0; extra == "test"
Requires-Dist: pytest-cov>=4.0.0; extra == "test"
Requires-Dist: pytest-mock>=3.10.0; extra == "test"
Requires-Dist: pytest-asyncio>=0.21.0; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=6.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.2.0; extra == "docs"
Requires-Dist: myst-parser>=1.0.0; extra == "docs"
Dynamic: license-file

# Claude API Desktop

A modern, feature-rich desktop client for the Anthropic Claude API with streaming support, extended context capabilities, and an intuitive graphical interface.


![Python](https://img.shields.io/badge/python-3.8%2B-blue)

![License](https://img.shields.io/badge/license-MIT-green)

![Platform](https://img.shields.io/badge/platform-Windows%20%7C%20macOS%20%7C%20Linux-lightgrey)


## Features

### Core Capabilities

- **Real-time Streaming**: Stream responses as they're generated for a responsive chat experience
- **Extended Context Support**: Automatically uses beta headers for:

  - 1M context window with Claude Sonnet 4
  - 128k output tokens with Claude Sonnet 3.7

- **Multi-Model Support**: Access all Claude models including:

  - Claude Opus 4.1 & 4.0
  - Claude Sonnet 4 & 3.7
  - Claude Haiku 3.5

### User Experience

- **File Attachments**: Attach images (PNG, JPG, JPEG, GIF, WebP) and text files directly in conversations
- **System Prompts**: Configure persistent system prompts for specialized assistants
- **Export Conversations**: Save chats as Markdown or JSON for documentation and sharing
- **Token & Cost Tracking**: Real-time display of token usage and estimated API costs
- **Keyboard Shortcuts**:  Detailed below.

### Technical Features

- **Configuration Persistence**: Saves API key, model preference, and system prompt in platform-appropriate directories
- **Clean GUI**: Built with tkinter for cross-platform compatibility  
- **Threaded API Calls**: Non-blocking UI during API requests
- **Comprehensive Error Handling**: Graceful handling of connection and API errors
- **Conversation Branching**: Create alternate conversation paths and switch between them
- **SQLite Database**: Reliable local storage for conversation history in user data directories

## Installation

### Prerequisites

- Python 3.8 or higher
- pip package manager

### Install from PyPI

```bash
   pip install claude-api-desktop
```
### Install from Source

1. Clone the repository:

```bash
   git clone https://github.com/anthony-maio/claude-api-desktop.git
   cd claude-api-desktop
```
2. Install using pip:

```bash
   pip install .
```
3. Run the application:

```bash
   claude-api-desktop
```
## Data Storage

The application stores all user data in platform-appropriate directories:

### Windows
- **Configuration**: `%LOCALAPPDATA%\claude-api-desktop\claude_client_config`
- **Database**: `%LOCALAPPDATA%\claude-api-desktop\conversations.db`
- **Full path**: `C:\Users\{username}\AppData\Local\claude-api-desktop\`

### macOS
- **Configuration**: `~/Library/Application Support/claude-api-desktop/claude_client_config`
- **Database**: `~/Library/Application Support/claude-api-desktop/conversations.db`

### Linux
- **Configuration**: `~/.local/share/claude-api-desktop/claude_client_config`
- **Database**: `~/.local/share/claude-api-desktop/conversations.db`

## Configuration

### API Key

1. Get your API key from `Anthropic Console <https://console.anthropic.com/>`_
2. Open Settings (⚙️ button or `Ctrl+,`)
3. Enter your API key in the API tab
4. The key is saved locally in platform-appropriate directories:
   - **Windows**: `%LOCALAPPDATA%\claude-api-desktop\claude_client_config`
   - **macOS**: `~/Library/Application Support/claude-api-desktop/claude_client_config`
   - **Linux**: `~/.local/share/claude-api-desktop/claude_client_config`

### Model Selection

Choose from the dropdown menu:

- **Claude Opus 4.1**: Most capable model for complex tasks
- **Claude Opus 4**: Previous generation Opus  
- **Claude Sonnet 4**: Balanced performance with 1M context window 
- **Claude Sonnet 3.7**: Fast with 128k output capability
- **Claude Haiku 3.5**: Fastest and cheapest

## Usage Examples

### Basic Chat

1. Enter your API key in Settings
2. Type your message
3. Press Send or `Ctrl+Enter`

### Using System Prompts *Optional*

1. Open Settings (⚙️ button)
2. Go to General tab
3. Enter instructions.

### Attaching Files *[Beta]*

1. Click the 📎 Attach button
2. Select image or text file
3. Multiple files are supported

### Conversation Branching *[Alpha]*

1. Start a conversation with Claude
2. Click 🌿 Branch button
3. Create "Alternative approach" branch
4. Continue conversation in new direction
5. Switch between branches anytime


## API Costs

**⚠️ IMPORTANT COST DISCLAIMER ⚠️**

The client displays estimated costs based on September 2025 Anthropic pricing **for reference only**. These values are:
- **NOT AUTHORITATIVE** - Always refer to your Anthropic Console for actual billing
- **ESTIMATES ONLY** - Actual costs may vary significantly
- **SUBJECT TO CHANGE** - Anthropic may update pricing at any time
- **NOT GUARANTEED ACCURATE** - Token counting is approximate

**YOU ARE SOLELY RESPONSIBLE FOR MONITORING YOUR ACTUAL API USAGE AND COSTS.** Always set spending limits in your Anthropic Console.

================= ==================== ======================
Model             Input (per 1M tokens) Output (per 1M tokens)
================= ==================== ======================
Claude Opus 4.1/4.0  $15.00              $75.00
Claude Sonnet 4/3.7   $3.00               $15.00
Claude Haiku 3.5      $0.80               $4.00
================= ==================== ======================

## Keyboard Shortcuts

**Messaging:**

* `Ctrl+Enter`: Send message
* `Escape`: Abort current request

**Conversation Management:**

* `Ctrl+N`: Start new conversation
* `Ctrl+S`: Save current conversation
* `Ctrl+H`: Open conversation history
* `Ctrl+L`: Clear current chat

**Interface:**

* `Ctrl+,`: Open Settings dialog
* `Ctrl+D`: Toggle dark/light theme
* `F1`: Show help dialog

**File Operations:**

* `Ctrl+E`: Export conversation

## License

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

## Acknowledgments

* Built with [Anthropic's Claude API](https://docs.anthropic.com/)
* GUI framework: [tkinter](https://docs.python.org/3/library/tkinter.html)
* HTTP client: [requests](https://requests.readthedocs.io/)

## Author

**Anthony Maio** (anthony.maio@gmail.com)

Passionate about AI/ML, software engineering, culture and leadership.

Follow or find me on [LinkedIn](https://www.linkedin.com/in/anthony-maio) - Open to work!
*Currently seeking opportunities in AI/ML engineering full-time US Remote*

## Privacy & Data Handling

**🔒 YOUR DATA STAYS ON YOUR DEVICE 🔒**

- **No Data Collection**: This application does NOT collect, transmit, or store any of your conversations, API keys, or personal data on external servers
- **Local Storage Only**: All data (conversations, settings, API keys) is stored locally on your device in platform-appropriate directories
- **Direct API Communication**: The app communicates directly with Anthropic's API - no intermediary servers
- **Open Source**: Full source code is available for inspection - verify our privacy claims yourself
- **No Analytics**: No usage tracking, telemetry, or analytics are collected
- **No Network Requests**: Except to Anthropic's official API endpoints for chat functionality

**Your privacy is paramount. This tool is designed to be a secure, private interface to Claude API.**

## Important Disclaimers

**⚠️ LEGAL DISCLAIMERS ⚠️**

- **Independent Project**: This software is NOT affiliated with, endorsed by, or officially connected to Anthropic in any way
- **No Warranty**: This software is provided "AS IS" without warranty of any kind, express or implied
- **User Responsibility**: You are solely responsible for your API usage, costs, and compliance with Anthropic's terms of service
- **Cost Estimates**: All cost calculations are estimates only and may be inaccurate - always monitor actual usage in your Anthropic Console
- **API Compliance**: Users must comply with all Anthropic usage policies and terms of service
- **Use at Your Own Risk**: The developers are not liable for any damages, costs, or issues arising from use of this software

## Support

Support is limited and generally submitted through Github in the issues section.
If you find this tool useful, please consider:

* Starring the repository
* Contributing improvements

---

**Note**: This is an independent project and is not affiliated with Anthropic. Always ensure you comply with Anthropic's [usage policies](https://www.anthropic.com/legal/aup) when using the API.
