| Crates.io | tauq |
| lib.rs | tauq |
| version | 0.1.0 |
| created_at | 2025-11-26 13:51:48.559868+00 |
| updated_at | 2025-11-26 13:51:48.559868+00 |
| description | Token-efficient data notation - 44% fewer tokens than JSON (verified with tiktoken) |
| homepage | https://www.tauq.org |
| repository | https://github.com/epistates/tauq |
| max_upload_size | |
| id | 1951434 |
| size | 1,873,923 |
44% fewer tokens than JSON overall. 11% more efficient than TOON. Verified with tiktoken.
Tauq (τq) is two things:
.tqn): A schema-driven data format that achieves 44-54% fewer tokens than JSON (verified with tiktoken cl100k_base)..tqq): A pre-processor with shell integration for data transformations.Built for the AI era where every token counts.
| Format | Tokens | vs JSON |
|---|---|---|
| JSON (minified) | 24,005 | baseline |
| TOON | 12,002 | -50.0% |
| Tauq | 11,012 | -54.1% |
All counts verified with tiktoken cl100k_base (GPT-4/Claude tokenizer).
Overall (10 datasets, 55,647 tokens): Tauq saves 44.2% vs JSON, 10.8% vs TOON. See benchmarks/ for full results.
JSON:
[{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}]
Tauq:
!def User id name
1 Alice
2 Bob
StreamingParser iterator API[N])!def!usetauq build - Parse to JSONtauq format - JSON → Tauqtauq minify - Compress to one linetauq exec - Run Tauq Query pipelinestauq validate - Check syntax# Install the tauq package
cargo install tauq
Tauq is available for your favorite languages:
pip install tauqnpm install tauqgo get github.com/epistates/tauqtauq = "0.1" to your Cargo.tomlCreate config.tqn:
app_name "MyService"
version "1.0.0"
port 8080
debug true
features [api websockets metrics]
Parse to JSON:
$ tauq build config.tqn --pretty
{
"app_name": "MyService",
"version": "1.0.0",
"port": 8080,
"debug": true,
"features": ["api", "websockets", "metrics"]
}
name "Alice"
age 30
active true
score 99.5
missing null
role admin # Barewords don't need quotes
tags [web api backend]
ids [1 2 3 4 5]
mixed [1 "two" true null]
!def User id name email role
1 Alice "alice@example.com" admin
2 Bob "bob@example.com" user
3 Carol "carol@example.com" user
Define schemas upfront with --- to separate from data:
!def User id name role
---
users [
!use User
1 Alice admin
2 Bob user
]
The --- separator clears the implicit schema scope, allowing structured key-value data that uses !use inside arrays.
!def Address street city
!def User id name addr:Address
1 Alice { "123 Main" "NYC" }
2 Bob { "456 Oak" "LA" }
!def Employee name role
!def Department name budget employees:[Employee]
Engineering 1000000 [
Alice "Principal Engineer"
Bob "Senior Engineer"
]
!def U id name; 1 Alice; 2 Bob
All on one line for maximum compression!
We have provided a comprehensive set of examples in the examples/ directory:
# To stdout
tauq build data.tqn
# To file with pretty formatting
tauq build data.tqn -o data.json --pretty
# From stdin
cat data.tqn | tauq build -
The formatter intelligently detects arrays of uniform objects and creates schemas automatically:
# Convert JSON to Tauq (auto-generates schemas for nested arrays)
tauq format data.json -o data.tqn
# From stdin
echo '{"users": [{"id": 1, "name": "Alice"}, {"id": 2, "name": "Bob"}]}' | tauq format -
# Output:
# !def User id name
# ---
# users [
# !use User
# 1 Alice
# 2 Bob
# ]
# Run data transformations
tauq exec pipeline.tqq -o output.json
# Run in SAFE MODE (disable shell execution)
tauq exec pipeline.tqq --safe
# Compress to single line
tauq minify data.tqn -o data.min.tqn
Tauq is in active development. Contributions welcome!
Areas of interest:
MIT
Tauq (τq) - Stop wasting tokens on JSON. Start using the future. 🚀