CLI
Use Well from your shell with the well CLI
The Well CLI (well) connects your shell to Well over MCP. well login runs a
browser OAuth flow and connects as Well CLI — no API key, nothing to paste. The
onboarding chat picks the connection up automatically.
Install
brew install wellapp-ai/tap/wellA second channel, well-staging, targets the test API by default and can be
installed alongside the production binary:
brew install wellapp-ai/tap/well-staging.
Log in
well loginThis opens your browser to authorize Well CLI against your Well account. Pick the
workspaces to grant on the consent screen, then return to your terminal — the session
is stored in ~/.well/config.json (readable only by you).
well status # show the current login and authorized workspaces
well logout # clear the local sessionCommands
| Command | Description |
|---|---|
well login | Authorize in the browser and connect to the MCP server. |
well status | Show the current login and authorized workspaces. Refreshes the token if it has expired. |
well logout | Clear the local session. |
Targeting another environment
By default well talks to production (https://api.wellapp.ai). Point it elsewhere
with a flag or an environment variable:
well login --server https://api.test.wellapp.ai
# or
WELL_API_URL=https://api.test.wellapp.ai well statusThe well-staging binary ships with the test API as its default, so it needs no flag.
How it works
well login is a standard OAuth 2.0 authorization-code flow with PKCE:
- Discovery — reads the server's OAuth metadata (
/.well-known/oauth-authorization-server). - Registration — registers as a public client (Dynamic Client Registration) with a loopback redirect.
- Authorization — opens the consent screen with a PKCE
S256challenge; a local listener captures the result. - Token — exchanges the authorization code (plus the PKCE verifier) for access and refresh tokens.
- Connect — performs the MCP
initializehandshake as Well CLI, which registers the connection with Well.
See Authentication for the OAuth and API-key details shared by all MCP clients.