CLI for literalizer - convert data structures to native language literal syntax.
Project description
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,
]
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.03.29/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.03.29/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.03.29" -- --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.3.29
hooks:
- id: literalize
args: ["--language", "python"]
Full documentation
See the full documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file literalizer_cli-2026.4.6.tar.gz.
File metadata
- Download URL: literalizer_cli-2026.4.6.tar.gz
- Upload date:
- Size: 124.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d651cfd04e1b6e6f1f234fb616ecc49d3e866b44d6e748238234d1b40f5a6e69
|
|
| MD5 |
734a69e755d70c13f8608267b7b0090a
|
|
| BLAKE2b-256 |
e499b85ccd9cde76132abf5e4537aac8916771c49c178fbb84415aa003914a53
|
Provenance
The following attestation bundles were made for literalizer_cli-2026.4.6.tar.gz:
Publisher:
release.yml on adamtheturtle/literalizer-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
literalizer_cli-2026.4.6.tar.gz -
Subject digest:
d651cfd04e1b6e6f1f234fb616ecc49d3e866b44d6e748238234d1b40f5a6e69 - Sigstore transparency entry: 1244344201
- Sigstore integration time:
-
Permalink:
adamtheturtle/literalizer-cli@d741cc25c178dbfc3ebd10821cad436d092f59b8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d741cc25c178dbfc3ebd10821cad436d092f59b8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file literalizer_cli-2026.4.6-py2.py3-none-any.whl.
File metadata
- Download URL: literalizer_cli-2026.4.6-py2.py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
822537e918ecab67c176015759d1f7049e3d5dc449d9c85802b971c360357fdd
|
|
| MD5 |
2287075caf5109387965aac435fad6ce
|
|
| BLAKE2b-256 |
f688557661f7e4307155368b94db41b08a4d5faef784a12583cea37aca6b0d76
|
Provenance
The following attestation bundles were made for literalizer_cli-2026.4.6-py2.py3-none-any.whl:
Publisher:
release.yml on adamtheturtle/literalizer-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
literalizer_cli-2026.4.6-py2.py3-none-any.whl -
Subject digest:
822537e918ecab67c176015759d1f7049e3d5dc449d9c85802b971c360357fdd - Sigstore transparency entry: 1244344212
- Sigstore integration time:
-
Permalink:
adamtheturtle/literalizer-cli@d741cc25c178dbfc3ebd10821cad436d092f59b8 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/adamtheturtle
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@d741cc25c178dbfc3ebd10821cad436d092f59b8 -
Trigger Event:
workflow_dispatch
-
Statement type: