Skip to content

Quick Start Guide

LoSkroefie edited this page Jan 19, 2025 · 1 revision

Quick Start Guide

This guide will help you get started with FLEXON CLI quickly.

Installation

  1. Download the latest release for your platform:

  2. Extract the archive to a suitable location

  3. Add to PATH:

    # Windows (PowerShell Admin)
    $env:Path += ";C:\path\to\flexon-cli"
    
    # macOS/Linux
    export PATH="/path/to/flexon-cli:$PATH"
  4. Verify installation:

    flexon-cli --version

Basic Usage

Converting JSON to FLEXON

# Basic conversion
flexon-cli encode input.json output.flexon

# With compression
flexon-cli encode --compress input.json output.flexon

# With schema validation
flexon-cli encode --schema schema.json input.json output.flexon

Converting FLEXON to JSON

# Basic conversion
flexon-cli decode input.flexon output.json

# Pretty print
flexon-cli decode --pretty input.flexon output.json

Inspecting FLEXON Files

# View contents
flexon-cli inspect data.flexon

# Export inspection to file
flexon-cli inspect data.flexon --output report.txt

Schema Validation

# Validate file
flexon-cli validate data.flexon schema.json

# Detailed validation report
flexon-cli validate --detailed data.flexon schema.json

Common Operations

Data Types

FLEXON supports all JSON types plus additional types:

  • Strings, Numbers, Booleans, Null
  • Arrays and Objects
  • DateTime
  • UUID
  • Binary Data

Example:

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "timestamp": "2025-01-19T08:39:44+02:00",
  "name": "Example",
  "data": [1, 2, 3]
}

Schema Example

{
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "name": {
      "type": "string"
    },
    "data": {
      "type": "array",
      "items": {
        "type": "number"
      }
    }
  }
}

Next Steps

Clone this wiki locally