Skip to content
AncherDocs
On this page

Installation

Install the Ancher CLI and authenticate, interactively or from CI.

Requires Node 24+.

bash
npm install -g @ancher-ai/cli
ancher login
ancher chat "what did I save about vector databases?"

The package is published as @ancher-ai/cli on npm, with a read-only source mirror at streamify-one/ancher-cli for reading and issue tracking.

Authentication

Two modes. The CLI uses the API key when ANCHER_API_TOKEN is set, and otherwise the OAuth2 session saved by ancher login.

Interactive

For a human at a terminal:

bash
ancher login    # Authorization Code + PKCE, in your browser
ancher whoami   # the authenticated user
ancher logout   # clear the saved session

The session is written to credentials.json under $ANCHER_CONFIG_DIR, falling back to $XDG_CONFIG_HOME/ancher and then ~/.config/ancher.

Non-interactive

For CI, scripts, and agents:

bash
export ANCHER_API_TOKEN=sk_your_key_here
ancher whoami

Mint a key from an already-authenticated session:

bash
ancher api-keys create "ci" --expires-in-days 90