featurely-cli
v1.0.5
Published
Official CLI for setting up and managing Featurely integrations
Downloads
734
Maintainers
Readme
featurely-cli
Official CLI for setting up and managing Featurely integrations.
Quick start
npx featurely-cli@latest initinit is a guided, interactive setup that handles everything in one run:
- Opens a browser to authenticate with your Featurely account
- Asks which packages to set up (
featurely-mcpis configured as an MCP server, not installed as a dependency) - Creates an API key with the right permissions for your chosen packages
- Detects your framework and injects initialization code
- Writes
NEXT_PUBLIC_FEATURELY_API_KEYandNEXT_PUBLIC_FEATURELY_PROJECT_IDto.env.local - Optionally syncs env vars to Vercel if a
.vercel/folder is detected - If
featurely-mcpwas selected: configures the MCP server for Claude Desktop, Cursor, VS Code, or Windsurf
Requirements
- Node.js ≥ 18
- A Featurely account (sign up free)
Commands
init
npx featurely-cli@latest initFull guided setup. Run this once per project.
login
npx featurely-cli@latest login [--force]Authenticate your machine via browser. If already signed in, use --force to re-authenticate.
logout
npx featurely-cli@latest logoutRemove the locally stored session token.
whoami
npx featurely-cli@latest whoamiPrint the currently signed-in account, user ID, and session token expiry.
scan
npx featurely-cli@latest scan [--project-id <id>] [--api-key <key>]Upload the current project's full dependency list to your Featurely dashboard for tracking.
Requires a project API key. By default reads NEXT_PUBLIC_FEATURELY_PROJECT_ID and NEXT_PUBLIC_FEATURELY_API_KEY from .env.local. Override with flags.
Note:
scanuses your project API key directly — it does not use the session token fromlogin.
mcp setup
npx featurely-cli@latest mcp setupConfigure the featurely-mcp server for your AI editor without running the full init flow. Supports Claude Desktop, Cursor, VS Code Copilot, and Windsurf.
Available packages
| Package | Description | Auto-init |
| ---------------------------- | ------------------------------------------ | ------------------------------------------------------------------- |
| featurely-error-tracker | Automatic JS error reporting | Yes |
| featurely-feature-reporter | Feedback widget & bug reports | Yes |
| featurely-site-manager | Feature flags, maintenance mode, analytics | Yes |
| featurely-i18n | Translation management | Yes |
| featurely-logger | Structured event logging | Manual — see docs |
| featurely-mcp | AI assistant integration (MCP server) | Configured via mcp setup, not installed as a dep |
Framework support
The CLI detects your framework from package.json and directory structure:
| Framework | Detection |
| -------------------- | ----------------------------------- |
| Next.js App Router | next in deps + app/ directory |
| Next.js Pages Router | next in deps + pages/ directory |
| React | react in deps (no next) |
| Vue | vue in deps |
| Nuxt | nuxt in deps |
| Node.js | fallback |
Package managers detected by lockfile: npm, yarn, pnpm, bun.
Global install
# npm
npm install -g featurely-cli
# pnpm
pnpm add -g featurely-cli
# yarn
yarn global add featurely-cli
# bun
bun add -g featurely-cliLocal testing (without installing globally)
# Build and run directly
npm run build
node dist/index.js initLicense
MIT
