CLI
@pullwish/cli — set up all Pullwish SDKs in any project with a single command.
@pullwish/cli
The Pullwish CLI automates SDK installation, API key creation, code injection, and optional Vercel and MCP configuration.
Run without installing:
npx @pullwish/cli@latest initOr install globally:
npm install -g @pullwish/cli
pnpm add -g @pullwish/cli
yarn global add @pullwish/cli
bun add -g @pullwish/cliNode.js requirement: Node.js 18 or later.
@pullwish/cli 1.0.8 adds a smoke test for --help and --version. Commands, flags, and dependencies are the same as 1.0.7.
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 Pullwish setup: auth state, .env.local config, installed packages, and CLI version |
scan | API key | Upload the project's full dependency list to your Pullwish dashboard. Reads NEXT_PUBLIC_PULLWISH_API_KEY (or PULLWISH_API_KEY) and NEXT_PUBLIC_PULLWISH_PROJECT_ID from .env.local, or pass --api-key and --project-id |
mcp / mcp setup | — | Register the docs MCP server as pullwish-docs (npx -y @pullwish/mcp@latest) without running init. VS Code (.vscode/mcp.json) lists servers under servers; the other editors use mcpServers. The CLI writes the right key for each editor |
upload-source-maps | API key (errors:write) | Upload .map files from a directory with POST /api/public/v1/source-maps. Flags: -d/--dir (required), -k/--api-key, -r/--release, --api-url |
mcp setup registers the docs server as pullwish-docs (an older featurely or featurely-docs entry that launched the docs server is removed and replaced by that pullwish-docs entry, which runs @pullwish/mcp). An existing pullwish entry for the hosted MCP (https://www.pullwish.com/api/mcp, canonical; https://featurely.no/api/mcp and https://www.featurely.no/api/mcp still work) is left unchanged, as are other servers. Running the command again updates pullwish-docs in place and does not create a duplicate. The canonical remote URL is https://www.pullwish.com/api/mcp.
What init does — step by step
- Opens a browser to sign in with your Pullwish account
- Lets you pick which packages to set up —
@pullwish/mcpis registered as thepullwish-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
pullwish-providers.tsxinitializer file —@pullwish/loggerrequires manual setup - Writes
NEXT_PUBLIC_PULLWISH_API_KEYandNEXT_PUBLIC_PULLWISH_PROJECT_IDto.env.local - Optionally syncs those env vars to Vercel when a
.vercel/folder is detected - If
@pullwish/mcpwas selected: configures thepullwish-docsMCP server for Claude Desktop, Cursor, VS Code, or Windsurf
The CLI stores credentials in ~/.config/pullwish/credentials.json (mode 0600). If that file is missing, it reads ~/.config/featurely/credentials.json. The old FEATURELY_* environment variable names still work as a fallback for the PULLWISH_* names. PULLWISH_API_URL (fallback FEATURELY_API_URL) points the CLI at another Pullwish origin instead of https://www.pullwish.com. The binary installed by npm install -g @pullwish/cli is called pullwish-cli.
Upload source maps
upload-source-maps scans a directory for .map files and posts each one to POST /api/public/v1/source-maps. The key needs errors:write. Pass the key with --api-key, PULLWISH_API_KEY, or NEXT_PUBLIC_PULLWISH_API_KEY in .env.local. FEATURELY_API_KEY still works as a fallback. The request uses the X-API-Key header.
npx @pullwish/cli upload-source-maps --dir ./dist --release "$(git rev-parse --short HEAD)"Available packages
| Package | Auto init | Notes |
|---|---|---|
@pullwish/error-tracker | Yes | Generates useEffect initializer |
@pullwish/feature-reporter | Yes | Generates useEffect initializer |
@pullwish/site-manager | Yes | Generates useEffect initializer |
@pullwish/i18n | Yes | Generates useEffect initializer |
@pullwish/logger | No | Installed but requires manual setup |
@pullwish/mcp | Yes | Configured as the pullwish-docs MCP server via npx -y @pullwish/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.