@nutrient-sdk/nudocs-cli
v1.0.0
Published
Command-line interface for Nudocs.ai - upload, manage, and export documents
Readme
@nutrient-sdk/nudocs-cli
Command-line interface for Nudocs.ai - upload, manage, and export documents.
Installation
npm install -g @nutrient-sdk/nudocs-cliOr use directly with npx:
npx @nutrient-sdk/nudocs-cli upload my-document.mdSetup
Get your API key from Nudocs.ai (click "Integration" after signing in).
Set your API key using one of these methods:
Environment variable (recommended for CI/scripts):
export NUDOCS_API_KEY="nudocs_your_key_here"Config file (recommended for personal use):
mkdir -p ~/.config/nudocs
echo "nudocs_your_key_here" > ~/.config/nudocs/api_keyUsage
Upload a document
nudocs upload my-document.mdUploads the file and returns an edit link. Supports markdown, docx, pdf, html, txt, and more.
List documents
nudocs listGet edit link
nudocs link # Last uploaded document
nudocs link 01ABC123XYZ # Specific document by ULIDDownload/Export a document
nudocs pull # Last doc as docx (default)
nudocs pull --format md # Last doc as markdown
nudocs pull 01ABC123XYZ --format pdf # Specific doc as PDF
nudocs pull --output report.docx # Custom output filenameDelete a document
nudocs delete 01ABC123XYZShow configuration
nudocs configSupported Formats
Input (upload)
- Markdown (
.md) - Microsoft Word (
.doc,.docx) - PDF (
.pdf) - HTML (
.html) - Plain text (
.txt) - OpenDocument (
.odt) - Rich Text (
.rtf) - EPUB (
.epub) - LaTeX (
.tex,.latex)
Output (export)
- Markdown (
.md) - Microsoft Word (
.docx) - PDF (
.pdf) - HTML (
.html) - Plain text (
.txt) - OpenDocument (
.odt) - Rich Text (
.rtf) - EPUB (
.epub)
Environment Variables
| Variable | Description |
|----------|-------------|
| NUDOCS_API_KEY | Your Nudocs API key |
| NUDOCS_URL | API base URL (default: https://nudocs.ai) |
Use with AI Agents
This CLI works great with AI coding assistants and agents:
- Claude Code / Codex: Agents can exec
nudocs uploadandnudocs pullcommands - Custom agents: Any agent with shell access can use this CLI
- Clawdbot: See @pspdfkit/nudocs-clawdbot-skill for native integration
For MCP-based integrations (Claude Desktop), see @nutrient-sdk/nudocs-mcp-server.
License
MIT © PSPDFKit GmbH
