Skip to content

Ship the Nutrient CLI and DWS authentication flow - #20

Open
vladimir-tikhonov-nutrient wants to merge 1 commit into
mainfrom
vtikhonov/pdf-to-markdown-dws-productization
Open

Ship the Nutrient CLI and DWS authentication flow#20
vladimir-tikhonov-nutrient wants to merge 1 commit into
mainfrom
vtikhonov/pdf-to-markdown-dws-productization

Conversation

@vladimir-tikhonov-nutrient

@vladimir-tikhonov-nutrient vladimir-tikhonov-nutrient commented Jul 30, 2026

Copy link
Copy Markdown

The npm package and installer expose a new nutrient entry point for account management while preserving the existing conversion commands and installation paths.

Business decisions

  • A new installation gets 1,000 credits without creating an account. They do not expire or renew. Creating a new account discards any unused credits and starts the Free plan with 1,000 credits per month.
  • Containers and CI do not receive automatic credits. Interactive users can sign in; unattended jobs should use --api-key or NUTRIENT_API_KEY.
  • Standard conversion costs 1 credit. Vision costs 2 credits and requires a paid plan.
  • Redistribution, OEM, and white-label use require a separate commercial agreement. The license change needs Legal approval before release.

Technical decisions

  • The package ships nutrient auth login, status, and logout alongside the existing wrappers without changing checksum verification, download locking, or platform selection.
  • A cached pre-account binary is rejected when the CDN is unavailable, so account commands never fall through to an incompatible executable.
  • Documentation states credential precedence, the one-hour / 25-credit offline bound, and separates installation bootstrap data from usage settlement metadata.
  • Existing pdf-to-markdown, pdf-to-text, query, npm, and shell-installer entry points remain valid.

Context: DWS-331

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR introduces a new top-level nutrient CLI entry point for account/auth management while keeping existing PDF conversion commands (pdf-to-markdown, pdf-to-text, query) intact and installable via the same npm/installer paths.

Changes:

  • Added a nutrient launcher script and exposed it via npm bin, installer, and CI validation.
  • Updated the pdf-to-markdown wrapper to support a nutrient verb mode (via NUTRIENT_WRAPPER_VERB) and to install/exec an appropriate verb symlink.
  • Updated documentation and licensing text to describe account connection, plan credits, Vision entitlement, and privacy/usage metadata.

Reviewed changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
README.md Documents the new nutrient auth … workflow, plan/credit model, and privacy/licensing details.
package.json Exposes nutrient as an additional npm-installed executable and extends the check script.
LICENSE.md Updates license terms to describe basic use, account plans, Vision eligibility, and usage metadata.
install.sh Installs the new nutrient wrapper alongside existing command wrappers.
docs/benchmarks.md Updates benchmark notes to reflect paid-plan Vision positioning and authentication requirements.
CHANGELOG.md Adds an Unreleased entry summarizing the new nutrient entry point and auth/plan features.
bin/pdf-to-markdown Adds verb selection for nutrient mode and adjusts update-check/link behavior accordingly.
bin/nutrient New wrapper that routes nutrient … invocations through the existing pdf-to-markdown wrapper.
.github/workflows/validate.yml Extends ShellCheck and install validation to include the new bin/nutrient wrapper.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient marked this pull request as draft July 31, 2026 00:40
@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient force-pushed the vtikhonov/pdf-to-markdown-dws-productization branch from 025ef86 to 059d2c7 Compare July 31, 2026 09:24
@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient marked this pull request as ready for review July 31, 2026 11:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 10 changed files in this pull request and generated no new comments.

@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient marked this pull request as draft July 31, 2026 12:23
@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient marked this pull request as ready for review July 31, 2026 13:15
Comment thread bin/pdf-to-markdown
Comment thread README.md Outdated
@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient force-pushed the vtikhonov/pdf-to-markdown-dws-productization branch from ce0726e to eda5fcc Compare August 3, 2026 16:04
@tomassurin

Copy link
Copy Markdown

Added guides on the intended flows that I operated with for OAuth and anonymous/guest organizations: https://github.com/PSPDFKit/PSPDFKit/blob/master/hosted/docs/guest/pdf-to-markdown-cli-oauth.md

Includes sections about fingerprinting (enforcement is WIP on hosted side).

If anything looks wrong, unclear or missing let me know - device auth and guest orgs are not used yet on production so we have a lot of leeway to change the direction at this point.

@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient marked this pull request as draft August 6, 2026 15:33
@vladimir-tikhonov-nutrient
vladimir-tikhonov-nutrient marked this pull request as ready for review August 7, 2026 08:00

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 11 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants