The Shrinking Charm

reducto

Semantic Code Compression

Magically transform bloated codebases into elegant, minimal expressions while preserving every ounce of functionality.

Magical Abilities

Ancient spells for modern codebases

🔮

Duplication Detection

Peer through the veil of your codebase to find semantically similar incantations across files, revealing hidden echoes and redundancies.

Idiomatic Transmutation

Transform verbose rituals into elegant patterns—Pythonic comprehensions, modern ES6+, Go idioms, and more sacred traditions.

📜

Pattern Infusion

Channel ancient wisdom by injecting classic design patterns—Factory, Strategy, Observer—to bring order to chaotic realms.

👁️

Complexity Scrying

Gaze into the depths of your code to identify functions exceeding cyclomatic and cognitive thresholds—chaos before it consumes you.

🛡️

Protective Enchantments

Automatic checkpoints, rollback on test failure, and human approval for every change. Your code remains safe within the sanctuary.

Local-First Magic

Wield the power of local models through Ollama, or summon cloud familiars via OpenAI, Anthropic, and Google. Your secrets stay yours.

The Ritual

Three sacred steps to code enlightenment

I

Scan

Peer into your codebase with Tree-sitter's ancient sight. Map the dependency web, identify complexity hotspots, and reveal hidden truths.

II

Plan

Consult the oracle—LLM-powered agents divine detailed refactoring plans, showing exactly what shall transform and the reasoning behind each change.

III

Apply

Execute the transformation with sacred protections—automatic test validation, git checkpoints, and instant restoration if the ritual fails.

Acquire the Wand

Begin your journey into code alchemy

Download Artifact Recommended

Claim the latest enchanted binary for your realm:

# Summon from the ethereal repository
curl -sSL https://github.com/alexkarsten/reducto/releases/latest/download/reducto-linux-amd64 -o reducto
chmod +x reducto
sudo mv reducto /usr/local/bin/

Browse all artifacts →

Forge from Source

Requires Go 1.24+ and Python 3.10+ for the complete ritual:

# Clone the sacred texts
git clone https://github.com/alexkarsten/reducto.git
cd reducto

# Prepare the reagents
pip install python/

# Conjure the binary
go build -o reducto ./cmd/reducto

Witness the Magic

A glimpse into the art of reduction

$ reducto analyze .

Scrying repository: /home/wizard/project


=== Revelation ===

Total scrolls: 127

Total symbols: 892

Complexity hotspots: 8

Potential echoes: 4


--- Chaos Detected ---

src/utils/parser.py:142 - parse_config (CC: 18)

src/api/handler.go:67 - HandleRequest (CC: 15)


--- Echoes Found ---

Similarity: 94.2%

- src/auth/validator.py:23-45

- src/api/validator.py:12-34


$ reducto deduplicate --commit .

Weaving reduction spell...

Transformation complete!

Lines consumed: 127

Changes inscribed to git.