nimhar

nimhar / imptokens

Public

Compress input tokens, save time and money

46
3
100% credibility
Found Mar 08, 2026 at 46 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Rust
AI Summary

imptokens is a command-line tool that compresses text inputs for large language models using local processing to reduce token consumption and associated costs.

How It Works

1
🔍 Discover token saver

You hear about a simple tool that shrinks long messages before sending to AI chats like Claude or GPT, cutting costs by 30-60% while keeping the important parts.

2
📥 Install with one click

Run a quick download command, and it sets itself up on your computer, picking the best way to run fast on your hardware.

3
Check it's ready

Test it out to confirm everything works perfectly, with no hassle.

4
🔗 Connect to your AI app

One command links it to Claude or your setup, so long prompts get automatically trimmed without you lifting a finger.

5
📝 Feed in long text

Paste or pipe in big chunks like code changes, logs, or docs, and watch it smartly shorten them.

6
📊 See your savings grow

Check stats showing tokens saved, feeling the relief as your AI bills drop with every use.

💰 Enjoy cheaper AI chats

Now your daily AI work costs way less, runs faster, and everything feels smoother and more efficient.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 46 to 46 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is imptokens?

imptokens is a Rust CLI tool that compresses text inputs for LLMs like Claude or GPT, slashing token costs by 30-60% while keeping key details. Pipe git diffs, error logs, or docs through it via stdin, and get denser output ready for prompts—no APIs, all local via llama.cpp on Metal, CUDA, or CPU. Track savings with `--gain` and auto-hook into Claude Code for seamless prompts over 500 tokens.

Why is it gaining traction?

It stands out from basic github compress utils or java gzip inputstream hacks by using logprob scoring or query-based sentence extraction for context-aware cuts, preserving 95% key facts per benchmarks. One-liner install, sub-second speeds on Apple Silicon, and outputs like text, token-ids, or JSON fit any pipeline. Devs love the Claude hooks and helpers like `compress-paste` for clipboard tweaks, saving real money on heavy LLM use without quality dips.

Who should use this?

Backend devs feeding git diffs or pytest logs to Claude for reviews, AI agents handling long contexts in LiteLLM proxies, or anyone hitting token limits on GPT-4o prompts. Ideal for shell-heavy workflows with Ollama or RTK, where you paste massive inputs daily.

Verdict

Worth piping into your LLM flows if token bills add up—solid CLI and docs make it drop-in ready. At 45 stars and 1.0% credibility, it's early but MIT-licensed with quality benchmarks; test on your diffs before production pipelines.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.