Skip to main content

@wellpipe/cli

The CLI package provides a self-hosted way to run Wellpipe locally. It handles OAuth authentication, token storage, and runs an MCP server for AI assistant integration.

Installation

npm install -g @wellpipe/cli

Or run directly with npx:

npx @wellpipe/cli

Use Cases

The CLI is designed for:

  • Privacy-focused users who want local token storage
  • Developers testing provider integrations
  • Self-hosting without the cloud service

For most users, the cloud service is recommended for easier setup.

Commands

wellpipe auth whoop

Authenticate with WHOOP using OAuth.

wellpipe auth whoop

This command:

  1. Opens your browser to WHOOP's authorization page
  2. Starts a local callback server
  3. Exchanges the authorization code for tokens
  4. Stores tokens in a local .env file

wellpipe serve

Start the MCP server.

wellpipe serve

Options:

OptionDefaultDescription
--port3000Server port
--transportstdioTransport type (stdio, http)

wellpipe status

Check authentication status.

wellpipe status

Shows:

  • Whether tokens are configured
  • Token expiration time
  • API connectivity

Package Structure

@wellpipe/cli/
├── src/
│ ├── index.ts # CLI entry point
│ ├── commands/
│ │ ├── auth.ts # OAuth commands
│ │ ├── serve.ts # MCP server
│ │ └── status.ts # Status check
│ ├── oauth/
│ │ ├── whoop.ts # WHOOP OAuth flow
│ │ └── callback.ts # Callback server
│ ├── storage/
│ │ └── env-file.ts # .env file storage
│ └── server/
│ └── mcp.ts # MCP server setup
├── bin/
│ └── wellpipe # CLI binary
└── package.json

Dependencies

PackagePurpose
@wellpipe/coreShared interfaces
@wellpipe/whoopWHOOP provider
commanderCLI framework
openBrowser opening
dotenvEnvironment file

Configuration

The CLI stores configuration in a .env file in the current directory:

# .env
WHOOP_ACCESS_TOKEN=xxxxx
WHOOP_REFRESH_TOKEN=xxxxx
WHOOP_TOKEN_EXPIRES_AT=2024-01-15T12:00:00.000Z

Custom Config Location

WELLPIPE_CONFIG=/path/to/.env wellpipe serve