CLI
featurely-cli — set up all Featurely SDKs in any project with a single command.
featurely-cli
The Featurely CLI automates SDK installation, API key creation, code injection, and optional Vercel and MCP configuration.
Run without installing:
npx featurely-cli@latest initOr install globally:
npm install -g featurely-cli
pnpm add -g featurely-cli
yarn global add featurely-cli
bun add -g featurely-cliNode.js requirement: Node.js 18 or later.
Commands
| Command | Auth | Description |
|---|---|---|
init | Session | Full guided setup: auth, packages, API key, code injection, optional Vercel + MCP config |
login | — | Open browser sign-in and store a session token locally. Use --force to re-authenticate |
logout | — | Remove the locally stored session token |
whoami | Session | Print the signed-in account, user ID, and token expiry |
status | — | Check your Featurely setup: auth state, .env.local config, installed packages, and CLI version |
scan | API key | Upload the project's full dependency list to your Featurely dashboard. Reads NEXT_PUBLIC_FEATURELY_API_KEY from .env.local or pass --api-key |
mcp / mcp setup | — | Register the docs MCP server as featurely-docs (npx -y featurely-mcp@latest) without running init |
mcp setup registers the docs server as featurely-docs (a legacy featurely entry whose command runs featurely-mcp is removed and replaced by that featurely-docs entry). An existing featurely entry for https://www.featurely.no/api/mcp (the hosted MCP) is left unchanged, as are other servers. Running the command again updates featurely-docs in place and does not create a duplicate.
What init does — step by step
- Opens a browser to sign in with your Featurely account
- Lets you pick which packages to set up —
featurely-mcpis registered as thefeaturely-docsMCP server, not installed as a local dependency - Creates an API key with the correct permissions for your chosen packages
- Detects your framework and generates a
featurely-providers.tsxinitializer file —featurely-loggerrequires manual setup - Writes
NEXT_PUBLIC_FEATURELY_API_KEYandNEXT_PUBLIC_FEATURELY_PROJECT_IDto.env.local - Optionally syncs those env vars to Vercel when a
.vercel/folder is detected - If
featurely-mcpwas selected: configures thefeaturely-docsMCP server for Claude Desktop, Cursor, VS Code, or Windsurf
Available packages
| Package | Auto init | Notes |
|---|---|---|
featurely-error-tracker | Yes | Generates useEffect initializer |
featurely-feature-reporter | Yes | Generates useEffect initializer |
featurely-site-manager | Yes | Generates useEffect initializer |
featurely-i18n | Yes | Generates useEffect initializer |
featurely-logger | No | Installed but requires manual setup |
featurely-mcp | Yes | Configured as the featurely-docs MCP server via npx -y featurely-mcp@latest, not installed as a local dep |
Framework detection
The CLI detects your framework automatically:
| Framework | Detection |
|---|---|
| Next.js App Router | next dependency + app/ directory |
| Next.js Pages Router | next dependency + pages/ directory |
| React | react dependency (no next) |
| Vue | vue dependency |
| Nuxt | nuxt dependency |
| Node.js | Fallback |
Package managers detected by lockfile: npm, yarn, pnpm, bun.