Skip to main content

Build Status PyPI

literalizer-cli

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

Usage example

$ echo '{"name": "Alice", "age": 30}' | literalize --language go
map[string]interface{}{
    "name": "Alice",
    "age": 30,
}

$ echo '[1, 2, 3]' | literalize --language rust
vec![
    1,
    2,
    3,
]

$ echo '[["alice", 30], ["bob", 25]]' | literalize --language python --mode call --call-function create_user --call-params name,age
create_user(name="alice", age=30)
create_user(name="bob", age=25)

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/download/2026.04.30/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/download/2026.04.30/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/2026.04.30" -- --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";
}

Using literalize as a pre-commit hook

To run literalize with pre-commit, add hooks like the following to your .pre-commit-config.yaml:

-   repo: https://github.com/adamtheturtle/literalizer-cli-pre-commit
    rev: v2026.4.30
    hooks:
    -   id: literalize
        args: ["--language", "python"]

Full documentation

See the full documentation.

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.8.16.tar.gz (156.3 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.8.16-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: literalizer_cli-2026.8.16.tar.gz
  • Upload date:
  • Size: 156.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for literalizer_cli-2026.8.16.tar.gz
Algorithm Hash digest
SHA256 f1b84259e03b10681178f90d3305d0268461a977695956c95072a3189fb28dfe
MD5 9a7d96627cb006428ce6e49d0b78d9a9
BLAKE2b-256 61119259020383542597ff549c21734e6ccd18d0d1ac96d099b685c6354fa9a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for literalizer_cli-2026.8.16.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.8.16-py3-none-any.whl.

File metadata

File hashes

Hashes for literalizer_cli-2026.8.16-py3-none-any.whl
Algorithm Hash digest
SHA256 87dc54e1d173ab720fb4b539024e9fa7ed4a4a8468953e66f632681ef81a9007
MD5 052de764c13be5188ef29346e13c44db
BLAKE2b-256 b8795b581979d8660f5832bd419e3bda5c5c829a05f89ff60c00583a19f6307a

See more details on using hashes here.

Provenance

The following attestation bundles were made for literalizer_cli-2026.8.16-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 Sentry Error logging StatusPage Status page