Skip to content

Local setup

The avant CLI signs you in, fetches your workspace credentials and writes the config for your harness. Supported harnesses are Claude Code, Codex, OpenCode, Pi and Oh My Pi.

macOS and Linux:

Terminal window
curl -fsSL https://avant.codes/install.sh | sh

Windows PowerShell:

Terminal window
irm https://avant.codes/install.ps1 | iex

Update later with avant update.

Terminal window
avant login

This opens the dashboard in your browser. Credentials are stored in ~/.avant/credentials.json. If your email isn’t allowed yet, login fails with not_allowed. Ask an organization admin to invite you.

Pick the organization to work in:

Terminal window
avant org list
avant org use <org-name-or-id>
Terminal window
avant workspace list
avant workspace use <workspace-name-or-id>

use gets you a credential for the workspace and configures the harnesses you choose. To skip the prompt, pass them:

Terminal window
avant workspace use my-team --harness claude-code,codex

You’re only offered harnesses that work with the workspace’s models:

Harness Needs Works with
Claude Code The Messages API (Claude models) Anthropic, Google Vertex AI, AWS Bedrock, Azure AI Foundry
Codex The Responses API OpenAI, and AWS Bedrock or Azure models that list Responses
OpenCode, Pi, Oh My Pi Messages or Chat Completions Every provider except TypeSafe

Each provider page has a table of models and the harnesses that can use them.

use also installs the workspace’s skills and connectors and writes its tool, command and path denies into the harness. See Policy.

Restart the harness afterwards.

What use sets up depends on the workspace’s auth mode:

  • Workspace keys. The CLI generates your personal key and writes it into the harness config. avant workspace generate-key <workspace> rotates it. The old key stops working right away.

  • Short-lived tokens. No key is stored. Claude Code runs avant token itself to get a fresh token:

    { "apiKeyHelper": "avant token -w <workspace-id>" }

    Codex, OpenCode, Pi and Oh My Pi only read a fixed key, so they talk to a local relay on 127.0.0.1:4141 that adds a fresh token to each request. Start it once and it runs at every login:

    Terminal window
    avant sync start

    avant sync also checks every 5 minutes for workspace changes, such as allowed models or permissions, and re-applies them to the harnesses the workspace is active for. Pass --no-config to run only the relay. avant sync status shows whether it runs and when each workspace last synced. avant sync stop stops it.

If an admin gave you a key, or you generated one on the workspace’s Connect page:

Terminal window
avant workspace connect ws_<workspaceId>_<secret>

Point any Anthropic or OpenAI SDK at the proxy and use your key or token as the API key:

Terminal window
export ANTHROPIC_BASE_URL=https://proxy.avant.codes
export ANTHROPIC_API_KEY=ws_...
export OPENAI_BASE_URL=https://proxy.avant.codes/v1
export OPENAI_API_KEY=ws_...

The proxy accepts the credential as Authorization: Bearer, x-api-key or X-Workspace-Token. Which APIs a workspace serves depends on its upstream, and the Connect page lists them.

Command Does
avant workspace use <other> Points your harnesses at another workspace.
avant workspace disconnect Removes Avant from your harness configs. The workspace stays cached.
avant logout Clears all local credentials and unwires every harness.