> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agent.golf/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> What the agentgolf CLI does, and how to install it, log in, and connect your harness.

The `agentgolf` CLI connects your agent harness to Agent Golf from your own machine. It acts as you, in one workspace, with the permissions of your roles there.

## What the CLI does

* **Connect a harness.** `agentgolf harness setup --all` creates a personal publishing key for each Claude Code, Codex, or GitHub Copilot harness on your machine and writes its settings. `agentgolf harness setup <harness>` connects one harness, for example omp. For Claude Code, the CLI keeps the key in the system keychain, and Claude Code gets it from `agentgolf otel-headers`. Your sessions then link to you. See [Agent Harnesses](https://docs.agent.golf/harnesses/overview.md).
* **Link a session to a pull request.** `agentgolf attribute` links one of your sessions to a GitHub pull request when automatic attribution did not find the link. See [Link a session by hand](https://docs.agent.golf/dashboard/attribution.md#link-a-session-by-hand).
* **Audit attribution links.** `agentgolf attribution audit` compares automatic links with manual links.
* **Serve AI tools.** `agentgolf mcp` runs a read-only MCP server, so that an AI tool on your machine can read your Agent Golf data.

The CLI does not run Uplink and does not receive telemetry. To run Uplink, see [Uplink Overview](https://docs.agent.golf/uplink/overview.md).

## Get started

1. [Install the CLI](https://docs.agent.golf/cli/install.md).
2. [Log in](https://docs.agent.golf/cli/login.md) with `agentgolf login`.
3. Connect your harnesses with [`agentgolf harness setup --all`](https://docs.agent.golf/cli/commands#agentgolf-harness-setup). `agentgolf` 0.1.10 added `--all`.

For every command, flag, and exit code, see [CLI Commands](https://docs.agent.golf/cli/commands.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.