Skip to main content

No project description provided

Project description

toml2json

CI Crates.io PyPI - Version

A command-line tool that converts TOML to JSON. Nothing more, nothing less.

Installation

Cargo

cargo install toml2json

PyPI

NOTE: toml2json on PyPI was originally a pure Python CLI; ownership of the name on PyPI was transferred to woodruffw for this Rust-based CLI in August 2025. Versions prior to 0.1.0 on PyPI are the old pure Python version.

uvx toml2json
uv tool install toml2json
pipx install toml2json

# or pip install, if you're in a virtual environment

Homebrew

toml2json is available via Homebrew:

brew install toml2json

Alpine Linux

toml2json is available for Alpine Edge. It can be installed via apk after enabling the testing repository.

apk add toml2json

Arch Linux

If you're using Arch Linux, you can install toml2json using an AUR helper. For example:

paru -S toml2json

Debian/Ubuntu

toml2json is available since Debian 13 Trixie and Ubuntu 25.04, packaged as rust-toml2json.

apt install rust-toml2json

Nixpkgs

nix-env --install toml2json

Please let us know if you package toml2json for another package manager or ecosystem!

Usage

Convert TOML on stdin to JSON, filtering it through jq:

$ toml2json <<< 'wow = "amazing"' | jq

Produces:

{
  "wow": "amazing"
}

Convert TOML from a file and pretty-print it without jq:

$ toml2json --pretty ~/.config/kbs2/kbs2.conf

Produces:

{
  "age-backend": "RageLib",
  "error-hook": "~/.config/kbs2/hooks/error-hook-notify",
  "keyfile": "REDACTED-GO-AWAY",
  "public-key": "REDACTED-GO-AWAY",
  "reentrant-hooks": false,
  "store": "~/.kbs2-store",
  "wrapped": true,
  "generators": [
    {
      "alphabet": "abcdefghijklmnopqrstuvwxyz0123456789(){}[]-_+=",
      "length": 16,
      "name": "default"
    }
  ],
  "commands": {
    "edit": {
      "editor": "subl -w",
      "post-hook": "~/.config/kbs2/hooks/push-repo"
    },
    "new": {
      "generate-on-empty": true,
      "post-hook": "~/.config/kbs2/hooks/push-repo"
    },
    "pass": {
      "clear-after": true,
      "clear-hook": "~/.config/kbs2/hooks/pass-clear-notify",
      "clipboard-duration": 10,
      "x11-clipboard": "Clipboard"
    },
    "rm": {
      "post-hook": "~/.config/kbs2/hooks/push-repo"
    }
  }
}

Amazing. What more could you want? Hopefully nothing, because it will never do anything else.

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

toml2json-1.4.0.tar.gz (10.0 kB view details)

Uploaded Source

Built Distributions

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

toml2json-1.4.0-py3-none-win_amd64.whl (403.9 kB view details)

Uploaded Python 3Windows x86-64

toml2json-1.4.0-py3-none-win32.whl (373.9 kB view details)

Uploaded Python 3Windows x86

toml2json-1.4.0-py3-none-musllinux_1_2_x86_64.whl (563.0 kB view details)

Uploaded Python 3musllinux: musl 1.2+ x86-64

