
Emdash CLI
Use the EmDash CLI to inspect and manage an EmDash instance from the command line...
Install
npx skills add emdash-cms/emdash --skill emdash-cli -g -a claude-code -y- Repository
- emdash-cms/emdash14.1k
- Category
- Engineering
- Updated
- 3d ago
- License
- MIT
- Context cost
- Mediumabout 2,640 tokens
- Runs scripts
- No, instructions only
What it does
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.
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:
