Metadata-Version: 2.4
Name: cutoken
Version: 1.0.0
Summary: Fast, intelligent terminal AI prompt token optimizer.
Author: CuToken
Author-email: CuToken <support@cutoken.in>
License: MIT License
        
        Copyright (c) 2026 CuToken
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://cutoken.in
Project-URL: Documentation, https://pro.cutoken.in
Keywords: token-optimizer,prompt-optimizer,llm,chatgpt,claude,tokens,cli
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: license-file
Dynamic: requires-python

# ⚡ CuToken CLI

> **Fast, intelligent prompt token optimizer for your terminal.**
> Cut AI prompt tokens by up to 50% before sending to ChatGPT, Claude, or Gemini.

[![PyPI version](https://img.shields.io/pypi/v/cutoken.svg?color=00ff88)](https://pypi.org/project/cutoken/)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
[![Python 3.8+](https://img.shields.io/badge/python-3.8+-brightgreen.svg)](https://www.python.org/)

---

## 🚀 Quick Install

```bash
pip install cutoken
```

---

## ⚡ Quick Start

### 1. Authenticate Once
Get your API key at [pro.cutoken.in](https://pro.cutoken.in):

```bash
cutoken login
```

### 2. Interactive Mode (Like Claude Code)
Just type `cutoken` in your terminal:

```bash
cutoken
```

```text
─────────────────────────────────────────────────────────────
 ⚡ CuToken CLI v1.0.0     Your Name │ 450.00 Credits
─────────────────────────────────────────────────────────────

Type or paste your prompt (multi-paragraph supported).
Commands: /mode <s|b|a>, /paste, /balance, /exit

cutoken (balanced) > Can you please rewrite this whole email to sound more professional?
✔ Optimized in 420ms
─────────────────────────────────────────────────────────────
 Original: 34 tok  Optimized: 16 tok  Saved: -18 (52.9%)  Left: 449.0
─────────────────────────────────────────────────────────────
Rewrite this email professionally for executives.
─────────────────────────────────────────────────────────────
📋 Copied to clipboard!
```

---

## 🛠️ Commands & Features

### One-Shot Optimization
```bash
cutoken "Your long prompt text goes here"
```

### Optimize Multi-Paragraph Files
```bash
cutoken -f system_prompt.txt
```

### Unix Piping (Use in Scripts & Agents)
```bash
cat prompt.txt | cutoken -q | llm
```

### Change Intensity Mode
CuToken supports 3 optimization levels:
* **`safe`**: Gentle token cleanup, preserves exact phrasing.
* **`balanced`** *(Default)*: Optimal balance between compression and quality.
* **`aggressive`**: Maximum token reduction for lowest latency and cost.

Permanently set your default mode:
```bash
cutoken mode aggressive   # or shortcut: cutoken mode a
cutoken mode balanced     # or shortcut: cutoken mode b
cutoken mode safe         # or shortcut: cutoken mode s
```

Or pass for a single run:
```bash
cutoken "Your prompt" -m aggressive
```

### Check Credit Balance
```bash
cutoken balance
```

### View Configuration
```bash
cutoken config
```

---

## 📋 Features

* 🚀 **Blazing Fast**: Starts in milliseconds with lightweight dependency footprint.
* 📋 **Automatic Clipboard**: Result is instantly copied to your clipboard.
* 📑 **Multi-Paragraph Support**: Paste long multi-paragraph documents without broken line breaks.
* 🔄 **Unified Billing**: Shares the exact same Pro credit balance with your web dashboard and extensions.
* 🔒 **Secure**: API Key is stored locally in `~/.cutoken/config.json`.

---

## 🌐 Links
* Website: [cutoken.in](https://cutoken.in)
* Pro Dashboard: [pro.cutoken.in](https://pro.cutoken.in)
* Chrome Extension: Available on the Chrome Web Store

## 📄 License
MIT License © 2026 CuToken
