emdash-cli

Manages EmDash CMS content, schema, media, and taxonomies via command-line operations.

1|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/rczamor/rz-emdash --skill emdash-cli-rczamor
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: emdash-cli
Source: https://github.com/rczamor/rz-emdash/tree/main/templates/marketing-cloudflare/.agents/skills/emdash-cli
Command: npx skills add https://github.com/rczamor/rz-emdash --skill emdash-cli-rczamor

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing an EmDash CMS instance from the command line requires handling authentication, draft/publish lifecycles, Portable Text conversion, and optimistic concurrency tokens manually. This Skill provides the operational knowledge to script content CRUD, schema changes, media uploads, and type generation against local or remote EmDash instances without touching the admin UI. ## Core Features & Use Cases - Content CRUD with Auto-Publish: Create, read, update, and delete content with automatic markdown-to-Portable Text conversion and read-after-write consistency via _rev tokens. - Schema and Type Management: Create collections, add or remove fields, and generate TypeScript interfaces from a running instance. - Media, Search, Taxonomies, and Menus: Upload media with alt text, run full-text search, manage taxonomy terms, and inspect menus. - Use Case: An agent needs to publish a new blog post to a deployed EmDash site. It logs in with a service token, creates the post with markdown body content (auto-converted to Portable Text and auto-published), then verifies the result with a JSON-piped query. ## Quick Start Use the emdash-cli skill to log in to my EmDash site and create a new published post in the posts collection with a markdown body.

Frequently Asked Questions about emdash-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create and publish content with the EmDash CLI?▼

Run npx emdash content create with a collection name and a --data JSON payload. The CLI auto-publishes on create by default, so the returned item is already in published status. Use --draft to skip auto-publishing.

How do I update EmDash content without version conflicts?▼

First run content get to retrieve the item's _rev token, then pass it to content update via --rev. If the item changed since your read, the server returns a 409 Conflict and you must re-read and retry with the fresh token.

Does the EmDash CLI work behind Cloudflare Access?▼

Yes, pass service token headers with --header flags during login, or set the EMDASH_HEADERS environment variable. If cloudflared is installed, the CLI can also obtain a JWT via the browser-based Access login flow.

How does the EmDash CLI convert markdown to Portable Text?▼

On write, markdown strings in portableText fields are converted to Portable Text arrays based on the collection's field schema. On read, PT arrays convert back to markdown. Use --raw to skip conversion and work with raw PT JSON.

Can I generate TypeScript types from a remote EmDash instance?▼

Yes, run npx emdash types --url with your site URL to generate .emdash/types.ts and .emdash/schema.json from the remote schema. You can also set a custom output path with --output.

Why does my EmDash content update return a 409 error?▼

A 409 CONFLICT means the item was modified after your last read, so your _rev token is stale. Re-run content get to fetch the current state and new _rev, then retry the update with the fresh token.