Getting Started with Tauq
Learn how to install Tauq and start saving tokens in minutes.
Installation
Choose Your Language
🦀 Rust
cargo install tauq 🐍 Python
pip install tauq 📜 JavaScript/Node.js
npm install tauq 🐹 Go
go get github.com/epistates/tauq 💡 Pro Tip
The Rust installation includes the full CLI with all features. Language bindings provide native integration for your preferred language.
Quick Start
1. Create Your First Tauq File
Create a file called users.tqn with the following content:
users.tqn tauq
!def User id name email
1 Alice "alice@example.com"
2 Bob "bob@example.com"
3 Carol "carol@example.com" 2. Parse to JSON
Use the CLI to convert Tauq to JSON:
tauq build users.tqn --pretty This will output beautiful, formatted JSON:
[
{
"id": 1,
"name": "Alice",
"email": "alice@example.com"
},
{
"id": 2,
"name": "Bob",
"email": "bob@example.com"
},
{
"id": 3,
"name": "Carol",
"email": "carol@example.com"
}
] 3. Try the CLI Commands
# Build: Tauq → JSON
tauq build data.tqn -o output.json --pretty
# Format: JSON → Tauq
tauq format data.json -o data.tqn
# Validate syntax
tauq validate data.tqn
# Minify
tauq minify data.tqn -o data.min.tqn Key Concepts
📐 Schemas
Define your data structure once with !def, then use it for all records:
!def User id name email role
1 Alice "alice@example.com" admin
2 Bob "bob@example.com" user 🌊 Streaming
Process large datasets one record at a time without loading everything into memory:
use tauq::StreamingParser;
let parser = StreamingParser::new(file);
for record in parser {
// Process each record as it's parsed
println!("{:?}", record);
} ⚡ Token Efficiency
Tauq uses space delimiters (0 tokens) instead of commas (1 token each), and eliminates redundant keys. This adds up to 44-54% fewer tokens on large datasets.