Skip to main content

Offline Developer CLI for data transformation, formatting, and token decoding

Project description

Loki: Offline Developer CLI

About the Project (The "Why Loki?" Story)

"Why Loki?

Is it because this tool is a mischievous shapeshifter, masterfully transforming your data from one form to another—turning chaotic JSON into structured CSV, or decoding cryptic tokens into readable text?

Or is it just a simple shorthand for a Local Kit of developer tools?

The answer is yes."

Features

  • JWT Decoding: Decode JWT tokens to display their header and payload
  • SAML Decoding: Decode Base64-encoded SAML Responses into readable XML
  • JSON Formatting: Pretty-print JSON strings or files with customizable indentation
  • XML Formatting: Pretty-print XML strings or files with standardized indentation
  • YAML Formatting: Pretty-print YAML strings or files in canonical format
  • CSV/JSON Conversion: Convert between CSV and JSON formats
  • Offline Operation: All operations performed locally without internet connection
  • Intuitive CLI: Nested subcommand structure with comprehensive help flags

Installation

To install from source:

pip install .

For development installation:

pip install -e .

Usage

JWT Decoding

# Decode a JWT token
loki jwt decode <TOKEN>

# Or from stdin
cat token.txt | loki jwt decode

SAML Decoding

# Decode a Base64-encoded SAML response
loki saml decode --infile saml.b64 --outfile decoded.xml

JSON Formatting

# Format JSON with default indentation (2 spaces)
loki json format <JSON_DATA>

# Format JSON with custom indentation
cat data.json | loki json format --indent 4

XML Formatting

# Format XML
loki xml format --infile messy.xml

YAML Formatting

# Format YAML
cat config.yml | loki yaml format

CSV to JSON Conversion

# Convert CSV to JSON
loki csv to-json --infile data.csv --outfile data.json

JSON to CSV Conversion

# Convert JSON to CSV
cat data.json | loki csv to-csv --outfile data.csv

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

loki_cli-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

loki_cli-0.1.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file loki_cli-0.1.0.tar.gz.

File metadata

  • Download URL: loki_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.6

File hashes

Hashes for loki_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f69d154841f97215fff5776e0fbd75ab053ff3c6fe00437d959a69ac1d231fd5
MD5 48e5095e7c976aaaba73cacd87367567
BLAKE2b-256 f9018270cb6ee5343b3fc59c8cb698960525f8d8967fc38412f1e8452c8d4dc2

See more details on using hashes here.

File details

Details for the file loki_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: loki_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.6

File hashes

Hashes for loki_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67acbee36b00749199700940bc35ef40f235b100da21d16b1e8232ad1a43d44c
MD5 c618fe590ef76c7f072dc39bb9a3f18f
BLAKE2b-256 18a692d5c3f8ae0dcf85e0765e4141fc44d6bdfd5855ced547c9c4a8ae463ab1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page