Skip to main content

Convert between JSON, YAML, TOML, and INI config formats

Project description

fmtconv

Convert between JSON, YAML, TOML, and INI config formats from the command line.

Install

pip install fmtconv-cli

Usage

# Convert between formats
fmtconv to-yaml config.json
fmtconv to-json config.yaml
fmtconv to-toml config.json
fmtconv to-ini config.json
cat config.yaml | fmtconv to-json

# Auto-detect format
fmtconv detect config.yaml          # → yaml

# Validate
fmtconv validate config.json        # → Valid JSON

# Pretty-print in place
fmtconv prettify messy.json

# Write to file
fmtconv to-yaml config.json -o config.yaml

# Sort keys
fmtconv to-json config.yaml --sort-keys

# Machine-readable output
fmtconv detect config.yaml --json   # → {"format": "yaml"}

Commands

Command Description
to-json Convert to JSON
to-yaml Convert to YAML
to-toml Convert to TOML
to-ini Convert to INI
detect Auto-detect format
validate Check if input is valid
prettify Pretty-print in same format

All commands accept a file argument or stdin, and support --json for machine-readable output.

For AI Agents

See SKILL.md for agent-optimized documentation.

License

MIT

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

fmtconv_cli-0.1.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

fmtconv_cli-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fmtconv_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fmtconv_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f7a4b68c49def9507128045f7c3baf6d8c688444e106d98c81ddaa5b5ea280d3
MD5 6e099029c3807c89c99fc2281107f55a
BLAKE2b-256 768a8d688d51dee60b2d1db6ee978577e5dadb4fba9ed0bc4531c1c206be601d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fmtconv_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for fmtconv_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 78599caaa32185a272151d5c40e8cf7f6085e8af22f62397808182c63f70b6cd
MD5 56a55eee71ac50eef506c96fa2aaf88f
BLAKE2b-256 fea7d93d3177b2a0d07d42ab12d3b99a54e2cf49ecef9926c1c99101a7d68138

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