Repository navigation
v0.2.0 - TOON Format Support
v0.2.0 - TOON Format Support for Token Reduction
🎒 New Feature: TOON Format
Reduce your Claude API costs by 30-60% with TOON (Token-Oriented Object Notation) support!
What's New
- TOON Format Conversion: New
cdc tooncommand groupcdc toon encode- Convert JSON to TOONcdc toon decode- Convert TOON to JSONcdc toon info- Check installation status
- Token Reduction: 30-60% fewer tokens than JSON for data-heavy prompts
- Cost Savings: Significantly reduce API costs when passing structured data
- Optional Dependency: Install with
pip install claude-dev-cli[toon] - Auto-Fallback: Works without TOON installed (uses JSON)
Example
# Install with TOON support
pip install claude-dev-cli[toon]
# Convert JSON to TOON (saves 30-60% tokens)
echo '{"users": [{"id": 1, "name": "Alice"}]}' | cdc toon encode
# Output:
# users[1]{id,name}:
# 1,Alice
# Use in workflows to reduce costs
cat data.json | cdc toon encode | cdc ask "analyze this"Why TOON?
- Compact: Removes redundant JSON punctuation (braces, brackets, quotes)
- Human-Readable: Still easy to read and understand
- LLM-Optimized: Designed specifically for Large Language Models
- Lossless: Preserves all data, fully reversible
Installation
# Upgrade with TOON support
pip install --upgrade claude-dev-cli[toon]
# Or basic upgrade
pip install --upgrade claude-dev-cliSee the README for full documentation.