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
| Command | What it does |
|---|---|
mentionwell-cli verify | Re-run webhook + reader API verification on an existing setup. |
mentionwell-cli env | Print which env vars are required + which are detected. |
mentionwell-cli generate-route | Re-generate the revalidation route file. |
mentionwell-cli connect <domain> | Run the agentic Connect flow against a domain. |