{"_id":"@elchika-inc/moonqr-cli","name":"@elchika-inc/moonqr-cli","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@elchika-inc/moonqr-cli","version":"0.1.0","type":"module","description":"Print a QR code to your terminal. Hand a URL from your CLI to your phone by pointing a camera at it.","license":"Apache-2.0","engines":{"node":">=18.18.0"},"repository":{"type":"git","url":"git+https://github.com/elchika-inc/moonqr.git","directory":"packages/cli"},"homepage":"https://github.com/elchika-inc/moonqr/tree/main/packages/cli#readme","bugs":{"url":"https://github.com/elchika-inc/moonqr/issues"},"publishConfig":{"access":"public"},"keywords":["qrcode","qr","cli","terminal","moonbit"],"bin":{"moonqr":"bin/moonqr.js"},"dependencies":{"@elchika-inc/moonqr":"^0.2.0"},"devDependencies":{"@types/node":"^22.10.2","tsup":"^8.5.1","typescript":"^6.0.3","vitest":"^4.1.10"},"scripts":{"build":"tsup","test:unit":"vitest run","typecheck":"tsc --noEmit -p tsconfig.json"},"_id":"@elchika-inc/moonqr-cli@0.1.0","_integrity":"sha512-85COgiTnzHO629hNDfA1Ix7xHF4kU7kDHEHLtCgB1DEpDIGcUjDRIWv1MIlwQDf+0WAad3UuIdi3rkGC0AlggQ==","_resolved":"/private/var/folders/hy/dnckvhxs2rjczcpybl990ldw0000gn/T/432b3aa2b52dd4ea5eedf23ec172ae06/elchika-inc-moonqr-cli-0.1.0.tgz","_from":"file:elchika-inc-moonqr-cli-0.1.0.tgz","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-85COgiTnzHO629hNDfA1Ix7xHF4kU7kDHEHLtCgB1DEpDIGcUjDRIWv1MIlwQDf+0WAad3UuIdi3rkGC0AlggQ==","shasum":"9f135892ba85e2821d4c36839743ddc27df698f5","tarball":"https://registry.npmjs.org/@elchika-inc/moonqr-cli/-/moonqr-cli-0.1.0.tgz","fileCount":7,"unpackedSize":32621,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDayWkWPrjkVrdNFz3NrLd9Lz1YqIaMQH20D/uEw3EN2QIgbkLBCKBg4Rs96eBEOoePFkKCrHqKkSDVY+wCPBV9T2I="}]},"_npmUser":{"name":"naoto24kawa","email":"naoto24kawa@gmail.com"},"directories":{},"maintainers":[{"name":"naoto24kawa","email":"naoto24kawa@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/moonqr-cli_0.1.0_1788341925606_0.5703481033934272"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-02T09:38:45.443Z","0.1.0":"2026-09-02T09:38:45.750Z","modified":"2026-09-02T09:38:46.004Z"},"maintainers":[{"name":"naoto24kawa","email":"naoto24kawa@gmail.com"}],"description":"Print a QR code to your terminal. Hand a URL from your CLI to your phone by pointing a camera at it.","homepage":"https://github.com/elchika-inc/moonqr/tree/main/packages/cli#readme","keywords":["qrcode","qr","cli","terminal","moonbit"],"repository":{"type":"git","url":"git+https://github.com/elchika-inc/moonqr.git","directory":"packages/cli"},"bugs":{"url":"https://github.com/elchika-inc/moonqr/issues"},"license":"Apache-2.0","readme":"# @elchika-inc/moonqr-cli\n\nPrint a QR code to your terminal.\n\nUseful when something in your terminal produces a URL — a dev server address, a preview\ndeployment, a pull request, an agent handing you a link — and you want it on your phone. Point a\ncamera at the screen instead of retyping it.\n\n```sh\nnpx @elchika-inc/moonqr-cli \"https://example.com\"\n```\n\nOr install it:\n\n```sh\nnpm install -g @elchika-inc/moonqr-cli\nmoonqr \"https://example.com\"\n```\n\n## Options\n\n| Option | Default | |\n|---|---|---|\n| `-e, --ec <L\\|M\\|Q\\|H>` | `M` | Error correction level |\n| `--no-color` | | Do not emit ANSI colors |\n| `-h, --help` | | Show usage |\n| `-v, --version` | | Show the version |\n\n`NO_COLOR` is honoured as well.\n\n## Why the output is always colored\n\nMost CLI tools drop color when their output is not a terminal. This one does not, because the\noutput here is not text to be read — it is an image to be photographed.\n\nA QR code needs a light background and dark modules. If the colors are left to the terminal theme,\na dark theme inverts them and readability becomes a matter of luck. So the background is declared\nexplicitly, always. Use `--no-color` or `NO_COLOR` if you want the raw block characters.\n\n## How it fits on screen\n\nTerminal cells are roughly twice as tall as they are wide, so drawing one module per cell would\nstretch the code vertically past the point of being readable. Two module rows are packed into each\ncell using half-block characters instead.\n\nMeasured output sizes:\n\n| Input | Rows × columns |\n|---|---|\n| `http://192.168.1.10:3000` | 17 × 33 |\n| `https://github.com/elchika-inc/moonqr/pull/17` | 21 × 41 |\n| A 76-character deploy-preview URL | 23 × 45 |\n\nAn 80×24 terminal fits all of these. Longer payloads keep growing — the code is `modules + 8`\ncolumns wide and `ceil((modules + 8) / 2)` rows tall, where `modules` is 21 for the smallest QR\nversion and 177 for the largest. Text long enough to need a high version will not fit on screen;\nthat is a limitation of the medium rather than something this tool can work around.\n\n## Development\n\nThis package is part of the [moonqr](https://github.com/elchika-inc/moonqr) monorepo. The `bin`\nentry loads from `dist/`, so build before running from a clone:\n\n```sh\npnpm install\ncd core && moon build --target js --release && cd ..   # the MoonBit core comes first\npnpm -r build\nnode packages/cli/bin/moonqr.js \"https://example.com\"\n```\n\nRendering is verified mechanically: tests parse the rendered string back into a module matrix,\nrasterize it, and run it through the decoder, so a one-module offset fails CI rather than reaching\na camera.\n\n## License\n\nApache-2.0. See [LICENSE](LICENSE), [NOTICE](NOTICE), and\n[THIRD_PARTY_LICENSES](THIRD_PARTY_LICENSES).\n","readmeFilename":"README.md","_rev":"1-4ca1bbe8f10b0933e3d52d186315c97c"}