toml2json-1.4.0-py3-none-musllinux_1_2_armv7l.whl (538.3 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARMv7l

toml2json-1.4.0-py3-none-musllinux_1_2_aarch64.whl (541.9 kB view details)

Uploaded Python 3musllinux: musl 1.2+ ARM64

toml2json-1.4.0-py3-none-manylinux_2_28_x86_64.whl (514.8 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ x86-64

toml2json-1.4.0-py3-none-manylinux_2_28_armv7l.whl (513.5 kB view details)

Uploaded Python 3manylinux: glibc 2.28+ ARMv7l

toml2json-1.4.0-py3-none-manylinux_2_24_aarch64.whl (497.1 kB view details)

Uploaded Python 3manylinux: glibc 2.24+ ARM64

toml2json-1.4.0-py3-none-macosx_11_0_arm64.whl (471.5 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

toml2json-1.4.0-py3-none-macosx_10_12_x86_64.whl (494.2 kB view details)

Uploaded Python 3macOS 10.12+ x86-64

File details

Details for the file toml2json-1.4.0.tar.gz.

File metadata

  • Download URL: toml2json-1.4.0.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for toml2json-1.4.0.tar.gz
Algorithm Hash digest
SHA256 fe64f745403f8b246ee0d554ef5fb5708267c8833d45725f2223bf536f869650
MD5 4daeb9042747cfb34895d603bc78f568
BLAKE2b-256 a4c15c3182c81a5d71443bc202a33e9de084f14bd232d31865b9a4190f28daed

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-win_amd64.whl.

File metadata

  • Download URL: toml2json-1.4.0-py3-none-win_amd64.whl
  • Upload date:
  • Size: 403.9 kB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for toml2json-1.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 b690fedb864725a50b16b362be3620962ff1ab1c2c385fa6440c7aa57ee0f1c5
MD5 36a300cadace23797833ec3b2ce6bf68
BLAKE2b-256 37f5faaa742264b18479762100c8bd15919faf254454d0a770f9fc981b2c8a53

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-win32.whl.

File metadata

  • Download URL: toml2json-1.4.0-py3-none-win32.whl
  • Upload date:
  • Size: 373.9 kB
  • Tags: Python 3, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for toml2json-1.4.0-py3-none-win32.whl
Algorithm Hash digest
SHA256 54dab7f486ad27903600f5a4c04252180639b21d25ec0591cfd9b1c5363f1321
MD5 cc4cd06335e1640df610a226657a4539
BLAKE2b-256 dd6c8ababdeb81e734094e689d01b95a3cc3174dd056e28443511e3fc93297f8

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 9bd36115a563c44a5825c58fa1dd1cf342a20a4e96e1a70fdf02d75ee20aee2d
MD5 c1535e3cfd2b26b833f772992f472a4e
BLAKE2b-256 5368717fb3013157fe344d6838371ffffb88c520efb2afdb74072080e2100f6e

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-musllinux_1_2_armv7l.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-musllinux_1_2_armv7l.whl
Algorithm Hash digest
SHA256 3fc3f812220008d600650412d538d2ed0f4c23657358e14bc882f3061f6b2f93
MD5 f7a18300ec315f768a903f8ddb507917
BLAKE2b-256 16f2e1961b921d275d920c0ffd0e1dbf392ebc667d85e3b25317b7cf15bc815a

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 42fbf06c88a8c3b14a5e06ae72bcc81f3694411993a568d167f574e483fd5786
MD5 6545ffd5b416342bcaee983eeec6fef7
BLAKE2b-256 9389a0153b332dab45b974a5de8aabf08be3490ab426fe19356bf12b31cc6527

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 01782568a9b1f7a8858cabb808e05c2cdeae36cb1bd37ec517e9ebf98f00ec98
MD5 37234efb5efd6e64d776abb6d877c0e7
BLAKE2b-256 f5b35de37522d29fe8467b3d7235f7876c4b3d088df19f6b7b7890b1ff6a6d90

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-manylinux_2_28_armv7l.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-manylinux_2_28_armv7l.whl
Algorithm Hash digest
SHA256 59bcdcce91aaaa7475b91d409071f0808d656ada76924b88e6a9f8a363a74902
MD5 7307539f91c46cd840a00f80cacc73ca
BLAKE2b-256 6054d127fcd25cf761a3d72f6bfa1981bbd2f10f808d57072898a29eb375a9fe

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-manylinux_2_24_aarch64.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-manylinux_2_24_aarch64.whl
Algorithm Hash digest
SHA256 5c434cbc0ca625d1f6e363d851e809736b5e6170069da2c3bcca8ceea2a1b8c1
MD5 1e26723ab5e2ab3cb5cd1fb1addc77e0
BLAKE2b-256 de20d44de51f753846c25844936fcb89340506ed3aaf53c1a0c98f1c9e5d113b

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a703dc6b37e2f0d9046ac0883bca2c672b5436f2b33e662547f08b973f46136f
MD5 595f29f1ac6380db95f50d12c87fe1a3
BLAKE2b-256 1d10e3faaaa8b26dc3f72ada9e22b0222d26a37cc7a9bb2f19cb7ef30a3a792b

See more details on using hashes here.

File details

Details for the file toml2json-1.4.0-py3-none-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for toml2json-1.4.0-py3-none-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 50fbb146d3eaaef784d62e57ab4188ed1770b633c8b0d13476823140ff0f8c6f
MD5 91a326d29d241e77bab9e5247fdc10c7
BLAKE2b-256 55669f4cb9df5656e3ff3991c0eca8724076bb1ae7067c2d3588d6ff81a70a42

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