Command-line interface for Nudocs.ai - upload, manage, and export documents
npm install @nutrient-sdk/nudocs-cliCommand-line interface for Nudocs.ai - upload, manage, and export documents.
``bash`
npm install -g @nutrient-sdk/nudocs-cli
Or use directly with npx:
`bash`
npx @nutrient-sdk/nudocs-cli upload my-document.md
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):
`bash`
export NUDOCS_API_KEY="nudocs_your_key_here"
Config file (recommended for personal use):
`bash`
mkdir -p ~/.config/nudocs
echo "nudocs_your_key_here" > ~/.config/nudocs/api_key
`bash`
nudocs upload my-document.md
Uploads the file and returns an edit link. Supports markdown, docx, pdf, html, txt, and more.
`bash`
nudocs list
`bash`
nudocs link # Last uploaded document
nudocs link 01ABC123XYZ # Specific document by ULID
`bash`
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
`bash`
nudocs delete 01ABC123XYZ
`bash`
nudocs config
)
- Microsoft Word (.doc, .docx)
- PDF (.pdf)
- HTML (.html)
- Plain text (.txt)
- OpenDocument (.odt)
- Rich Text (.rtf)
- EPUB (.epub)
- LaTeX (.tex, .latex)$3
- 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 upload and nudocs pull` commandsFor MCP-based integrations (Claude Desktop), see @nutrient-sdk/nudocs-mcp-server.
MIT © PSPDFKit GmbH