Skip to main content

CLI for literalizer - convert data structures to native language literal syntax.

Project description

Build Status PyPI

literalizer-cli

CLI for literalizer - convert data structures to native language literal syntax.

Installation

With pip

Requires Python 3.12+.

pip install literalizer-cli

With Homebrew (macOS, Linux, WSL)

Requires Homebrew.

brew tap adamtheturtle/literalizer-cli
brew install literalizer-cli

With winget (Windows)

Requires winget.

winget install --id adamtheturtle.literalizer-cli --source winget --exact

The winget package may not be the latest version.

Pre-built Linux (x86) binaries

$ curl --fail -L https://github.com/adamtheturtle/literalizer-cli/releases/latest/download/literalize-linux -o /usr/local/bin/literalize &&
    chmod +x /usr/local/bin/literalize

Pre-built macOS (ARM) binaries

$ curl --fail -L https://github.com/adamtheturtle/literalizer-cli/releases/latest/download/literalize-macos -o /usr/local/bin/literalize &&
    chmod +x /usr/local/bin/literalize

You may need to remove the quarantine attribute to run the binary:

$ xattr -d com.apple.quarantine /usr/local/bin/literalize

Pre-built Windows binaries

Download the Windows executable from the latest release and place it in a directory on your PATH.

With Docker

$ docker run --rm -i ghcr.io/adamtheturtle/literalizer-cli:latest literalize --help

With Nix

Requires Nix.

nix --extra-experimental-features 'nix-command flakes' run "github:adamtheturtle/literalizer-cli" -- --help

To avoid passing --extra-experimental-features every time, enable flakes permanently.

Or add to your flake inputs:

{
  inputs.literalizer-cli.url = "github:adamtheturtle/literalizer-cli";
}

Usage example

# Convert JSON on stdin to a Python literal
echo '{"name": "Alice", "age": 30}' | literalize --language python

# Convert to multiple languages
echo '[1, 2, 3]' | literalize --language rust
echo '{"key": "value"}' | literalize --language go

Development

uv sync --extra dev
uv run pytest

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

literalizer_cli-2026.3.23.2.tar.gz (82.6 kB view details)

Uploaded Source

Built Distribution

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

literalizer_cli-2026.3.23.2-py2.py3-none-any.whl (6.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file literalizer_cli-2026.3.23.2.tar.gz.

File metadata

  • Download URL: literalizer_cli-2026.3.23.2.tar.gz
  • Upload date:
  • Size: 82.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for literalizer_cli-2026.3.23.2.tar.gz
Algorithm Hash digest
SHA256 0d7e61a9e26c15a9435ce08c800aeeb6753e7f78934af434d3d376ade2e993e7
MD5 e2efa4442bd7d7be029c98ffb3af3e3d
BLAKE2b-256 0e56dbda6ecd8daa35049044fbe0bba99ef765cad04a767992dbd9d353591982

See more details on using hashes here.

Provenance

The following attestation bundles were made for literalizer_cli-2026.3.23.2.tar.gz:

Publisher: release.yml on adamtheturtle/literalizer-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file literalizer_cli-2026.3.23.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for literalizer_cli-2026.3.23.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1d6d1bc87f967a326403214c4b78eedc026b219baceede250c1555d1035db575
MD5 b819a8dc6644d607006298c40a38699a
BLAKE2b-256 f9b96d16c53e4d40c61de7367d8c9654c7a23920315330ecd7efad88969ea779

See more details on using hashes here.

Provenance

The following attestation bundles were made for literalizer_cli-2026.3.23.2-py2.py3-none-any.whl:

Publisher: release.yml on adamtheturtle/literalizer-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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