Simple CLI tool for AI text rewriting with Ollama
Project description
🔥 Redukon
Reduce Your Tokens. Keep Your Intent.
✨ What is Redukon?
Redukon is a token-saving prompt rewriter that uses local small AI models to optimize your prompts — reducing token count while keeping the core intent intact.
No API keys needed. Runs entirely offline with Ollama.
💡 Perfect for:
- Saving money on API calls
- Fitting more context into LLM windows
- Making prompts more efficient
🚀 Quick Start
# Install
pip install -e https://github.com/CharlesArea/Redukon.git
# One-time setup (installs Ollama + picks a model)
redukon onboard
# Rewrite prompts to save tokens!
redukon rewrite -i "Your long prompt here..."
📖 Usage
redukon onboard
Interactive setup wizard:
- Checks if Ollama is installed
- Installs Ollama if needed
- Choose your model:
Model Size Best For qwen2.5:0.5b397MB Speed & minimal resources llama3.2:1b1.9GB Balanced phi3:3.8b2.3GB Better quality
redukon rewrite
Rewrite your prompts!
# Basic
redukon rewrite -i "Please write a comprehensive Python function..."
# From file
redukon rewrite -i @long-prompt.txt -o optimized.txt
# Custom temperature (lower = more focused)
redukon rewrite -i "prompt" --temp 0.3
⚡ Example
| Before (87 tokens) | After (42 tokens) |
|---|---|
| "Please write a comprehensive Python function that takes a list of integers as input and returns a new list containing only the even numbers from the original list. The function should handle edge cases like empty lists, lists with no even numbers, and lists with negative numbers. Please include proper type hints, docstrings, and error handling." | "Write a Python function that filters even numbers from a list. Include type hints, error handling, and docstrings." |
📉 Savings: ~52%
🔧 Options
| Flag | Description | Default |
|---|---|---|
-i, --input |
Prompt or @file.txt |
Required |
-o, --output |
Output file | Print to stdout |
-m, --model |
Override model | From config |
-t, --temp |
Temperature (0.0-1.0) | 0.3 |
🛠️ Requirements
- Python 3.8+
- Ollama (installed automatically during onboard)
📝 License
MIT © 2026 CharlesArea
Made with ❤️ for the AI community
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file redukon-3.0.0-py3-none-any.whl.
File metadata
- Download URL: redukon-3.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c8c62c49699e45cc36111b72bfe579f8792994dbd1043c00a0e80cdfd2904f4
|
|
| MD5 |
7a17f7596fce6cb882c44a29cf7aba04
|
|
| BLAKE2b-256 |
ac0a1b668d2644e63eb262cbf9f22d73d7ad8d7100fcd5178ca231b1e52df9df
|