Skip to content

PSPDFKit-labs/nudocs-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nudocs

@nutrient-sdk/nudocs-cli

Command-line interface for Nudocs.ai
Upload, manage, and export documents from your terminal

npm version CI License Downloads

InstallationQuick StartCommandsAI AgentsFormats


Installation

npm install -g @nutrient-sdk/nudocs-cli

Or use directly with npx:

npx @nutrient-sdk/nudocs-cli upload my-document.md

Quick Start

1. Get your API key

Sign in at nudocs.ai and click "Integration" to get your API key.

2. Configure the CLI

# Option A: Environment variable (recommended for CI)
export NUDOCS_API_KEY="nudocs_your_key_here"

# Option B: Config file (recommended for personal use)
mkdir -p ~/.config/nudocs
echo "nudocs_your_key_here" > ~/.config/nudocs/api_key

3. Upload your first document

nudocs upload my-document.md

You'll get back an edit link to open in Nudocs! ✨


Commands

upload — Upload a document

nudocs upload report.md
nudocs upload presentation.docx

Uploads the file and returns an edit link. The document ID is saved for quick access.

list — List all documents

nudocs list

link — Get edit link

nudocs link                    # Last uploaded document
nudocs link 01ABC123XYZ        # Specific document by ID

pull — Download/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 filename

delete — Delete a document

nudocs delete 01ABC123XYZ

config — Show configuration

nudocs config

Supported Formats

Upload (Input)

Format Extensions
Markdown .md
Microsoft Word .doc, .docx
PDF .pdf
HTML .html
Plain text .txt
OpenDocument .odt
Rich Text .rtf
EPUB .epub
LaTeX .tex, .latex

Export (Output)

Format Flag
Word (default) --format docx
Markdown --format md
PDF --format pdf
HTML --format html
Plain text --format txt

Use with AI Agents

This CLI is designed to work seamlessly with AI coding assistants and agents:

Any Agent with Shell Access

# Upload a document
nudocs upload my-blog.md

# Get the edit link
nudocs link

# Pull back after editing
nudocs pull --format md

Clawdbot

Install the Nudocs skill for native integration:

clawdhub install nudocs

Claude Desktop / Claude Code

For native MCP integration, use @nutrient-sdk/nudocs-mcp-server.


Environment Variables

Variable Description
NUDOCS_API_KEY Your Nudocs API key
NUDOCS_URL API base URL (default: https://nudocs.ai)

Examples

Blog Writing Workflow

# Write your post
echo "# My Blog Post\n\nContent here..." > blog.md

# Upload to Nudocs for rich editing
nudocs upload blog.md
# → Opens in Nudocs with AI assistance

# Pull back the polished version
nudocs pull --format md --output blog-final.md

Document Conversion

# Upload a markdown file
nudocs upload report.md

# Export as PDF
nudocs pull --format pdf --output report.pdf

# Export as Word
nudocs pull --format docx --output report.docx

License

MIT © Nutrient


Nudocs.aiChangelogReport IssueMCP Server

About

CLI for Nudocs.ai - upload, manage, and export documents

Resources

License

Stars

Watchers

Forks

Packages

No packages published