Upload documents to Nudocs.ai for rich editing, get shareable links, and pull back the results.
npm install -g @nutrient-sdk/nudocs-cli
# Option 1: Environment variable
export NUDOCS_API_KEY="nudocs_your_key_here"
# Option 2: Config file
mkdir -p ~/.config/nudocs
echo "nudocs_your_key_here" > ~/.config/nudocs/api_key
nudocs upload <file> # Upload and get edit link
nudocs list # List all documents
nudocs link [ulid] # Get edit link (last upload if no ULID)
nudocs pull [ulid] [--format fmt] # Download document (default: docx)
nudocs delete <ulid> # Delete a document
nudocs config # Show configuration
nudocs upload nudocs pull [ulid] --format | Scenario | Recommended Format |
|---|---|
| ---------- | ------------------- |
| User edited with rich formatting | docx (default) |
| Simple text/code content | md |
| Final delivery/sharing | pdf |
See references/formats.md for full format support.
Recognize these user intents:
Upload/Send:
Pull/Fetch:
Link:
List:
Before uploading, ensure good structure:
See references/document-design.md for templates and guidelines.
User: Write me a blog post about remote work and send it to Nudocs
Agent:
1. Writes blog-remote-work.md with proper structure
2. Runs: nudocs upload blog-remote-work.md
3. Returns: "Here's your Nudocs link: https://nudocs.ai/file/01ABC..."
User: *edits in Nudocs, adds formatting, images*
User: Pull that back
Agent:
1. Runs: nudocs pull --format docx
2. Reads the downloaded file
3. Returns: "Got your updated document! Here's what changed..."
| Error | Cause | Solution |
|---|---|---|
| ------- | ------- | ---------- |
| "No API key found" | Missing credentials | Set NUDOCS_API_KEY or create config file |
| "DOCUMENT_LIMIT_REACHED" | Free tier limit (10 docs) | Delete old docs or upgrade to Pro |
| "Unauthorized" | Invalid API key | Regenerate key in Nudocs settings |
| "No ULID provided" | Missing document ID | Specify ULID or upload a doc first |
@nutrient-sdk/nudocs-cli on npm)共 1 个版本