Skip to main content

CLI Setup

Step-by-step guide to self-hosting Wellpipe with the CLI.

Prerequisites

Quick Setup

The fastest way to get started:

npx @wellpipe/cli init

This interactive wizard will:

  1. Create a .env file with your configuration
  2. Guide you through connecting your WHOOP account
  3. Configure Claude Desktop automatically

Manual Setup

If you prefer step-by-step:

1. Install the CLI

Option A: Run with npx (no install)

npx @wellpipe/cli

Option B: Install globally

npm install -g @wellpipe/cli

2. Create Configuration

Create a .env file in your project directory:

WHOOP_CLIENT_ID=your_client_id
WHOOP_CLIENT_SECRET=your_client_secret

Get these from your WHOOP Developer account.

3. Authenticate with WHOOP

wellpipe auth whoop
# or
npx @wellpipe/cli auth whoop

This will:

  1. Open your browser to WHOOP's authorization page
  2. Wait for you to authorize
  3. Save tokens to your .env file

4. Configure Claude Desktop

Add Wellpipe to your Claude Desktop config:

Mac: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
"mcpServers": {
"wellpipe": {
"command": "npx",
"args": ["@wellpipe/cli"]
}
}
}

5. Restart Claude Desktop

Completely quit (Cmd+Q on Mac) and reopen Claude Desktop.

Look for the tools icon to verify connection.

CLI Commands

CommandDescription
wellpipe initInteractive setup wizard
wellpipe auth whoopAuthenticate with WHOOP
wellpipe statusShow connection status
wellpipeStart MCP server

Checking Status

Verify your setup:

wellpipe status

Output should show:

  • WHOOP: Connected
  • Token expiry date
  • Available commands

File Structure

After setup, you'll have:

your-directory/
├── .env # Credentials and tokens
└── node_modules/ # (if installed locally)

Important: Add .env to your .gitignore to avoid committing secrets.

Updating

Update to the latest version:

npm update -g @wellpipe/cli
# or with npx, just run it again
npx @wellpipe/cli@latest

Troubleshooting

"Command not found"

If wellpipe isn't recognized:

  • Use npx @wellpipe/cli instead
  • Or ensure npm global bin is in your PATH

"Cannot find .env"

The CLI looks for .env in the current directory:

  • cd to your project directory
  • Or run wellpipe init to create it

"Port already in use"

OAuth callback uses port 3000 by default:

wellpipe auth whoop --port 3001

"Invalid client ID"

Check your WHOOP developer app settings:

  • Client ID matches .env
  • Redirect URI is exactly http://localhost:3000/api/callback/whoop

Token Expired

Re-authenticate when tokens expire:

wellpipe auth whoop

Using with Claude Desktop

Once configured, Claude Desktop will automatically use your local MCP server.

Verify Connection

  1. Open Claude Desktop
  2. Look for tools icon (hammer/wrench)
  3. Click it to see Wellpipe tools

Test It

Ask Claude:

"How did I sleep last night?"

It should use your local Wellpipe installation to fetch data.

Next Steps