{"slug":"cli-launcher-reference","title":"CLI launcher reference","tags":["tailscale"],"agent_summary":"Last validated: Apr 9, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# CLI launcher reference\r\n\r\nLast validated: Apr 9, 2026\r\n\r\nAperture by Tailscaleis currently [in alpha](https://tailscale.com/docs/reference/tailscale-release-stages#alpha).\r\n\r\nThe Aperture launcher (`aperture-cli`) is a command-line interface (CLI) that configures and runs coding agents pre-connected to your [Aperture](https://tailscale.com/docs/aperture) proxy. It handles environment variables, configuration files, and provider type selection automatically, so you can start a coding session without editing configuration by hand.\r\n\r\nThis page is part of the [Aperture reference](https://tailscale.com/docs/aperture/reference) documentation.\r\n\r\n## [Prerequisites](https://tailscale.com/docs/aperture/cli-launcher\\#prerequisites)\r\n\r\nBefore you use the launcher, confirm you have the following:\r\n\r\n- A running Aperture proxy with at least one [configured provider](https://tailscale.com/docs/aperture/configuration).\r\n- Network access to the Aperture host URL (default: `http://ai`).\r\n- At least one [supported coding agent](https://tailscale.com/docs/aperture/cli-launcher#supported-agents) installed on your device. If you don't have one, the launcher provides install commands for each agent.\r\n- Go 1.26 or later installed on the device you plan to install the `aperture-cli` on.\r\n\r\n## [Install the launcher](https://tailscale.com/docs/aperture/cli-launcher\\#install-the-launcher)\r\n\r\nYou can install the Aperture launcher using `go install` or by building the launcher from the [Aperture repository on GitHub](https://github.com/tailscale/aperture-cli). These instructions cover using `go install`.\r\n\r\n1. Install the aperture-cli using `go install`:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\ngo install github.com/tailscale/aperture-cli/cmd/aperture@latest\r\n```\r\n\r\n2. Start the `aperture-cli` launcher:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\naperture\r\n```\r\n\r\n\r\n## [Connect to Aperture](https://tailscale.com/docs/aperture/cli-launcher\\#connect-to-aperture)\r\n\r\nThe launcher connects to your Aperture proxy on startup and verifies your provider configuration.\r\n\r\n1. Run the launcher:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\naperture\r\n```\r\n\r\n\r\n\r\nBy default, the launcher connects to `http://ai`. To use a different host, open the settings menu and add or select an endpoint under **Aperture Endpoints**. The launcher persists your endpoint selection in `settings.json`.\r\n\r\n2. Wait for the preflight check to complete.\r\n\r\nThe launcher queries the Aperture proxy for its list of configured providers and their API compatibility. If the host is unreachable, the launcher prompts you to enter a different URL.\r\n\r\n3. After a successful connection, the launcher displays the main menu with your available coding agents.\r\n\r\nThe launcher saves the connected host to your settings and uses it automatically on the next launch.\r\n\r\n\r\n### [Manage multiple endpoints](https://tailscale.com/docs/aperture/cli-launcher\\#manage-multiple-endpoints)\r\n\r\nYou can configure multiple Aperture proxy URLs and switch between them.\r\n\r\n1. From the main menu, press `s` to open settings.\r\n\r\n2. Select **Aperture Endpoints**.\r\n\r\n3. Add or remove endpoints. Select an endpoint to make it the active host. The launcher uses the active endpoint on startup.\r\n\r\n\r\nTo delete an endpoint, highlight it and press `d`.\r\n\r\n## [Launch a coding agent](https://tailscale.com/docs/aperture/cli-launcher\\#launch-a-coding-agent)\r\n\r\nAfter the launcher connects to Aperture, select a coding agent and provider type to start a coding session.\r\n\r\n### [Select an agent](https://tailscale.com/docs/aperture/cli-launcher\\#select-an-agent)\r\n\r\nThe main menu lists all coding agents that the launcher detected on your device. Agents without an installed binary do not appear.\r\n\r\n```markup\r\nConnected to http://ai (3 providers)\r\n\r\nWhich editor do you want to use?\r\n\r\n  [0] Last Used: Claude Code - Google Vertex\r\n  [1] Claude Code\r\n  [2] Gemini CLI\r\n  [3] OpenCode\r\n\r\n  [i] Install agents\r\n  [s] Settings\r\n  [q] Quit\r\n\r\nSelection (default: 0):\r\n```\r\n\r\nThe `[0] Last Used` shortcut launches the same agent and provider type combination from your previous session. Press `0` or `Enter` to relaunch it.\r\n\r\nIf an agent you expect is missing from the list, the launcher couldn't find its binary. Refer to the [troubleshooting section](https://tailscale.com/docs/aperture/cli-launcher#agent-binary-not-found) for resolution steps.\r\n\r\n### [Select a provider type](https://tailscale.com/docs/aperture/cli-launcher\\#select-a-provider-type)\r\n\r\nAfter selecting an agent, choose a provider type. The launcher displays only provider types that are compatible with your configured Aperture providers.\r\n\r\nFor example, if no provider in your Aperture configuration supports the Amazon Web Services (AWS) Bedrock API, the launcher hides the Bedrock option from the Claude Code provider type list.\r\n\r\n### [Automatic selection](https://tailscale.com/docs/aperture/cli-launcher\\#automatic-selection)\r\n\r\nIf only one valid agent and provider type combination exists after filtering, the launcher skips the menu and launches the agent immediately.\r\n\r\n### [What happens at launch](https://tailscale.com/docs/aperture/cli-launcher\\#what-happens-at-launch)\r\n\r\nWhen you select an agent and provider type, the launcher:\r\n\r\n1. Sets the environment variables the agent requires for the selected provider type. Some environment variable values include path suffixes (for example, `/v1` or `/bedrock`) appended to the Aperture host URL.\r\n2. Writes temporary configuration files if the agent requires them.\r\n3. Appends skip-permissions flags if you've enabled full-auto mode.\r\n4. Saves your selection as the last-used combination.\r\n5. Hands the full terminal to the coding agent.\r\n\r\nWhen the agent exits, the launcher cleans up temporary files, re-checks the Aperture connection, and returns to the main menu.\r\n\r\n## [Supported agents](https://tailscale.com/docs/aperture/cli-launcher\\#supported-agents)\r\n\r\nThe launcher supports four coding agents. Each agent declares which provider types it can use, and the launcher filters the list based on your Aperture configuration.\r\n\r\n### [Claude Code](https://tailscale.com/docs/aperture/cli-launcher\\#claude-code)\r\n\r\n[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is Anthropic's terminal coding agent for Claude models. For setup instructions, refer to [Use Claude Code with Aperture](https://tailscale.com/docs/aperture/how-to/use-claude-code).\r\n\r\n- **Binary**: `claude`\r\n- **Provider types**: Anthropic API, AWS Bedrock, Google Vertex\r\n- **Install**: `curl -fsSL https://claude.ai/install.sh | bash`\r\n- **Full-auto flag**: `--dangerously-skip-permissions`\r\n\r\nThe launcher sets the following environment variables based on the selected provider type:\r\n\r\n| Provider type | Environment variables |\r\n| --- | --- |\r\n| Anthropic API | `ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN` |\r\n| AWS Bedrock | `ANTHROPIC_BEDROCK_BASE_URL`, `CLAUDE_CODE_USE_BEDROCK`, `CLAUDE_CODE_SKIP_BEDROCK_AUTH` |\r\n| Google Vertex | `CLOUD_ML_REGION`, `CLAUDE_CODE_USE_VERTEX`, `CLAUDE_CODE_SKIP_VERTEX_AUTH`, `ANTHROPIC_VERTEX_PROJECT_ID`, `ANTHROPIC_VERTEX_BASE_URL` |\r\n\r\nWhen providers include model information, the launcher also sets model-tier variables (`ANTHROPIC_DEFAULT_OPUS_MODEL`, `ANTHROPIC_DEFAULT_SONNET_MODEL`, `ANTHROPIC_DEFAULT_HAIKU_MODEL`) based on available models.\r\n\r\n### [Gemini CLI](https://tailscale.com/docs/aperture/cli-launcher\\#gemini-cli)\r\n\r\n[Gemini CLI](https://geminicli.com/) is Google's terminal coding agent for Gemini models.\r\n\r\n- **Binary**: `gemini`\r\n- **Provider types**: Google Vertex, Gemini API\r\n- **Install**: `npm install -g @google/gemini-cli`\r\n- **Full-auto flag**: `--yolo`\r\n\r\nThe launcher sets the following environment variables based on the selected provider type:\r\n\r\n| Provider type | Environment variables |\r\n| --- | --- |\r\n| Google Vertex | `GOOGLE_VERTEX_BASE_URL`, `GOOGLE_API_KEY` |\r\n| Gemini API | `GEMINI_API_KEY`, `GEMINI_BASE_URL` |\r\n\r\nThe launcher also sets `GEMINI_CLI_HOME` to point to the launcher-managed configuration directory.\r\n\r\nThe launcher writes a persistent settings file at `<config-dir>/aperture/gemini-home/.gemini/settings.json` with the authentication type for the selected provider type. This file persists between sessions. Refer to [Persistent state](https://tailscale.com/docs/aperture/cli-launcher#persistent-state) for `<config-dir>` values by operating system.\r\n\r\n### [OpenCode](https://tailscale.com/docs/aperture/cli-launcher\\#opencode)\r\n\r\n[OpenCode](https://opencode.ai/) is a terminal coding agent that supports multiple AI providers. For setup instructions, refer to [Use OpenCode with Aperture](https://tailscale.com/docs/aperture/how-to/use-opencode).\r\n\r\n- **Binary**: `opencode`\r\n- **Provider types**: Anthropic API, AWS Bedrock, Google Vertex, OpenAI Compatible\r\n- **Install**: `curl -fsSL https://opencode.ai/install | bash`\r\n\r\nThe launcher sets the following environment variables for OpenCode:\r\n\r\n| Provider type | Environment variables |\r\n| --- | --- |\r\n| Anthropic API | `ANTHROPIC_BASE_URL`, `ANTHROPIC_AUTH_TOKEN` |\r\n| AWS Bedrock | `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION` |\r\n| Google Vertex | `GOOGLE_CLOUD_PROJECT`, `GOOGLE_CLOUD_LOCATION` |\r\n| OpenAI Compatible | `OPENAI_API_KEY`, `OPENAI_BASE_URL` |\r\n\r\nFor the Anthropic API provider type, the launcher sets `ANTHROPIC_BASE_URL` to the Aperture proxy's `/bedrock` path.\r\n\r\nThe launcher also sets `OPENCODE_CONFIG` to point to the launcher-managed configuration file.\r\n\r\nThe launcher writes a temporary configuration file at `~/.opencode/tmp_aperture_config.json` and deletes it when the agent exits.\r\n\r\n### [OpenAI Codex](https://tailscale.com/docs/aperture/cli-launcher\\#openai-codex)\r\n\r\n[OpenAI Codex](https://github.com/openai/codex) is OpenAI's terminal coding agent. For setup instructions, refer to [Use Codex with Aperture](https://tailscale.com/docs/aperture/how-to/use-codex).\r\n\r\n- **Binary**: `codex`\r\n- **Provider types**: OpenAI Compatible\r\n- **Install**: `npm install -g @openai/codex`\r\n- **Full-auto flag**: `--full-auto`\r\n\r\nThe launcher sets the following environment variables for Codex:\r\n\r\n| Provider type | Environment variables |\r\n| --- | --- |\r\n| OpenAI Compatible | `OPENAI_BASE_URL`, `OPENAI_API_KEY` |\r\n\r\nThe launcher also sets `CODEX_HOME` to point to the launcher-managed configuration directory.\r\n\r\nThe launcher writes a persistent auth file at `<config-dir>/aperture/codex-home/auth.json` to prevent Codex from prompting for interactive login on first run. Refer to [Persistent state](https://tailscale.com/docs/aperture/cli-launcher#persistent-state) for `<config-dir>` values by operating system.\r\n\r\n## [Configure settings](https://tailscale.com/docs/aperture/cli-launcher\\#configure-settings)\r\n\r\nPress `s` from the main menu to open the settings screen.\r\n\r\n### [Manage Aperture endpoints](https://tailscale.com/docs/aperture/cli-launcher\\#manage-aperture-endpoints)\r\n\r\nAdd and remove Aperture proxy URLs. The active endpoint is the host the launcher connects to on startup.\r\n\r\n1. Select **Aperture Endpoints** from the settings menu.\r\n2. To add a new endpoint, select the add option and enter the URL.\r\n3. To switch to a different endpoint, select it from the list.\r\n4. To delete an endpoint, highlight it and press `d` or `Delete`.\r\n\r\n### [Full-auto mode](https://tailscale.com/docs/aperture/cli-launcher\\#full-auto-mode)\r\n\r\nFull-auto mode (labeled **YOLO mode** in the settings menu) appends skip-permissions flags when launching agents. When enabled, agents run without asking for confirmation before executing commands or making changes.\r\n\r\nEach agent uses its own flag:\r\n\r\n| Agent | Flag |\r\n| --- | --- |\r\n| Claude Code | `--dangerously-skip-permissions` |\r\n| Gemini CLI | `--yolo` |\r\n| OpenAI Codex | `--full-auto` |\r\n\r\nTo toggle full-auto mode:\r\n\r\n1. Select **YOLO mode** from the settings menu.\r\n2. Toggle the setting on or off.\r\n\r\nThe setting persists across sessions.\r\n\r\nFull-auto mode grants agents broad permissions to execute commands and modify files without confirmation.\r\n\r\n### [Install and uninstall agents](https://tailscale.com/docs/aperture/cli-launcher\\#install-and-uninstall-agents)\r\n\r\nTo install a coding agent:\r\n\r\n1. Press `i` from the main menu, or select an agent marked as not installed.\r\n2. The launcher displays the install command for the selected agent. Run the command in a separate terminal.\r\n3. After installation, return to the launcher. The agent appears in the main menu on the next refresh.\r\n\r\nTo uninstall an agent:\r\n\r\n1. Open settings and select **Uninstall**.\r\n2. Select the agent to remove.\r\n3. Confirm the uninstall.\r\n\r\n## [Keyboard shortcuts](https://tailscale.com/docs/aperture/cli-launcher\\#keyboard-shortcuts)\r\n\r\nThe following keyboard shortcuts are available in the launcher:\r\n\r\n| Key | Action |\r\n| --- | --- |\r\n| `Up`/`Down` or `j`/`k` | Move cursor |\r\n| `Enter` or number key | Select item |\r\n| `s` | Open settings |\r\n| `i` | Install agents |\r\n| `a` | Add endpoint (in endpoints menu) |\r\n| `d` or `Delete` | Delete endpoint (in endpoints menu) |\r\n| `Esc` | Go back |\r\n| `q` | Quit |\r\n| `Ctrl+C` | Quit from any screen |\r\n\r\n## [Persistent state](https://tailscale.com/docs/aperture/cli-launcher\\#persistent-state)\r\n\r\nThe launcher stores settings and state in the OS default configuration directory under `aperture/`:\r\n\r\n- **macOS**: `~/Library/Application Support/aperture/`\r\n- **Linux**: `~/.config/aperture/`\r\n\r\n| File | Purpose |\r\n| --- | --- |\r\n| `settings.json` | Aperture endpoint URLs and full-auto mode preference |\r\n| `launcher.json` | Last-used agent and provider type combination |\r\n\r\nThe launcher creates these files automatically on first use.\r\n\r\n## [Troubleshoot the launcher](https://tailscale.com/docs/aperture/cli-launcher\\#troubleshoot-the-launcher)\r\n\r\nIf the launcher doesn't behave as expected, check the following common issues. For general Aperture issues, refer to [Troubleshooting Aperture](https://tailscale.com/docs/aperture/troubleshooting).\r\n\r\n### [Aperture host unreachable](https://tailscale.com/docs/aperture/cli-launcher\\#aperture-host-unreachable)\r\n\r\nIf the launcher can't connect to the Aperture host during the preflight check:\r\n\r\n- Verify the Aperture proxy is running and accessible from your device.\r\n- Confirm the host URL is correct. The default is `http://ai`.\r\n- Check your network connection, firewall rules, and tailnet policy file rules.\r\n\r\nThe launcher prompts you to enter a different URL if the configured host is unreachable.\r\n\r\n### [Agent binary not found](https://tailscale.com/docs/aperture/cli-launcher\\#agent-binary-not-found)\r\n\r\nIf a coding agent doesn't appear in the main menu:\r\n\r\n- Verify the agent binary is installed by running `which <binary-name>` (for example, `which claude`).\r\n- Confirm the binary is in your `$PATH`, or in one of the directories the launcher checks: `~/.local/bin`, `~/bin`, or `~/.npm-global/bin`. The launcher finds binaries in system directories such as `/usr/local/bin` or `/opt/homebrew/bin` through your `$PATH`.\r\n- Press `i` from the main menu to access install commands for each agent.\r\n\r\n### [No compatible provider types available](https://tailscale.com/docs/aperture/cli-launcher\\#no-compatible-provider-types-available)\r\n\r\nIf a coding agent appears but offers no provider type options:\r\n\r\n- Verify that your Aperture proxy has providers configured with the API types the agent requires. For example, Claude Code requires at least one provider with Anthropic Messages API, Bedrock Model Invoke, or Google Vertex Raw Predict compatibility.\r\n- Check the [Aperture dashboard](https://tailscale.com/docs/aperture/reference/dashboard) to confirm provider configuration.\r\n\r\n### [Agent exits immediately](https://tailscale.com/docs/aperture/cli-launcher\\#agent-exits-immediately)\r\n\r\nIf a coding agent launches but exits immediately:\r\n\r\n- Run the launcher with the `-debug` flag to display the environment variables the launcher sets before launch:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\naperture -debug\r\n```\r\n\r\n- Check the agent's own logs for error messages.\r\n\r\n- Verify the Aperture proxy forwards requests correctly for the selected provider type.\r\n\r\n\r\n### [Conflicting environment variables in Claude Code settings](https://tailscale.com/docs/aperture/cli-launcher\\#conflicting-environment-variables-in-claude-code-settings)\r\n\r\nIf the launcher reports conflicting environment variables when launching Claude Code:\r\n\r\n- Open `~/.claude/settings.json` and check the `env` section.\r\n- Remove any variables that the launcher manages automatically, such as `ANTHROPIC_BASE_URL`, `CLAUDE_CODE_USE_BEDROCK`, or `CLAUDE_CODE_SKIP_BEDROCK_AUTH`.\r\n- The launcher sets these variables for you based on the selected provider type.\r\n\r\n## [Command-line reference](https://tailscale.com/docs/aperture/cli-launcher\\#command-line-reference)\r\n\r\nThe launcher accepts the following flags:\r\n\r\n| Flag | Default | Description |\r\n| --- | --- | --- |\r\n| `-version` | `false` | Print version and exit |\r\n| `-debug` | `false` | Display environment variables before launching an agent |\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>CLI launcher reference</h1>\n<p>Last validated: Apr 9, 2026</p>\n<p>Aperture by Tailscaleis currently <a href=\"https://tailscale.com/docs/reference/tailscale-release-stages#alpha\">in alpha</a>.</p>\n<p>The Aperture launcher (<code>aperture-cli</code>) is a command-line interface (CLI) that configures and runs coding agents pre-connected to your <a href=\"https://tailscale.com/docs/aperture\">Aperture</a> proxy. It handles environment variables, configuration files, and provider type selection automatically, so you can start a coding session without editing configuration by hand.</p>\n<p>This page is part of the <a href=\"https://tailscale.com/docs/aperture/reference\">Aperture reference</a> documentation.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#prerequisites\">Prerequisites</a></h2>\n<p>Before you use the launcher, confirm you have the following:</p>\n<ul>\n<li>A running Aperture proxy with at least one <a href=\"https://tailscale.com/docs/aperture/configuration\">configured provider</a>.</li>\n<li>Network access to the Aperture host URL (default: <code>http://ai</code>).</li>\n<li>At least one <a href=\"https://tailscale.com/docs/aperture/cli-launcher#supported-agents\">supported coding agent</a> installed on your device. If you don't have one, the launcher provides install commands for each agent.</li>\n<li>Go 1.26 or later installed on the device you plan to install the <code>aperture-cli</code> on.</li>\n</ul>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#install-the-launcher\">Install the launcher</a></h2>\n<p>You can install the Aperture launcher using <code>go install</code> or by building the launcher from the <a href=\"https://github.com/tailscale/aperture-cli\">Aperture repository on GitHub</a>. These instructions cover using <code>go install</code>.</p>\n<ol>\n<li>Install the aperture-cli using <code>go install</code>:</li>\n</ol>\n<pre><code class=\"language-shell\">go install github.com/tailscale/aperture-cli/cmd/aperture@latest\n</code></pre>\n<ol start=\"2\">\n<li>Start the <code>aperture-cli</code> launcher:</li>\n</ol>\n<pre><code class=\"language-shell\">aperture\n</code></pre>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#connect-to-aperture\">Connect to Aperture</a></h2>\n<p>The launcher connects to your Aperture proxy on startup and verifies your provider configuration.</p>\n<ol>\n<li>Run the launcher:</li>\n</ol>\n<pre><code class=\"language-shell\">aperture\n</code></pre>\n<p>By default, the launcher connects to <code>http://ai</code>. To use a different host, open the settings menu and add or select an endpoint under <strong>Aperture Endpoints</strong>. The launcher persists your endpoint selection in <code>settings.json</code>.</p>\n<ol start=\"2\">\n<li>Wait for the preflight check to complete.</li>\n</ol>\n<p>The launcher queries the Aperture proxy for its list of configured providers and their API compatibility. If the host is unreachable, the launcher prompts you to enter a different URL.</p>\n<ol start=\"3\">\n<li>After a successful connection, the launcher displays the main menu with your available coding agents.</li>\n</ol>\n<p>The launcher saves the connected host to your settings and uses it automatically on the next launch.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#manage-multiple-endpoints\">Manage multiple endpoints</a></h3>\n<p>You can configure multiple Aperture proxy URLs and switch between them.</p>\n<ol>\n<li>\n<p>From the main menu, press <code>s</code> to open settings.</p>\n</li>\n<li>\n<p>Select <strong>Aperture Endpoints</strong>.</p>\n</li>\n<li>\n<p>Add or remove endpoints. Select an endpoint to make it the active host. The launcher uses the active endpoint on startup.</p>\n</li>\n</ol>\n<p>To delete an endpoint, highlight it and press <code>d</code>.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#launch-a-coding-agent\">Launch a coding agent</a></h2>\n<p>After the launcher connects to Aperture, select a coding agent and provider type to start a coding session.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#select-an-agent\">Select an agent</a></h3>\n<p>The main menu lists all coding agents that the launcher detected on your device. Agents without an installed binary do not appear.</p>\n<pre><code class=\"language-markup\">Connected to http://ai (3 providers)\r\n\r\nWhich editor do you want to use?\r\n\r\n  [0] Last Used: Claude Code - Google Vertex\r\n  [1] Claude Code\r\n  [2] Gemini CLI\r\n  [3] OpenCode\r\n\r\n  [i] Install agents\r\n  [s] Settings\r\n  [q] Quit\r\n\r\nSelection (default: 0):\n</code></pre>\n<p>The <code>[0] Last Used</code> shortcut launches the same agent and provider type combination from your previous session. Press <code>0</code> or <code>Enter</code> to relaunch it.</p>\n<p>If an agent you expect is missing from the list, the launcher couldn't find its binary. Refer to the <a href=\"https://tailscale.com/docs/aperture/cli-launcher#agent-binary-not-found\">troubleshooting section</a> for resolution steps.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#select-a-provider-type\">Select a provider type</a></h3>\n<p>After selecting an agent, choose a provider type. The launcher displays only provider types that are compatible with your configured Aperture providers.</p>\n<p>For example, if no provider in your Aperture configuration supports the Amazon Web Services (AWS) Bedrock API, the launcher hides the Bedrock option from the Claude Code provider type list.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#automatic-selection\">Automatic selection</a></h3>\n<p>If only one valid agent and provider type combination exists after filtering, the launcher skips the menu and launches the agent immediately.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#what-happens-at-launch\">What happens at launch</a></h3>\n<p>When you select an agent and provider type, the launcher:</p>\n<ol>\n<li>Sets the environment variables the agent requires for the selected provider type. Some environment variable values include path suffixes (for example, <code>/v1</code> or <code>/bedrock</code>) appended to the Aperture host URL.</li>\n<li>Writes temporary configuration files if the agent requires them.</li>\n<li>Appends skip-permissions flags if you've enabled full-auto mode.</li>\n<li>Saves your selection as the last-used combination.</li>\n<li>Hands the full terminal to the coding agent.</li>\n</ol>\n<p>When the agent exits, the launcher cleans up temporary files, re-checks the Aperture connection, and returns to the main menu.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#supported-agents\">Supported agents</a></h2>\n<p>The launcher supports four coding agents. Each agent declares which provider types it can use, and the launcher filters the list based on your Aperture configuration.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#claude-code\">Claude Code</a></h3>\n<p><a href=\"https://docs.anthropic.com/en/docs/claude-code\">Claude Code</a> is Anthropic's terminal coding agent for Claude models. For setup instructions, refer to <a href=\"https://tailscale.com/docs/aperture/how-to/use-claude-code\">Use Claude Code with Aperture</a>.</p>\n<ul>\n<li><strong>Binary</strong>: <code>claude</code></li>\n<li><strong>Provider types</strong>: Anthropic API, AWS Bedrock, Google Vertex</li>\n<li><strong>Install</strong>: <code>curl -fsSL https://claude.ai/install.sh | bash</code></li>\n<li><strong>Full-auto flag</strong>: <code>--dangerously-skip-permissions</code></li>\n</ul>\n<p>The launcher sets the following environment variables based on the selected provider type:</p>\n<p>| Provider type | Environment variables |\r\n| --- | --- |\r\n| Anthropic API | <code>ANTHROPIC_BASE_URL</code>, <code>ANTHROPIC_AUTH_TOKEN</code> |\r\n| AWS Bedrock | <code>ANTHROPIC_BEDROCK_BASE_URL</code>, <code>CLAUDE_CODE_USE_BEDROCK</code>, <code>CLAUDE_CODE_SKIP_BEDROCK_AUTH</code> |\r\n| Google Vertex | <code>CLOUD_ML_REGION</code>, <code>CLAUDE_CODE_USE_VERTEX</code>, <code>CLAUDE_CODE_SKIP_VERTEX_AUTH</code>, <code>ANTHROPIC_VERTEX_PROJECT_ID</code>, <code>ANTHROPIC_VERTEX_BASE_URL</code> |</p>\n<p>When providers include model information, the launcher also sets model-tier variables (<code>ANTHROPIC_DEFAULT_OPUS_MODEL</code>, <code>ANTHROPIC_DEFAULT_SONNET_MODEL</code>, <code>ANTHROPIC_DEFAULT_HAIKU_MODEL</code>) based on available models.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#gemini-cli\">Gemini CLI</a></h3>\n<p><a href=\"https://geminicli.com/\">Gemini CLI</a> is Google's terminal coding agent for Gemini models.</p>\n<ul>\n<li><strong>Binary</strong>: <code>gemini</code></li>\n<li><strong>Provider types</strong>: Google Vertex, Gemini API</li>\n<li><strong>Install</strong>: <code>npm install -g @google/gemini-cli</code></li>\n<li><strong>Full-auto flag</strong>: <code>--yolo</code></li>\n</ul>\n<p>The launcher sets the following environment variables based on the selected provider type:</p>\n<p>| Provider type | Environment variables |\r\n| --- | --- |\r\n| Google Vertex | <code>GOOGLE_VERTEX_BASE_URL</code>, <code>GOOGLE_API_KEY</code> |\r\n| Gemini API | <code>GEMINI_API_KEY</code>, <code>GEMINI_BASE_URL</code> |</p>\n<p>The launcher also sets <code>GEMINI_CLI_HOME</code> to point to the launcher-managed configuration directory.</p>\n<p>The launcher writes a persistent settings file at <code>&#x3C;config-dir>/aperture/gemini-home/.gemini/settings.json</code> with the authentication type for the selected provider type. This file persists between sessions. Refer to <a href=\"https://tailscale.com/docs/aperture/cli-launcher#persistent-state\">Persistent state</a> for <code>&#x3C;config-dir></code> values by operating system.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#opencode\">OpenCode</a></h3>\n<p><a href=\"https://opencode.ai/\">OpenCode</a> is a terminal coding agent that supports multiple AI providers. For setup instructions, refer to <a href=\"https://tailscale.com/docs/aperture/how-to/use-opencode\">Use OpenCode with Aperture</a>.</p>\n<ul>\n<li><strong>Binary</strong>: <code>opencode</code></li>\n<li><strong>Provider types</strong>: Anthropic API, AWS Bedrock, Google Vertex, OpenAI Compatible</li>\n<li><strong>Install</strong>: <code>curl -fsSL https://opencode.ai/install | bash</code></li>\n</ul>\n<p>The launcher sets the following environment variables for OpenCode:</p>\n<p>| Provider type | Environment variables |\r\n| --- | --- |\r\n| Anthropic API | <code>ANTHROPIC_BASE_URL</code>, <code>ANTHROPIC_AUTH_TOKEN</code> |\r\n| AWS Bedrock | <code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code>, <code>AWS_REGION</code> |\r\n| Google Vertex | <code>GOOGLE_CLOUD_PROJECT</code>, <code>GOOGLE_CLOUD_LOCATION</code> |\r\n| OpenAI Compatible | <code>OPENAI_API_KEY</code>, <code>OPENAI_BASE_URL</code> |</p>\n<p>For the Anthropic API provider type, the launcher sets <code>ANTHROPIC_BASE_URL</code> to the Aperture proxy's <code>/bedrock</code> path.</p>\n<p>The launcher also sets <code>OPENCODE_CONFIG</code> to point to the launcher-managed configuration file.</p>\n<p>The launcher writes a temporary configuration file at <code>~/.opencode/tmp_aperture_config.json</code> and deletes it when the agent exits.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#openai-codex\">OpenAI Codex</a></h3>\n<p><a href=\"https://github.com/openai/codex\">OpenAI Codex</a> is OpenAI's terminal coding agent. For setup instructions, refer to <a href=\"https://tailscale.com/docs/aperture/how-to/use-codex\">Use Codex with Aperture</a>.</p>\n<ul>\n<li><strong>Binary</strong>: <code>codex</code></li>\n<li><strong>Provider types</strong>: OpenAI Compatible</li>\n<li><strong>Install</strong>: <code>npm install -g @openai/codex</code></li>\n<li><strong>Full-auto flag</strong>: <code>--full-auto</code></li>\n</ul>\n<p>The launcher sets the following environment variables for Codex:</p>\n<p>| Provider type | Environment variables |\r\n| --- | --- |\r\n| OpenAI Compatible | <code>OPENAI_BASE_URL</code>, <code>OPENAI_API_KEY</code> |</p>\n<p>The launcher also sets <code>CODEX_HOME</code> to point to the launcher-managed configuration directory.</p>\n<p>The launcher writes a persistent auth file at <code>&#x3C;config-dir>/aperture/codex-home/auth.json</code> to prevent Codex from prompting for interactive login on first run. Refer to <a href=\"https://tailscale.com/docs/aperture/cli-launcher#persistent-state\">Persistent state</a> for <code>&#x3C;config-dir></code> values by operating system.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#configure-settings\">Configure settings</a></h2>\n<p>Press <code>s</code> from the main menu to open the settings screen.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#manage-aperture-endpoints\">Manage Aperture endpoints</a></h3>\n<p>Add and remove Aperture proxy URLs. The active endpoint is the host the launcher connects to on startup.</p>\n<ol>\n<li>Select <strong>Aperture Endpoints</strong> from the settings menu.</li>\n<li>To add a new endpoint, select the add option and enter the URL.</li>\n<li>To switch to a different endpoint, select it from the list.</li>\n<li>To delete an endpoint, highlight it and press <code>d</code> or <code>Delete</code>.</li>\n</ol>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#full-auto-mode\">Full-auto mode</a></h3>\n<p>Full-auto mode (labeled <strong>YOLO mode</strong> in the settings menu) appends skip-permissions flags when launching agents. When enabled, agents run without asking for confirmation before executing commands or making changes.</p>\n<p>Each agent uses its own flag:</p>\n<p>| Agent | Flag |\r\n| --- | --- |\r\n| Claude Code | <code>--dangerously-skip-permissions</code> |\r\n| Gemini CLI | <code>--yolo</code> |\r\n| OpenAI Codex | <code>--full-auto</code> |</p>\n<p>To toggle full-auto mode:</p>\n<ol>\n<li>Select <strong>YOLO mode</strong> from the settings menu.</li>\n<li>Toggle the setting on or off.</li>\n</ol>\n<p>The setting persists across sessions.</p>\n<p>Full-auto mode grants agents broad permissions to execute commands and modify files without confirmation.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#install-and-uninstall-agents\">Install and uninstall agents</a></h3>\n<p>To install a coding agent:</p>\n<ol>\n<li>Press <code>i</code> from the main menu, or select an agent marked as not installed.</li>\n<li>The launcher displays the install command for the selected agent. Run the command in a separate terminal.</li>\n<li>After installation, return to the launcher. The agent appears in the main menu on the next refresh.</li>\n</ol>\n<p>To uninstall an agent:</p>\n<ol>\n<li>Open settings and select <strong>Uninstall</strong>.</li>\n<li>Select the agent to remove.</li>\n<li>Confirm the uninstall.</li>\n</ol>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#keyboard-shortcuts\">Keyboard shortcuts</a></h2>\n<p>The following keyboard shortcuts are available in the launcher:</p>\n<p>| Key | Action |\r\n| --- | --- |\r\n| <code>Up</code>/<code>Down</code> or <code>j</code>/<code>k</code> | Move cursor |\r\n| <code>Enter</code> or number key | Select item |\r\n| <code>s</code> | Open settings |\r\n| <code>i</code> | Install agents |\r\n| <code>a</code> | Add endpoint (in endpoints menu) |\r\n| <code>d</code> or <code>Delete</code> | Delete endpoint (in endpoints menu) |\r\n| <code>Esc</code> | Go back |\r\n| <code>q</code> | Quit |\r\n| <code>Ctrl+C</code> | Quit from any screen |</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#persistent-state\">Persistent state</a></h2>\n<p>The launcher stores settings and state in the OS default configuration directory under <code>aperture/</code>:</p>\n<ul>\n<li><strong>macOS</strong>: <code>~/Library/Application Support/aperture/</code></li>\n<li><strong>Linux</strong>: <code>~/.config/aperture/</code></li>\n</ul>\n<p>| File | Purpose |\r\n| --- | --- |\r\n| <code>settings.json</code> | Aperture endpoint URLs and full-auto mode preference |\r\n| <code>launcher.json</code> | Last-used agent and provider type combination |</p>\n<p>The launcher creates these files automatically on first use.</p>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#troubleshoot-the-launcher\">Troubleshoot the launcher</a></h2>\n<p>If the launcher doesn't behave as expected, check the following common issues. For general Aperture issues, refer to <a href=\"https://tailscale.com/docs/aperture/troubleshooting\">Troubleshooting Aperture</a>.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#aperture-host-unreachable\">Aperture host unreachable</a></h3>\n<p>If the launcher can't connect to the Aperture host during the preflight check:</p>\n<ul>\n<li>Verify the Aperture proxy is running and accessible from your device.</li>\n<li>Confirm the host URL is correct. The default is <code>http://ai</code>.</li>\n<li>Check your network connection, firewall rules, and tailnet policy file rules.</li>\n</ul>\n<p>The launcher prompts you to enter a different URL if the configured host is unreachable.</p>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#agent-binary-not-found\">Agent binary not found</a></h3>\n<p>If a coding agent doesn't appear in the main menu:</p>\n<ul>\n<li>Verify the agent binary is installed by running <code>which &#x3C;binary-name></code> (for example, <code>which claude</code>).</li>\n<li>Confirm the binary is in your <code>$PATH</code>, or in one of the directories the launcher checks: <code>~/.local/bin</code>, <code>~/bin</code>, or <code>~/.npm-global/bin</code>. The launcher finds binaries in system directories such as <code>/usr/local/bin</code> or <code>/opt/homebrew/bin</code> through your <code>$PATH</code>.</li>\n<li>Press <code>i</code> from the main menu to access install commands for each agent.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#no-compatible-provider-types-available\">No compatible provider types available</a></h3>\n<p>If a coding agent appears but offers no provider type options:</p>\n<ul>\n<li>Verify that your Aperture proxy has providers configured with the API types the agent requires. For example, Claude Code requires at least one provider with Anthropic Messages API, Bedrock Model Invoke, or Google Vertex Raw Predict compatibility.</li>\n<li>Check the <a href=\"https://tailscale.com/docs/aperture/reference/dashboard\">Aperture dashboard</a> to confirm provider configuration.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#agent-exits-immediately\">Agent exits immediately</a></h3>\n<p>If a coding agent launches but exits immediately:</p>\n<ul>\n<li>Run the launcher with the <code>-debug</code> flag to display the environment variables the launcher sets before launch:</li>\n</ul>\n<pre><code class=\"language-shell\">aperture -debug\n</code></pre>\n<ul>\n<li>\n<p>Check the agent's own logs for error messages.</p>\n</li>\n<li>\n<p>Verify the Aperture proxy forwards requests correctly for the selected provider type.</p>\n</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/aperture/cli-launcher#conflicting-environment-variables-in-claude-code-settings\">Conflicting environment variables in Claude Code settings</a></h3>\n<p>If the launcher reports conflicting environment variables when launching Claude Code:</p>\n<ul>\n<li>Open <code>~/.claude/settings.json</code> and check the <code>env</code> section.</li>\n<li>Remove any variables that the launcher manages automatically, such as <code>ANTHROPIC_BASE_URL</code>, <code>CLAUDE_CODE_USE_BEDROCK</code>, or <code>CLAUDE_CODE_SKIP_BEDROCK_AUTH</code>.</li>\n<li>The launcher sets these variables for you based on the selected provider type.</li>\n</ul>\n<h2><a href=\"https://tailscale.com/docs/aperture/cli-launcher#command-line-reference\">Command-line reference</a></h2>\n<p>The launcher accepts the following flags:</p>\n<p>| Flag | Default | Description |\r\n| --- | --- | --- |\r\n| <code>-version</code> | <code>false</code> | Print version and exit |\r\n| <code>-debug</code> | <code>false</code> | Display environment variables before launching an agent |</p>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}