@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:
- Opens your browser to WHOOP's authorization page
- Starts a local callback server
- Exchanges the authorization code for tokens
- Stores tokens in a local
.envfile
wellpipe serve
Start the MCP server.
wellpipe serve
Options:
| Option | Default | Description |
|---|---|---|
--port | 3000 | Server port |
--transport | stdio | Transport 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
| Package | Purpose |
|---|---|
@wellpipe/core | Shared interfaces |
@wellpipe/whoop | WHOOP provider |
commander | CLI framework |
open | Browser opening |
dotenv | Environment 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