This repository was archived by the owner on Oct 14, 2026. It is now read-only.
Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a zero-install DWS CLI alongside the existing MCP server, sharing authentication, validation, sandboxing, and operation execution.
Changes:
- Adds CLI commands, OAuth login, output formats, and executable aliases.
- Extracts shared MCP/CLI operation execution.
- Adds documentation, agent skill guidance, and tests.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/cli.ts |
Implements CLI parsing and execution. |
src/index.ts |
Dispatches CLI or MCP startup. |
src/tool-runner.ts |
Centralizes validated operation execution. |
src/dws/client.ts |
Adds credential-only authentication. |
package.json |
Publishes CLI executable aliases. |
README.md |
Documents standalone CLI usage. |
skills/nutrient-dws/SKILL.md |
Adds companion agent guidance. |
tests/cli.test.ts |
Tests CLI behavior. |
tests/index.test.ts |
Tests entrypoint dispatch. |
tests/dws-client.test.ts |
Tests credential authentication. |
tests/package-metadata.test.ts |
Verifies executable metadata. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| let activeServer: RunServerResult | undefined | ||
| export function isCliInvocation(args: string[]): boolean { | ||
| const first = args[0] | ||
| return first === 'cli' || first === '--help' || first === '-h' || first === '--version' || first === '-v' || isCliCommand(first) |
Comment on lines
+129
to
+132
| const operation = COMMAND_ALIASES[command as keyof typeof COMMAND_ALIASES] | ||
| if (!operation) { | ||
| throw new CliUsageError(`Unknown command: ${command}`) | ||
| } |
Comment on lines
+290
to
+297
| if (staticProducts.length > 0) { | ||
| const message = `Static API key authentication is configured for ${staticProducts.join(' and ')}; browser login is not needed.` | ||
| if (parsed.outputFormat === 'json') { | ||
| writeLine(stdout, JSON.stringify({ authenticated: true, method: 'api-key', products: staticProducts }, null, 2)) | ||
| } else { | ||
| writeLine(stdout, message) | ||
| } | ||
| return 0 |
Member
|
Closing: the local MCP server is retired in favor of the hosted Nutrient MCP (https://mcp.nutrient.io/mcp). Thanks for the work here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Using DWS through the MCP server requires client-specific MCP configuration even when an agent or developer already has shell access. A zero-install CLI provides a lower-friction path for one-shot document operations, scripts, CI, and agent skills while preserving MCP as the richer tool-discovery interface.
Through an npx command, anyone regardless of their agent, can easily access the DWS without having to connect any MCP servers, which is complicated for non-technical users, and additionally requires no permanent installation.
Interactive users can authenticate once with browser OAuth instead of managing API keys or waiting for an API-backed operation to trigger login:
After that, agents and developers can invoke DWS directly without installing a package or configuring an MCP connection.
What Changed
process,sign,redact,parse,extract,credits, andfilescommands with JSON input from an argument, file, or stdin.loginto complete and cache browser OAuth without uploading a document or consuming processing credits.npx -y @nutrient-sdk/dws-mcp-server <command>usage while preserving no-argument MCP startup.The companion skill is included here so the CLI and proposed agent experience can be reviewed together. Whether that skill should ultimately ship from this repository or the dedicated Nutrient skills repository is intentionally left open for maintainer feedback.
Verification
login --format jsoninvocation completed successfully through the shared OAuth credential cache without making a document-processing request.logindoes not call a DWS API endpoint.npm pack --dry-runincludes executabledist/index.jsanddist/cli.jsentry points.