CLI for literalizer - convert data structures to native language literal syntax.
$ 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)Requires Python 3.12+.
pip install literalizer-cliRequires Homebrew.
brew tap adamtheturtle/literalizer-cli
brew install literalizer-cliRequires winget.
winget install --id adamtheturtle.literalizer-cli --source winget --exactThe winget package may not be the latest version.
$ curl --fail -L https://github.com/adamtheturtle/literalizer-cli/releases/download/2026.08.30.1/literalize-linux -o /usr/local/bin/literalize &&
chmod +x /usr/local/bin/literalize$ curl --fail -L https://github.com/adamtheturtle/literalizer-cli/releases/download/2026.08.30.1/literalize-macos -o /usr/local/bin/literalize &&
chmod +x /usr/local/bin/literalizeDownload the Windows executable from the latest release and place it in a directory on your PATH.
$ docker run --rm -i ghcr.io/adamtheturtle/literalizer-cli:latest literalize --helpRequires Nix.
nix --extra-experimental-features 'nix-command flakes' run "github:adamtheturtle/literalizer-cli/2026.08.30.1" -- --helpTo avoid passing --extra-experimental-features every time, enable flakes permanently.
Or add to your flake inputs:
{
inputs.literalizer-cli.url = "github:adamtheturtle/literalizer-cli";
}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.8.30.1
hooks:
- id: literalize
args: ["--language", "python"]See the full documentation.