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

# Install tensor9 CLI

The `tensor9` CLI is the primary tool for managing your Tensor9 BYOC control plane, publishing origin stacks, creating releases, and managing appliances.

## Prerequisites

* **API key**: Follow [Get a Tensor9 API key](https://docs.tensor9.com/byoc/getting-started/api-key.md) to sign up with Google and download your production API key.

No separate Java installation is required - the CLI bundles its own runtime.

## Installation

### Homebrew (recommended - macOS and Linux)

```bash theme={null}
brew tap tensor9ine/tensor9
brew trust tensor9ine/tensor9
brew install tensor9
```

This installs the CLI with a bundled Java runtime. No other dependencies needed.

Homebrew 7 and later loads formulae from third-party taps only after you trust the tap, so `brew trust` is needed once per machine, including on machines that installed the CLI earlier and now run `brew upgrade tensor9`.

### Shell script

Alternatively, install via the install script:

```bash theme={null}
curl -sSL https://t9-artifacts-prod-1.s3.us-west-2.amazonaws.com/install-latest.sh | sh
```

### Authenticate

[Get your API key](https://docs.tensor9.com/byoc/getting-started/api-key.md), then export it and [set up your control plane](https://docs.tensor9.com/byoc/fundamentals/install.md):

```bash theme={null}
export T9_API_KEY=<your API key>
tensor9 vendor setup
```

Setup writes a controller profile to `~/.tensor9/config.json` as your default, so later commands need no API key or profile options.

## Updating

### Homebrew

```bash theme={null}
brew upgrade tensor9
```

### Shell script

Run the install script again:

```bash theme={null}
curl -sSL https://t9-artifacts-prod-1.s3.us-west-2.amazonaws.com/install-latest.sh | sh
```

It replaces the installed CLI with the latest release and leaves your account configuration, profiles and enrolled identity in place. If you installed with a custom `T9_INSTALL_DIR`, set the same value again when you rerun it.

## Uninstallation

### Homebrew

```bash theme={null}
brew uninstall tensor9
brew untap tensor9ine/tensor9
```

### Shell script

The shell installer puts the command in `~/.tensor9/bin/tensor9` by default. If you chose a custom `T9_INSTALL_DIR` when installing, use that directory instead.

For the default installation, confirm that this is the launcher installed by the shell script, then remove only that file:

```bash theme={null}
rm "$HOME/.tensor9/bin/tensor9"
```

Remove the corresponding `~/.tensor9/bin` entry that the installer added to your shell's `PATH`, then open a new terminal. For a custom installation, remove its corresponding `bin` entry instead.

Keep your account configuration, profiles and enrolled identity so you can use them if you reinstall. Do not delete the whole `~/.tensor9` directory.

This removes the command while retaining its bundled Java runtime and downloaded jars. Those files may share the installation directory with other Tensor9 tools. If you need to reclaim that space, contact [Tensor9](mailto:hello@tensor9.com) to identify which runtime files belong only to this installation before removing them.

## Platform support

The tensor9 CLI is supported on:

* **macOS** (Apple Silicon and Intel)
* **Linux** (arm64 and amd64)

> [!NOTE]
>
> Windows users can use the CLI through WSL (Windows Subsystem for Linux).

## Environment variables

| Variable | Description | Required |
| - | - | - |
| `T9_API_KEY` | Your Tensor9 API key. `tensor9 vendor setup` reads it, and so does the tensor9 provider when OpenTofu or Terraform apply a deployment stack | For `vendor setup` and deployment stacks |
| `T9_CONFIG` | Path to a CLI configuration other than `~/.tensor9/config.json`. Leave it unset: control-plane setup writes your controller profile to `~/.tensor9/config.json` | No |

## Common installation issues

> [accordion] Command not found after installation
>
> **Problem**: `tensor9: command not found` after installation.
>
> **Solution**: If installed via Homebrew, try opening a new terminal. If the issue persists, ensure the Homebrew bin directory is in your PATH:
>
> ```bash theme={null}
> echo $PATH
> ```
>
> For Homebrew on Apple Silicon, the default path is `/opt/homebrew/bin`. For Intel Macs and Linux, it is `/usr/local/bin`.

> [accordion] API key errors
>
> **Problem**: "API key required" or authentication errors.
>
> **Solution**:
>
> 1. Run `tensor9 whoami`. After control-plane setup, it reports your vendor through your default controller profile.
> 2. Before control-plane setup, export your key again as described in [Export your API key](https://docs.tensor9.com/byoc/getting-started/api-key.md#export-your-api-key).
> 3. Do not print the key or store it in a shell profile. Contact [hello@tensor9.com](mailto:hello@tensor9.com) if authentication still fails.

## What's next?

After installing the CLI:

1. **Set up your control plane**: Follow the [Quick Start](https://docs.tensor9.com/byoc/getting-started/quick-start-terraform.md) guide
2. **Learn common workflows**: See [Common Workflows](https://docs.tensor9.com/byoc/cli/common-workflows.md) for typical tasks
3. **Reference documentation**: Check the [CLI Reference](https://docs.tensor9.com/byoc/cli/reference.md) for all commands

## Getting help

If you encounter issues:

* Run `tensor9 help` to see available commands
* Run `tensor9 <command> -help` for command-specific help
* Contact support at [hello@tensor9.com](mailto:hello@tensor9.com)


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