{"_id":"@vincentkoc/qrcode-tui","_rev":"2-514f03d226ba705ac92ad02727f810e3","name":"@vincentkoc/qrcode-tui","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"@vincentkoc/qrcode-tui","version":"0.1.0","keywords":["cli","png","qr","qrcode","terminal","tui"],"license":"MIT","_id":"@vincentkoc/qrcode-tui@0.1.0","maintainers":[{"name":"vincentkoc","email":"vincentkoc@ieee.org"}],"bin":{"qrcode-tui":"dist/cli.js"},"dist":{"shasum":"86a5937af8d657de2bfdb1d2f83e73016e1d823b","tarball":"https://registry.npmjs.org/@vincentkoc/qrcode-tui/-/qrcode-tui-0.1.0.tgz","fileCount":15,"integrity":"sha512-TOQcEb3WynH5loV1KX49IuNMD/oEOGMaRcawd1tkCFo4OWqYYvzk05d8OJ9OC+FMHnHqNvSrmRjY9v9AGDdARw==","signatures":[{"sig":"MEUCICct+oCu46le9o9Vsz+pQig9oxfSZeeiJoYZUOyBKj/WAiEA7czb08mEDAuVL9Q00uVIi6u7N5Tkh969iFqPzn/KApE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10235},"type":"module","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"36ec600bec50d746153414b8d9741162b6d99933","scripts":{"test":"pnpm build && node --test test/*.test.mjs","build":"tsc -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","prepublishOnly":"pnpm test"},"_npmUser":{"name":"vincentkoc","email":"vincentkoc@ieee.org"},"_npmVersion":"11.12.1","description":"Modern QR rendering helpers for Node.js CLIs and setup flows","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"qrcode":"^1.5.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.32.1","devDependencies":{"typescript":"^5.9.2","@types/node":"^24.5.2","@types/qrcode":"^1.5.6"},"_npmOperationalInternal":{"tmp":"tmp/qrcode-tui_0.1.0_1776082976063_0.8153680890165662","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@vincentkoc/qrcode-tui","version":"0.2.1","description":"Modern QR rendering helpers for Node.js CLIs and setup flows","type":"module","main":"dist/index.js","types":"dist/index.d.ts","license":"MIT","author":{"name":"Vincent Koc"},"sideEffects":false,"repository":{"type":"git","url":"git+https://github.com/vincentkoc/qrcode-tui.git"},"homepage":"https://github.com/vincentkoc/qrcode-tui#readme","bugs":{"url":"https://github.com/vincentkoc/qrcode-tui/issues"},"bin":{"qrcode-tui":"dist/cli.js"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./package.json":"./package.json"},"funding":{"type":"github","url":"https://github.com/sponsors/vincentkoc"},"directories":{"test":"test"},"publishConfig":{"access":"public"},"packageManager":"pnpm@10.32.1","scripts":{"build":"tsc -p tsconfig.json","check":"tsc -p tsconfig.json --noEmit","test":"pnpm build && node --test test/*.test.mjs","verify":"pnpm check && pnpm test","prepublishOnly":"pnpm verify"},"keywords":["ascii","cli","png","qr","qrcode","svg","terminal","tui","utf8"],"engines":{"node":">=20"},"dependencies":{"qrcode":"^1.5.4"},"devDependencies":{"@types/node":"^24.5.2","@types/qrcode":"^1.5.6","typescript":"^5.9.2"},"gitHead":"a15621851508bbe9098a893f949dc9c679f652d3","_id":"@vincentkoc/qrcode-tui@0.2.1","_nodeVersion":"24.14.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-F2XVHMfasJ0q8G93gtcyU9Px0wMH6o6nIZLrZYSHc6dm9Pq3oCbHuVYYG/UQvJD0rhrGH3P9B6qgpCAqSDUw5w==","shasum":"d6db83a73bbe40026ffee20eb0c1435bce2e9d8f","tarball":"https://registry.npmjs.org/@vincentkoc/qrcode-tui/-/qrcode-tui-0.2.1.tgz","fileCount":17,"unpackedSize":17695,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@vincentkoc%2fqrcode-tui@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIFz8733Y7TEuXIx3JIbjexu0GoNvDQf/38pL7POQzEFkAiEAkLe+WpWVLuMhAQrY6uGo2l2KDR3cWUguBHJBwM9sK5A="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:2c209973-0656-4e60-9e1b-57f3215d7756"}},"maintainers":[{"name":"vincentkoc","email":"vincentkoc@ieee.org"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/qrcode-tui_0.2.1_1776084132863_0.6106713848660412"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-13T12:22:55.986Z","modified":"2026-04-13T12:42:13.290Z","0.1.0":"2026-04-13T12:22:56.207Z","0.2.1":"2026-04-13T12:42:13.038Z"},"license":"MIT","keywords":["ascii","cli","png","qr","qrcode","svg","terminal","tui","utf8"],"description":"Modern QR rendering helpers for Node.js CLIs and setup flows","maintainers":[{"name":"vincentkoc","email":"vincentkoc@ieee.org"}],"readme":"# @vincentkoc/qrcode-tui\n\nmodern QR rendering helpers for Node.js CLIs and setup flows.\n\nthis package exists for the boring but important case where `qrcode-terminal`\nis stale, brittle, or just not worth trusting anymore.\n\nit uses the maintained `qrcode` encoder underneath and exposes a small API for:\n\n- terminal QR rendering\n- UTF-8 QR rendering\n- PNG data URLs\n- base64 PNG payloads\n- SVG rendering\n- writing PNG files for headless or SSH flows\n- writing SVG files for browser and docs flows\n\n## install\n\n```bash\nnpm install @vincentkoc/qrcode-tui\n```\n\n## usage\n\n```ts\nimport {\n renderPngBase64,\n renderSvg,\n renderTerminal,\n renderUtf8,\n writePngFile,\n writeSvgFile,\n} from \"@vincentkoc/qrcode-tui\";\n\nconst terminalQr = await renderTerminal(\"openclaw://pair?code=123\", { small: true });\nprocess.stdout.write(terminalQr);\n\nconst utf8Qr = await renderUtf8(\"openclaw://pair?code=123\");\nprocess.stdout.write(utf8Qr);\n\nconst pngBase64 = await renderPngBase64(\"openclaw://pair?code=123\");\nconst svg = await renderSvg(\"openclaw://pair?code=123\");\nawait writePngFile(\"openclaw://pair?code=123\", \"./pair.png\");\nawait writeSvgFile(\"openclaw://pair?code=123\", \"./pair.svg\");\n```\n\n## cli\n\n```bash\nnpx @vincentkoc/qrcode-tui \"https://openclaw.ai\"\nnpx @vincentkoc/qrcode-tui \"https://openclaw.ai\" --utf8\nnpx @vincentkoc/qrcode-tui \"https://openclaw.ai\" --svg\nnpx @vincentkoc/qrcode-tui \"https://openclaw.ai\" --png-base64\nnpx @vincentkoc/qrcode-tui --type png-data-url \"https://openclaw.ai\"\nnpx @vincentkoc/qrcode-tui \"https://openclaw.ai\" --out pair.png\necho \"https://openclaw.ai\" | npx @vincentkoc/qrcode-tui --utf8\n```\n\n## api\n\n### `renderTerminal(text, options?)`\n\nreturns an ANSI terminal QR string.\n\n### `renderUtf8(text, options?)`\n\nreturns a UTF-8 block-character QR string.\n\n### `renderPngDataUrl(text, options?)`\n\nreturns a `data:image/png;base64,...` URL.\n\n### `renderPngBase64(text, options?)`\n\nreturns the base64 PNG payload without the data URL prefix.\n\n### `renderSvg(text, options?)`\n\nreturns an SVG document string.\n\n### `writePngFile(text, filePath, options?)`\n\nwrites a PNG file to disk and returns the file path. parent directories are\ncreated automatically.\n\n### `writeSvgFile(text, filePath, options?)`\n\nwrites an SVG file to disk and returns the file path. parent directories are\ncreated automatically.\n\n## cli flags\n\n- `--type terminal|utf8|png-base64|png-data-url|svg`\n- `--out `\n- `--width `\n- `--scale `\n- `--margin `\n- `--error-correction `\n- `--no-small`\n- `--utf8`\n- `--svg`\n- `--png-base64`\n- `--png-data-url`\n\n## why not fork `qrcode-terminal`?\n\nbecause the QR math is not the hard part here. the hard part is owning as\nlittle stale code as possible.\n\nthis package keeps the surface small and lets a maintained encoder do the real\nwork.\n\n## why this package exists\n\nthis package is for a very specific annoying class of problem:\n\n- setup flows that need scan-friendly QR output\n- SSH or headless environments where terminal output still matters\n- CLIs that want one small dependency seam for terminal, png, and svg QR output\n\nit is intentionally small. the point is to own the rendering seam without\nowning a stale QR encoder forever.\n\n## license\n\nMIT\n","readmeFilename":"README.md","homepage":"https://github.com/vincentkoc/qrcode-tui#readme","repository":{"type":"git","url":"git+https://github.com/vincentkoc/qrcode-tui.git"},"author":{"name":"Vincent Koc"},"bugs":{"url":"https://github.com/vincentkoc/qrcode-tui/issues"}}