.do

Manage

Manage MDXLD applications and documents

Manage

Manage your MDXLD applications, documents, and deployments.

Document Management

List Documents

List all MDX documents:

mdxdb list

Filter by type:

mdxdb list --type BlogPost

Sort and paginate:

mdxdb list --sort datePublished --order desc --limit 10

Search Documents

Full-text search:

mdxdb search "TypeScript"

Search specific type:

mdxdb search "TypeScript" --type BlogPost

Fuzzy search:

mdxdb search "typscript" --fuzzy

Get Document

Get document by ID:

mdxdb get /blog/my-post

Get from remote:

mdxdb get /blog/my-post --remote

Update Document

Update document:

mdxdb set /blog/my-post --data '{"author":"Jane Doe"}'

Merge with existing:

mdxdb set /blog/my-post --merge --data '{"tags":["typescript"]}'

Delete Document

Delete document:

mdxdb delete /blog/old-post

Delete from remote:

mdxdb delete /blog/old-post --remote --force

Sync with .do Platform

Pull from Platform

Pull documents from .do platform:

mdxdb pull

Pull specific type:

mdxdb pull --type BlogPost

Pull changes since date:

mdxdb pull --since 2024-01-01

Push to Platform

Publish documents to .do platform:

mdxdb publish

Publish specific documents:

mdxdb publish --ids /blog/post-1,/blog/post-2

Publish as draft:

mdxdb publish --draft

Deployment Management

List Deployments

List all deployments:

mdxe deployments list

Check Status

Check deployment status:

mdxe status

View Logs

View deployment logs:

mdxe logs

Tail logs:

mdxe logs --follow

Rollback

Rollback to previous deployment:

mdxe rollback

Rollback to specific deployment:

mdxe rollback abc123

AI Management

Generate Content

Generate new content:

mdxai generate "Create a blog post about TypeScript"

Generate specific type:

mdxai generate "Create a blog post" --type BlogPost

Edit Content

Edit existing content:

mdxai edit blog-post.mdx "Make the tone more professional"

Preview changes as diff:

mdxai edit blog-post.mdx "Add examples" --diff

Enrich Content

Enrich with metadata:

mdxai enrich blog-post.mdx --add-metadata --add-seo

Enrich from remote datasources:

mdxai enrich blog-post.mdx --datasources https://api.do/wikipedia

Validation

Validate documents:

mdxld validate blog-post.mdx

Validate against schema:

mdxld validate blog-post.mdx --schema schema.json

Validate all documents:

mdxld validate --all

Configuration Management

View Configuration

mdxe config

Set Configuration

mdxe config set target cloudflare
mdxe config set domain example.com

Reset Configuration

mdxe config reset

Authentication

Login

Login via OAuth:

mdxe login

Logout

Logout:

mdxe logout

Check Auth Status

mdxe whoami

Batch Operations

Bulk Generate

Generate multiple documents:

mdxai generate --batch prompts.json

Bulk Edit

Edit multiple documents:

mdxai edit "**/*.mdx" --instruction "Fix grammar"

Bulk Enrich

Enrich multiple documents:

mdxai enrich "**/*.mdx" --add-metadata --add-seo

Bulk Publish

Publish multiple documents:

mdxdb publish --type BlogPost --modified-since 2024-01-01

Backup and Restore

Backup

Backup all documents:

mdxdb backup backup.tar.gz

Backup specific type:

mdxdb backup backup.tar.gz --type BlogPost

Restore

Restore from backup:

mdxdb restore backup.tar.gz

Restore specific documents:

mdxdb restore backup.tar.gz --ids /blog/post-1,/blog/post-2

Monitoring

Health Check

Check system health:

mdxe health

Version Info

Check version:

mdxe version

Usage Stats

View usage statistics:

mdxe stats

Programmatic Management

Manage via TypeScript API:

import { list, search, get, set, deleteDoc, pull, publish } from 'mdxdb'

// List documents
const posts = await list({ type: 'BlogPost' })

// Search
const results = await search('TypeScript')

// Get document
const doc = await get('/blog/my-post')

// Update document
await set('/blog/my-post', {
  ...doc,
  data: { ...doc.data, author: 'Jane Doe' }
})

// Sync
const pullResult = await pull({ type: 'BlogPost' })
const publishResult = await publish({ type: 'BlogPost' })