Skip to main content

Documentation Index

Fetch the complete documentation index at: https://langwatch.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

The LangWatch CLI ships as an npm package. Install it once and you get the unified langwatch binary that drives every part of the platform from your terminal, and the same tool your AI coding assistant uses to operate LangWatch on your behalf.

Prerequisites

You need Node.js 18+ and npm (or pnpm, yarn). If you already run any JavaScript or TypeScript locally, you have these. If not:
  • macOS: brew install node
  • Linux (Debian/Ubuntu): sudo apt-get install -y nodejs npm
  • Linux (RHEL/Fedora): sudo dnf install -y nodejs npm
  • Windows: download from nodejs.org or winget install OpenJS.NodeJS

Install

npm (canonical)

npm install -g langwatch
After install, verify:
langwatch --version

Run without installing (npx)

For one-off invocations or to try the CLI before installing:
npx langwatch --help
npx langwatch docs integration/python/guide

pnpm or yarn

If your team already uses these:
pnpm install -g langwatch
# or
yarn global add langwatch
The package is identical across all three package managers.

Self-hosted endpoint

If your organization runs a self-hosted LangWatch deployment (instead of the public app.langwatch.ai), point the CLI at it via the LANGWATCH_ENDPOINT environment variable:
LANGWATCH_ENDPOINT=https://langwatch.your-company.com npm install -g langwatch
LANGWATCH_ENDPOINT=https://langwatch.your-company.com langwatch login
The CLI persists this endpoint after the first langwatch login so later commands don’t need the prefix. To make the env var sticky, add it to your shell profile:
echo 'export LANGWATCH_ENDPOINT=https://langwatch.your-company.com' >> ~/.zshrc
For convenience, your dashboard’s “Install CLI” empty-state card on /me, /me/sessions, and the governance setup checklist already renders the right prefilled commands for your deployment, copy-paste straight from there.

Authenticate

Once installed, sign in:
langwatch login
See the full CLI reference for authentication modes (interactive, --api-key for CI, --device for AI-tool sessions, --endpoint for self-hosted).

Enterprise networks

Most enterprise networks proxy public npm through an internal mirror (Artifactory, Nexus, GitHub npm Enterprise). npm install -g langwatch fetches transparently through the mirror, no special configuration needed. If your environment is fully air-gapped, your IT team’s package-mirror process is the canonical path; ask them to mirror npmjs.com/package/langwatch.

Uninstall

npm uninstall -g langwatch
This removes the CLI binary. Personal device sessions persist in ~/.langwatch/config.json until you also delete that file.

Next steps