npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@layoutor/cli

v1.0.1

Published

CLI for Layoutor's PDF layout-preservation and text-rewrite service

Readme

@layoutor/cli

Command-line access to Layoutor for Node.js 20 and newer. Layoutor is a layout-preservation service, not a translation engine: it extracts a PDF's text as units for you or your model to rewrite, then re-typesets your submitted text so the PDF looks like the original. Use it for register or tone changes, simplification, correction, glossary application, or translation. Layoutor never writes, translates, or judges text itself; --to names the language of the text you submit, including the source language for same-language edits.

Install

npm install --global @layoutor/cli

Set an API key. LAYOUTOR_API_KEY takes precedence over --key when both are present. Credentials must be lk_live_ followed by exactly 43 URL-safe characters (A-Z, a-z, 0-9, _, or -). Every other value, including the empty string, produces invalid_credentials; an unspecified credential produces missing_credentials.

export LAYOUTOR_API_KEY="your-api-key"

The CLI package depends on @layoutor/sdk 1.0.1. The repository lockfile links the sibling SDK during development.

To use an alternate API endpoint, pass --base-url <url> as a global option or set LAYOUTOR_BASE_URL. The option takes precedence over the environment variable. Plain HTTP is accepted only for loopback URLs.

layoutor --base-url http://127.0.0.1:3000 whoami

Commands

Extract JSON units (add --xliff for XLIFF):

layoutor units input.pdf --to ja --from en -o units.json

Submit translated units and compose a PDF:

layoutor compose doc_123 --translations units.ja.json -o output.pdf

Run upload, extraction, submission, and composition in one command:

layoutor translate input.pdf --to ja --translations units.ja.json -o output.pdf

Inspect or delete a document and inspect the authenticated account:

layoutor status doc_123
layoutor delete doc_123
layoutor whoami

Output files are not overwritten by default. Add --force to units, compose, or translate to replace an existing output file.

--help before a -- option terminator takes precedence over credentials and other argument validation. After --, every token is positional: the first is the command name when the terminator precedes the command, and later tokens such as --help are passed literally as command arguments. Add --json to any command for one machine-readable success object on stdout. Errors are written only to stderr. Progress is shown as one updating stderr line only when stderr is a TTY; JSON mode suppresses it.

Success and failure output replaces every exact occurrence of the accepted credential, even inside a larger identifier. It also replaces every string matching lk_live_ followed by 43 URL-safe characters. Key-shaped non-credential text is therefore redacted as an intentional false positive. Error codes are not redacted.

Exit statuses:

| Status | Meaning | | ---: | --- | | 0 | Successful command or help output. | | 2 | Invalid arguments, missing or invalid credentials, local file or PDF failure, invalid JSON/XLIFF/translation shape, or an existing output path without --force. | | 3 | SDK or API failure, invalid API base URL, network or invalid-response failure, terminal document failure, or an unexpected internal error. |