emdash-cli
यह क्या करती है
यह स्किल EmDash कमांड-लाइन टूल से EmDash वेबसाइट देखती और संभालती है, कंटेंट और मीडिया से लेकर schema और बैकअप तक। यह उन साइट मालिकों और डेवलपर्स के लिए है जो टर्मिनल से काम करना पसंद करते हैं।
कब इस्तेमाल करें
- ✓जब आप टर्मिनल से EmDash साइट का कंटेंट देखना, जोड़ना या बदलना चाहते हैं।
- ✓जब आपको साइट एक्सपोर्ट करनी है या किसी नई जगह पर इम्पोर्ट करनी है।
- ✓जब आप डेटाबेस migration तैयार कर रहे हैं या प्रोजेक्ट के लिए types बना रहे हैं।
Skill का लिंक
https://github.com/emdash-cms/emdash/blob/main/skills/emdash-cli/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप कमांड लाइन से मेरी EmDash साइट की नवीनतम ब्लॉग पोस्ट की सूची दिखा सकते हैं, और पूरी साइट बैकअप के रूप में एक्सपोर्ट कर सकते हैं?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट आपके अनुरोध के लिए मेल खाती कमांड चलाता है, जैसे कंटेंट की सूची या साइट एक्सपोर्ट। वह पहले मौजूदा साइट पढ़कर लक्ष्य की पुष्टि करता है, फिर केवल आपके तय दायरे में बदलाव करता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
EmDash CLI
The EmDash CLI (emdash, with the short alias em) manages EmDash CMS instances. Commands fall into two categories:
- Local commands work with project files or a configured database:
init,doctor,seed,migrate,export-seed, andsecrets. - Remote commands talk to a running EmDash instance:
types,login,logout,whoami,content,schema,media,search,taxonomy,menu, andsite.
Run npx emdash --help and npx emdash <command> --help for the installed version's exact commands and flags. Resolve the current target with a read command before a destructive or bulk mutation; examples in this skill do not authorize changing an instance the user did not place in scope.
Authentication
Remote commands resolve auth automatically:
--tokenflagEMDASH_TOKENenv var- Stored credentials from
emdash login - Dev bypass (localhost only — no token needed)
For a localhost development server with the development bypass enabled, the client can authenticate automatically. For a remote instance, run emdash login --url https://example.com or provide a scoped token.
Custom Headers & Reverse Proxies
Sites behind Cloudflare Access or other reverse proxies need auth headers on every request. The CLI supports this via --header flags and environment variables.
Service tokens for automation
# Provide sensitive headers through the environment in CI.
export EMDASH_HEADERS="CF-Access-Client-Id: xxx
CF-Access-Client-Secret: yyy"
npx emdash whoami --url https://example.com
emdash login --header persists custom headers to ~/.config/emdash/auth.json for later commands. Prefer environment-provided headers in CI so a service secret is not written to the credential file or shell history.
Cloudflare Access Browser Flow
If you don't have service tokens and cloudflared is installed, the CLI will automatically:
- Detect when Access blocks the request
- Try to get a cached JWT via
cloudflared access token - Fall back to
cloudflared access loginfor browser-based auth
This works for interactive use but isn't suitable for CI. Use service tokens for automation.
Generic Reverse Proxy Auth
The --header flag works with any auth scheme:
# Basic auth
npx emdash login --url https://example.com -H "Authorization: Basic dXNlcjpwYXNz"
# Custom auth header
npx emdash login --url https://example.com -H "X-API-Key: secret123"
Quick Reference
Database Setup
For normal site startup, use the project's package script. The first request runs pending migrations and, before setup is completed, applies the bundled seed's schema and structure once; sample content comes from the setup wizard, /_emdash/api/setup/dev-bypass, or emdash seed. The Astro integration generates emdash-env.d.ts when the server starts.
# Start the site with its package script
pnpm dev
# Export an existing database as a seed file
# (the runtime auto-discovers .emdash/seed.json on first boot;
# `mkdir -p` because the directory may not exist yet)
mkdir -p .emdash
npx emdash export-seed > .emdash/seed.json
npx emdash export-seed --with-content=all > .emdash/seed.json
Type Generation
# Generate types from local dev server
npx emdash types
# Generate from remote
npx emdash types --url https://example.com
# Custom output path
npx emdash types --output src/types/cms.ts
Writes .emdash/types.ts (TypeScript interfaces) and .emdash/schema.json.
Authentication
# Login (OAuth Device Flow)
npx emdash login --url https://example.com
# Check current user
npx emdash whoami
# Logout
npx emdash logout
# Generate an encryption key for deployment
npx emdash secrets generate
Content CRUD
The CLI is designed for agents. Create and update auto-publish by default so agents get read-after-write consistency without managing drafts.
# List content
npx emdash content list posts
npx emdash content list posts --status published --limit 10
# Get a single item (Portable Text fields converted to markdown)
# Returns draft data if a pending draft exists
npx emdash content get posts 01ABC123
npx emdash content get posts 01ABC123 --raw # skip PT->markdown conversion
npx emdash content get posts 01ABC123 --published # ignore pending drafts
# Create content (auto-publishes by default)
npx emdash content create posts --data '{"title": "Hello", "body": "# World"}'
npx emdash content create posts --file po
अक्सर पूछे जाने वाले सवाल
यह लॉगिन कैसे करती है?
यह सहेजे गए लॉगिन, आपके दिए token, या localhost पर डेवलपमेंट बायपास का इस्तेमाल करती है।
क्या यह proxy के पीछे की साइटों पर काम करती है?
हाँ। Cloudflare Access जैसी सेवाओं के पीछे की साइटों के लिए यह कस्टम headers सपोर्ट करती है।
क्या यह कोई ऐसी साइट बदलेगी जिसका नाम मैंने नहीं लिया?
नहीं। स्किल पहले लक्ष्य की पुष्टि करती है, और बदलाव आपके तय दायरे में रहते हैं।
जानकारी
लेखक का मूल विवरण
Use the EmDash CLI to inspect and manage an EmDash instance from the command line, including content, schema, media, taxonomies, menus, search, authentication, seeds, migrations, generated types, and whole-site export and import.
repo: emdash-cms/emdash
लोकप्रियता
- GitHub स्टार
- 14k
- रैंकिंग में स्थान
- #11248
- लाइसेंस
- MIT
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
adversarial-reviewer
14kयह आपके एजेंट को कोड बदलाव में छिपे बग और असुरक्षित मान्यताएँ खोजने में मदद करती है, जब आप इसे माँगें तो सामान्य समीक्षा से आगे जाकर।
agent-browser
14kयह आपके एजेंट को असली ब्राउज़र में वेब पेज परखने, उपयोगकर्ता को क्या दिखता है जाँचने, क्रियाएँ सत्यापित करने और सबूत के लिए स्क्रीनशॉट लेने देती है।
building-emdash-site
14kयह आपके एजेंट को Astro पर EmDash CMS प्रोजेक्ट का साइट वाला हिस्सा बनाने में मदद करती है, जिसमें कंटेंट, schema, मेन्यू, taxonomies और डिप्लॉयमेंट शामिल हैं।
creating-plugins
14kयह आपके एजेंट को EmDash CMS के लिए प्लगइन बनाने में मदद करती है, जिसमें सुरक्षित hooks, routes, स्टोरेज और एडमिन इंटरफ़ेस हों।
मिलती-जुलती skills
openclaw-update
394kयह आपके एजेंट को चल रहे OpenClaw Gateway को अपडेट करने में मदद करती है, इंस्टॉल के तरीके के अनुसार सही विधि चुनकर और सेशन बनाए रखकर।
diagnose-gateway
394kयह आपके एजेंट को सेटिंग्स, चैनल और पोर्ट जांचकर पता लगाने देती है कि OpenClaw Gateway क्यों फ़ेल हो रहा है, बिना कुछ बदले।
crabbox-apps
394kयह आपके एजेंट को किसी अस्थायी क्लाउड मशीन पर ऐप खोलने और चलाने देती है, फिर उसका व्यू आपके चैट के साइड पैनल में दिखाती है।