FlexonCLI 2.0.1
See the version list below for details.
dotnet add package FlexonCLI --version 2.0.1
NuGet\Install-Package FlexonCLI -Version 2.0.1
<PackageReference Include="FlexonCLI" Version="2.0.1" />
<PackageVersion Include="FlexonCLI" Version="2.0.1" />
<PackageReference Include="FlexonCLI" />
paket add FlexonCLI --version 2.0.1
#r "nuget: FlexonCLI, 2.0.1"
#:package FlexonCLI@2.0.1
#addin nuget:?package=FlexonCLI&version=2.0.1
#tool nuget:?package=FlexonCLI&version=2.0.1
🚀 FlexonCLI - The Next Generation Data Format
<p align="center"> <img src="icon.png" alt="Flexon Logo" width="200"/> </p>
<h3 align="center">Flexible Exchange Object Notation</h3> <p align="center">A high-performance binary serialization tool with quantum computing capabilities</p>
FlexonCLI is a revolutionary binary data format and toolset that combines the simplicity of JSON with the power and efficiency of binary encoding. It's faster, smaller, and more capable than traditional JSON, while maintaining full compatibility with existing JSON workflows.
🌟 Key Features
- 📦 Ultra-Compact: Up to 80% smaller than equivalent JSON files through smart binary encoding and built-in compression
- ⚡ Lightning Fast: Binary format enables blazing-fast parsing and serialization
- 🔒 Type-Safe: Native support for rich data types including DateTime, UUID, and binary data
- ✅ Schema Validation: Built-in JSON Schema validation for data integrity
- 🔄 JSON Compatible: Seamless conversion between JSON and Flexon formats
- 🔐 Multiple Encryption Options:
- AES-256 (default): Industry-standard symmetric encryption
- ChaCha20-Poly1305: Modern, high-performance encryption
- Triple DES: Legacy system compatibility
- 📁 Binary Data Support: Direct handling of images and binary files
- 📊 Performance Metrics: Built-in benchmarking tools
- 💪 Cross-Platform: Works across all major platforms and programming languages
- 🛠️ Developer Friendly: Comprehensive tooling and language bindings
- 🤖 AI Support: Built-in AI data structures and embeddings generation
- 🔍 Advanced Inspection: Rich data inspection and validation tools
- 🌐 Multi-Language Examples: Complete examples in Python, Ruby, PHP, Java, and more
🔧 Installation Options
NuGet Package
# Install as a NuGet package
dotnet add package FlexonCLI
# Reference specific platform
dotnet add package FlexonCLI --framework net8.0-windows
dotnet add package FlexonCLI --framework net8.0-linux
dotnet add package FlexonCLI --framework net8.0-osx
Global Tool
# Install as a global .NET tool
dotnet tool install -g FlexonCLI
💻 Platform Support
FlexonCLI is available for multiple platforms:
- Windows: x64, ARM64
- Linux: x64, ARM64
- macOS: x64, ARM64
Binary locations in NuGet package:
- Windows:
runtimes/win-x64/native/
andruntimes/win-arm64/native/
- Linux:
runtimes/linux-x64/native/
andruntimes/linux-arm64/native/
- macOS:
runtimes/osx-x64/native/
andruntimes/osx-arm64/native/
📚 Language Support
FlexonCLI provides comprehensive examples and bindings for multiple languages:
Python
- Basic usage and serialization
- Game state management
- AI data handling
- Secure configuration
- Performance benchmarking
Ruby
- JSON serialization
- Binary data handling
- Encryption examples
- Schema validation
- Performance testing
PHP
- Basic data structures
- Image processing
- Secure storage
- AI data management
- Benchmarking suite
Java
- Complex data structures
- Game state serialization
- Security implementations
- Performance optimization
- AI data handling
Additional Languages
- JavaScript/Node.js
- Rust
- Go
- C#
Each language implementation includes complete examples for:
- Basic Usage
- Game State Management
- AI Data Handling
- Secure Configuration
- Performance Benchmarking
📊 Performance Comparison
Format | File Size | Parse Time | Serialize Time |
---|---|---|---|
JSON | 100 MB | 1200ms | 980ms |
BSON | 85 MB | 850ms | 720ms |
Flexon | 20 MB | 180ms | 150ms |
🚀 Quick Start
Installation
# Using .NET Tool
dotnet tool install -g flexon-cli
# Using Homebrew (macOS)
brew install flexon-cli
# Using Chocolatey (Windows)
choco install flexon-cli
Basic Usage
# Get help and command information
flexon-cli help
flexon-cli help serialize
# Serialize a single JSON file
flexon-cli serialize -i input.json -o output.flexon
# Serialize multiple files (JSON and binary)
flexon-cli serialize -i data.json -i image.png -i document.pdf -o package.flexon
# Serialize with schema validation
flexon-cli serialize -i input.json -o output.flexon -s schema.json
# Serialize with encryption (AES-256)
flexon-cli serialize -i input.json -o output.flexon -e mySecretKey
# Serialize with specific encryption algorithm
flexon-cli serialize -i input.json -o output.flexon -e mySecretKey ChaCha20
# Deserialize to original files
flexon-cli deserialize -i package.flexon -o output_directory
# Deserialize encrypted file
flexon-cli deserialize -i encrypted.flexon -o output.json -e mySecretKey
# Run performance benchmark
flexon-cli benchmark -i large_dataset.json -o benchmark_output.flexon
# Legacy Commands (still supported)
flexon-cli encode input.json output.flexon
flexon-cli decode input.flexon output.json
flexon-cli inspect input.flexon
flexon-cli validate input.flexon schema.json
Advanced Usage
Mixed Data Serialization
# Combine JSON configuration with binary assets
flexon-cli serialize \
-i config.json \
-i logo.png \
-i styles.css \
-o application_package.flexon \
-e mySecretKey
Performance Testing
# Run comprehensive benchmark
flexon-cli benchmark -i large_dataset.json -o benchmark.flexon -b
# Benchmark with encryption
flexon-cli benchmark -i large_dataset.json -o benchmark.flexon -e mySecretKey -b
Schema Validation
# Validate data against schema during serialization
flexon-cli serialize -i data.json -o valid_data.flexon -s schema.json
# Complex validation with multiple inputs
flexon-cli serialize \
-i user_data.json \
-i preferences.json \
-o validated_package.flexon \
-s user_schema.json
🔐 Encryption Support
FlexonCLI supports multiple encryption algorithms to suit different needs:
AES-256 (Default)
- Industry-standard symmetric encryption
- Excellent security and wide compatibility
- Recommended for most use cases
ChaCha20-Poly1305
- Modern, high-performance encryption
- Excellent for mobile and resource-constrained devices
- Better performance than AES on platforms without hardware AES acceleration
Triple DES
- Legacy encryption support
- Compatible with older systems
- Use only when legacy compatibility is required
The encryption algorithm is stored within the encrypted file, so decryption automatically uses the correct algorithm.
📁 Binary Data Support
Flexon can handle various types of files:
- Images: PNG, JPG, GIF, BMP
- Documents: PDF, DOC, etc.
- Configuration: JSON, XML, etc.
- Other: Any binary file format
All files maintain their original format when deserialized.
📊 Benchmarking
The built-in benchmark tool provides detailed performance metrics:
- Serialization/Deserialization times
- Compression ratios
- Memory usage
- Throughput (MB/s)
- Size comparisons
💻 Language Support
- .NET: Native support with high-performance implementation
- Python:
pip install flexon-py
- JavaScript/Node.js:
npm install flexon-js
- Java: Maven Central
com.flexon:flexon-java
- Go:
go get github.com/flexon/flexon-go
- Rust:
cargo add flexon
📚 Documentation
Visit our comprehensive documentation for:
📚 Command Reference
Main Commands
flexon-cli <command> [options]
Core Commands
serialize
: Convert files to Flexon formatdeserialize
: Convert Flexon files back to original formatbenchmark
: Run performance testshelp
: Display help information
Legacy Commands
encode
: Convert JSON to Flexon (legacy)decode
: Convert Flexon to JSON (legacy)inspect
: View Flexon file contentsvalidate
: Validate Flexon against schemaencrypt
: Encrypt existing Flexon filedecrypt
: Decrypt encrypted Flexon file
Global Options
-i, --input
: Input file(s) to process (can specify multiple)-o, --output
: Output file or directory-s, --schema
: JSON schema file for validation-e, --encrypt
: Encryption key and optional algorithm-c, --compression
: Compression method-b, --benchmark
: Enable performance benchmarking
Compression Methods
FlexonCLI supports multiple compression algorithms:
None
: No compressionGZip
: Standard GZip compression (default)Deflate
: Deflate algorithmBrotli
: High-compression Brotli algorithm
Example:
# Use Brotli compression
flexon-cli serialize -i data.json -o compressed.flexon -c Brotli
Encryption Options
Three encryption algorithms are supported:
AES-256 (Default)
- Industry-standard symmetric encryption
- 256-bit key length
- Secure for most use cases
ChaCha20-Poly1305
- Modern, high-performance encryption
- Excellent for mobile/ARM devices
- Built-in authentication
TripleDES
- Legacy system compatibility
- 168-bit effective key length
- FIPS 46-3 compliant
Example usage:
# Default AES-256 encryption
flexon-cli serialize -i data.json -o secure.flexon -e myKey
# ChaCha20 encryption
flexon-cli serialize -i data.json -o secure.flexon -e myKey ChaCha20
# TripleDES encryption
flexon-cli serialize -i data.json -o secure.flexon -e myKey TripleDES
🤖 AI Integration Features
Flexon provides robust support for AI data handling and security through its schema validation and binary data capabilities.
AI Data Schemas
Pre-defined schemas for common AI data structures:
prompt_schema.json
: Validates AI prompt data including:- Prompt text and parameters
- Model metadata
- Context history
- Embeddings
- Security fingerprints
- Audit trails
training_schema.json
: Validates AI training datasets:- Input-output pairs
- Embeddings
- Quality metrics
- Dataset metadata
- Model parameters
AI Data Security
Flexon's encryption features provide protection against prompt injection and data tampering:
# Secure an AI prompt with encryption
flexon-cli serialize -i prompt.json -o secure_prompt.flexon -s prompt_schema.json -e mykey ChaCha20
# Validate and store training data
flexon-cli serialize -i training_data.json -o dataset.flexon -s training_schema.json
# Store embeddings with prompts
flexon-cli serialize -i prompt.json -i embeddings.bin -o ai_package.flexon
AI Data Structure Example
{
"prompt": "Explain quantum computing",
"metadata": {
"model": "gpt-4",
"temperature": 0.7,
"maxTokens": 2048
},
"context": [
{
"role": "system",
"content": "You are a physics tutor"
}
],
"embeddings": [0.1, 0.2, 0.3],
"security": {
"fingerprint": "base64_hash",
"auditTrail": [...]
}
}
AI Utilities
The AIUtils
class provides helper functions for:
- Generating prompt fingerprints
- Estimating token counts
- Creating metadata structures
- Validating AI data
- Managing training datasets
Best Practices
Schema Validation
- Always validate AI data against schemas
- Use fingerprinting for sensitive prompts
- Maintain audit trails for data lineage
Encryption
- Encrypt sensitive prompts
- Use ChaCha20 for better performance
- Store keys securely
Data Organization
- Keep prompts and embeddings together
- Include comprehensive metadata
- Maintain version control
Performance
- Use binary format for embeddings
- Benchmark large datasets
- Optimize token usage
🎯 Use Cases
- High-Performance APIs: Reduce bandwidth and processing overhead
- Game Development: Efficient asset and state serialization
- IoT Applications: Compact data format for resource-constrained devices
- Big Data Processing: Fast serialization for large datasets
- Real-time Systems: Low-latency data exchange
- Configuration Management: Type-safe configuration files
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
📬 Contact & Support
- Website: jvrsoftware.co.za
- Email: jvrsoftware@gmail.com or jan@jvrsoftware.co.za
- GitHub: github.com/LoSkroefie/flexon-cli
- Issues: GitHub Issues
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
Created and maintained by Jan van Rooyen at JVR Software.
Made with ❤️ by JVR Software
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Updated contact information and documentation