Metadata-Version: 2.4
Name: loki-cli
Version: 0.1.0
Summary: Offline Developer CLI for data transformation, formatting, and token decoding
Author: Loki Project Developers
License: MIT License
        
        Copyright (c) 2025 Loki Project
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/code-chaios/loki
Project-URL: Repository, https://github.com/code-chaios/loki.git
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Topic :: Utilities
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer>=0.9.0
Requires-Dist: pyjwt>=2.8.0
Requires-Dist: python3-saml>=1.15.0
Requires-Dist: pyyaml>=6.0.1
Requires-Dist: lxml>=4.9.3
Requires-Dist: pandas>=2.0.3
Provides-Extra: test
Requires-Dist: pytest>=7.4.0; extra == "test"
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
Dynamic: license-file

# **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 **Lo**cal **Ki**t 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:

```bash
pip install .
```

For development installation:

```bash
pip install -e .
```

## Usage

### JWT Decoding

```bash
# Decode a JWT token
loki jwt decode <TOKEN>

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

### SAML Decoding

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

### JSON Formatting

```bash
# 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

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

### YAML Formatting

```bash
# Format YAML
cat config.yml | loki yaml format
```

### CSV to JSON Conversion

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

### JSON to CSV Conversion

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