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/cliUse pnpx when you do not want a global install:
pnpx @polyconv/cli convert --helpConvert 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.jsonInstall Library Packages
pnpm add @polyconv/json
pnpm add @polyconv/tomlUse 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