> ## 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 control plane, publishing origin stacks, creating releases, and managing appliances.

## Prerequisites

* **API Key**: Your Tensor9 API key (provided during onboarding, or email [hello@tensor9.com](mailto:hello@tensor9.com))

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 install tensor9
```

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

### 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
```

### Set your API key

Set your Tensor9 API key as an environment variable:

```bash theme={null}
export T9_API_KEY=<your-api-key>
```

<Note>
  Add this to your shell profile (`~/.bashrc`, `~/.zshrc`, etc.) to persist it across sessions:

  ```bash theme={null}
  echo 'export T9_API_KEY=<your-api-key>' >> ~/.zshrc
  source ~/.zshrc
  ```
</Note>

### Verify installation

```bash theme={null}
tensor9 whoami
```

This should display your Tensor9 identity and environment information.

## Updating

### Homebrew

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

### Manual update

```bash theme={null}
tensor9 update
```

## Uninstallation

### Homebrew

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

### Manual

```bash theme={null}
sudo rm /usr/local/bin/tensor9
rm -rf ~/.tensor9
```

## 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).
</Note>

## Environment variables

| Variable     | Description          | Required                |
| ------------ | -------------------- | ----------------------- |
| `T9_API_KEY` | Your Tensor9 API key | Yes (for most commands) |

## Common installation issues

<AccordionGroup>
  <Accordion title="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>

  <Accordion title="API key errors">
    **Problem**: "API key required" or authentication errors.

    **Solution**:

    1. Verify your API key is set: `echo $T9_API_KEY`
    2. If empty, set it: `export T9_API_KEY=<your-key>`
    3. Verify it works: `tensor9 whoami`
    4. For persistence, add to your shell profile
  </Accordion>
</AccordionGroup>

## What's next?

After installing the CLI:

1. **Set up your control plane**: Follow the [Quick Start](/getting-started/quick-start-terraform) guide
2. **Learn common workflows**: See [Common Workflows](/cli/common-workflows) for typical tasks
3. **Reference documentation**: Check the [CLI Reference](/cli/reference) 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)
