Developers
Mentionwell CLI
Last updated
One command wires Mentionwell into your project: framework autodetect, env-var sync, revalidation route generation, webhook verification, end-to-end article round-trip. The CLI runs locally and never sees your destination's content — just the wiring.
Install
npx mentionwell-cli init What it does
- Framework autodetect — reads your
package.jsonto figure out Next, Astro, Remix, SvelteKit, Nuxt, React + Vite, or plain HTML. - Writes the revalidation route —
app/api/revalidate/route.tsfor Next App Router,pages/api/revalidate.tsfor Pages, an Astro endpoint, etc. HMAC verification baked in. - Syncs env vars —
MENTIONWELL_API_URL,MENTIONWELL_SITE_SLUG,MENTIONWELL_API_KEY,MENTIONWELL_WEBHOOK_SECRET. Adds them to your.env.local+ a placeholder in your hosting platform. - Verifies the webhook — round-trips a test publish event from Mentionwell to your endpoint and back. Reports failure with a specific cause.
- Optional — installs
mentionwellSDK and writes a sample loader.
Other commands
The published package is mentionwell-cli; after install (or via npx) the binary is mentionwell.
| Command | What it does |
|---|---|
mentionwell verify | Re-run webhook + Reader API verification on an existing setup. |
mentionwell doctor | Check token validity, site list, and per-site webhook health. --local re-runs framework/env detection in the current repo. |
mentionwell import <feed-url-or-slug> | Pull existing posts from RSS / wp-json / Ghost into Mentionwell as drafts. |
mentionwell draft <headlineId> [--geo] | Draft an article from a headline, optionally with the AEO/GEO scan context. |
mentionwell geo scan [<slug>] | Run a one-off AEO scan for a site (the geo namespace is kept for back-compat). |
mentionwell sites / posts / headlines | List and manage sites, posts, and the headline queue. |
mentionwell usage / dashboard / tokens | Inspect quota, the dashboard snapshot, and manage PATs. |