Polyconv

Quick Start

Install Polyconv and run your first CLI or TypeScript conversion.

Requirements

  • Node.js 22+
  • pnpm for the examples below

Packages are ESM-only.

Install The CLI

pnpm add -g @polyconv/cli

Use pnpx when you do not want a global install:

pnpx @polyconv/cli convert --help

Convert A File

polyconv convert input.json --to yaml --pretty --output output.yaml
polyconv convert input.json --to xml --root-name package --output output.xml
polyconv convert input.toml --to json --output output.json

Install Library Packages

pnpm add @polyconv/json
pnpm add @polyconv/toml

Use A Library

import { jsonToYaml } from "@polyconv/json";

const yaml = jsonToYaml('{"name":"polyconv","version":"0.3.1"}', {
  pretty: true,
  sortKeys: true,
});

Development Setup

git clone https://github.com/wingkwong/polyconv.git
cd polyconv
pnpm install
pnpm build

On this page