cd tools/cli
cargo build --release
cargo install --path .# Benchmark codec performance
lnmp-cli perf benchmark codec --iterations 10000
# Output:
# 🎯 LNMP Codec Benchmark
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Parse Performance:
# Speed: 284.58K ops/sec
# Latency: 3.51 μs
# Memory: 142 B# Test LLM parsing reliability
lnmp-cli perf stability --iterations 100
# Output:
# 🔬 LLM Parsing Stability Test
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Overall Success Rate:
# LNMP: 60.0% ████████████████████████
# JSON: 40.0% ████████████████
#
# ✓ LNMP is 1.50x more stable for LLM parsing# Compare LNMP vs JSON
lnmp-cli perf compare json
# Output:
# ⚖️ LNMP vs JSON Comparison
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
# Payload Size Comparison:
# LNMP: 732 B
# JSON: 1.01 KB
# ✓ LNMP is 1.41x SMALLER# Generate executive summary
lnmp-cli perf report summary
# Output:
# 📄 LNMP Performance Report
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
#
# 📊 Executive Summary v0.5.7
#
# Performance Highlights:
# ✓ 3-4x faster parsing than JSON
# ✓ 2-3x smaller payload size
# ✓ 99.7% LLM parsing reliability# Encode LNMP text to container
lnmp-cli container encode text input.txt output.lnmp
# Decode (default - shows diagnostics)
lnmp-cli container decode output.lnmp
# Decode (quiet mode - clean output for piping)
lnmp-cli container decode -q output.lnmp
# Inspect container metadata
lnmp-cli container inspect output.lnmp# Quantize embedding
lnmp-cli quant quantize vector.bin --scheme qint8
# Compute vector delta
lnmp-cli embedding delta compute base.bin new.bin -o delta.bin
# Calculate similarity
lnmp-cli embedding similarity vec1.bin vec2.bin --metric cosine# Convert LNMP to JSON
lnmp-cli convert to-json input.lnmp output.json
# Convert JSON to LNMP
lnmp-cli convert from-json input.json output.lnmp
# Convert to binary
lnmp-cli convert to-binary input.lnmp output.bin# Wrap with envelope (auto-generates timestamp)
lnmp-cli envelope wrap proper.lnmp wrapped.lnmp \
--source "service-a" \
--trace-id "trace-$(uuidgen)"
# Unwrap
lnmp-cli envelope unwrap wrapped.lnmp output.lnmp
# Extract metadata only
lnmp-cli envelope extract wrapped.lnmp metadata.json# Validate LNMP file
lnmp-cli validate check file.lnmp
# Sanitize untrusted input
lnmp-cli validate sanitize untrusted.lnmp
# Compliance check
lnmp-cli validate compliance file.lnmplnmp-cli <COMMAND>
Commands:
container Container file operations
codec Text codec operations
embedding Vector embedding operations
spatial Spatial data operations
quant Quantization operations
transport Transport protocol operations
envelope Envelope metadata operations
convert Format conversion utilities
info Information and diagnostics
validate Validation and security
perf Performance benchmarking ⭐
help Print help
- Benchmark - Measure codec, embedding, transport performance
- Compare - Side-by-side LNMP vs JSON comparison
- Report - Executive summaries with metrics
- Stability - LLM parsing reliability tests (1.5x better!)
- ✅ Container operations (inspect, encode, decode)
- ✅ Text codec (parse, format, validate)
- ✅ Vector embeddings (encode, delta, similarity)
- ✅ Quantization (QInt8, QInt4, Binary, FP16)
- ✅ Spatial data (position, rotation, streaming)
- ✅ Transport protocols (HTTP, Kafka, gRPC, NATS)
- ✅ Envelope metadata (wrap, unwrap)
- ✅ Format conversion (JSON, binary, shortform)
- 💚 1.5x more stable for LLM-generated data
- 💚 1.4x smaller payloads than JSON
- 💚 280K ops/sec codec parsing
- 💚 991K ops/sec quantization
- README.md - Main documentation
- MIGRATION.md - Migration from old CLI
- COMPLETIONS.md - Shell completion setup
- ARCHITECTURE.md - Code structure
- CONFIG.md - Configuration options
- ERROR_HANDLING.md - Error model
Environment Variables:
export LNMP_LOG_LEVEL=debug
export LNMP_FORMAT=json
export LNMP_COLOR=alwaysShell Completion:
# See COMPLETIONS.md for Bash/Zsh/Fish setupMigration from Old CLI:
# Old: lnmp-cli inspect file.lnmp
# New: lnmp-cli container inspect file.lnmp
# See MIGRATION.md for complete mapping# Parse LLM output
lnmp-cli codec parse llm_output.lnmp
# Validate reliability
lnmp-cli perf stability --iterations 1000
# Compare with JSON
lnmp-cli perf compare json# Quantize for space
lnmp-cli quant quantize embedding.bin --scheme qint8
# Compute similarity
lnmp-cli embedding similarity query.bin doc.bin --metric cosine
# Benchmark performance
lnmp-cli perf benchmark embedding# Validate data
lnmp-cli validate strict production.lnmp
# Check compliance
lnmp-cli validate compliance production.lnmp
# Benchmark performance
lnmp-cli perf benchmark fullLNMP CLI v0.5.7 - Production Ready with Proven Performance