Toml2json

Use this skill when the user wants to convert TOML files to JSON format, or pipe TOML data through stdin to get JSON output.

javimosch Updated 57 repo stars

File contents

toml2json Plugin

Very small CLI for converting TOML to JSON.

Commands

Convert

  • toml2json convert file — Convert a TOML file to JSON
  • toml2json convert pretty — Convert TOML to pretty-printed JSON

Usage Examples

  • "Convert a TOML file to JSON"
  • "Pretty-print a TOML configuration as JSON"
  • "Pipe TOML data and convert it"

Installation

cargo install toml2json

Examples

# Convert a file
toml2json config.toml

# Pretty-print
toml2json --pretty config.toml

# Pipe from stdin
cat config.toml | toml2json

# Use with jq
toml2json config.toml | jq '.key'

Key Features

  • Convert TOML to JSON
  • Read from files or stdin
  • Pretty-print output option
  • Pipe-friendly for shell workflows

javimosch/supercli commit 1d278ee0d3

Frequently asked questions

npx get-skill add javimosch/toml2json