Pullwish Docs

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 init

Or install globally:

npm install -g @pullwish/cli
pnpm add -g @pullwish/cli
yarn global add @pullwish/cli
bun add -g @pullwish/cli

Node.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

CommandAuthDescription
initSessionFull 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
whoamiSessionPrint the signed-in account, user ID, and token expiry
status—Check your Pullwish setup: auth state, .env.local config, installed packages, and CLI version
scanAPI keyUpload 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-mapsAPI 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

  1. Opens a browser to sign in with your Pullwish account
  2. Lets you pick which packages to set up — @pullwish/mcp is registered as the pullwish-docs MCP server, not installed as a local dependency
  3. Creates an API key with the correct permissions for your chosen packages
  4. Detects your framework and generates a pullwish-providers.tsx initializer file — @pullwish/logger requires manual setup
  5. Writes NEXT_PUBLIC_PULLWISH_API_KEY and NEXT_PUBLIC_PULLWISH_PROJECT_ID to .env.local
  6. Optionally syncs those env vars to Vercel when a .vercel/ folder is detected
  7. If @pullwish/mcp was selected: configures the pullwish-docs MCP 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

PackageAuto initNotes
@pullwish/error-trackerYesGenerates useEffect initializer
@pullwish/feature-reporterYesGenerates useEffect initializer
@pullwish/site-managerYesGenerates useEffect initializer
@pullwish/i18nYesGenerates useEffect initializer
@pullwish/loggerNoInstalled but requires manual setup
@pullwish/mcpYesConfigured 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:

FrameworkDetection
Next.js App Routernext dependency + app/ directory
Next.js Pages Routernext dependency + pages/ directory
Reactreact dependency (no next)
Vuevue dependency
Nuxtnuxt dependency
Node.jsFallback

Package managers detected by lockfile: npm, yarn, pnpm, bun.