Skip to content

v0.2.0 - TOON Format Support

Choose a tag to compare

@thinmanj thinmanj released this 28 Dec 04:06
· 94 commits to master since this release

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 toon command group
    • cdc toon encode - Convert JSON to TOON
    • cdc toon decode - Convert TOON to JSON
    • cdc 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-cli

See the README for full documentation.