Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Repository files navigation

Build Status PyPI

literalizer-cli

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-cli

Requires Homebrew.

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

Requires winget.

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

The 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/literalize

Download 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 --help

Requires Nix.

nix --extra-experimental-features 'nix-command flakes' run "github:adamtheturtle/literalizer-cli/2026.08.30.1" -- --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";
}

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.

About

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

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages