Skip to main content
The tensor9 CLI is the primary tool for managing your Tensor9 control plane, publishing origin stacks, creating releases, and managing appliances.

Prerequisites

Before installing the tensor9 CLI, ensure you have:
  • Java 17 or later: The tensor9 CLI requires Java to run
  • API Key: Request an API key by emailing [email protected]
  • AWS Account (for AWS deployments): A dedicated AWS account for your Tensor9 control plane

Installation

Step 1: Download and install

Run the following command to download and install the tensor9 CLI:
curl https://t9-artifacts-prod-1.s3.us-west-2.amazonaws.com/tensor9-latest > tensor9 && \
  chmod +x tensor9 && \
  sudo tensor9 install
This command:
  1. Downloads the latest version of tensor9
  2. Makes it executable
  3. Installs it to /usr/local/bin/ so it’s accessible from anywhere

Step 2: Verify installation

Confirm the installation was successful:
tensor9 help
You should see the help output listing available commands.

Step 3: Set your API key

Set your Tensor9 API key as an environment variable:
export T9_API_KEY=<your-api-key>
Add this to your shell profile (~/.bashrc, ~/.zshrc, etc.) to persist it across sessions:
echo 'export T9_API_KEY=<your-api-key>' >> ~/.bashrc
source ~/.bashrc

Step 4: Verify authentication

Test that your API key works:
tensor9 env
This should display your Tensor9 environment information without errors.

Updating

Update to the latest version of the tensor9 CLI:
tensor9 update
To update to a specific version:
tensor9 update -customVersion <version>

Uninstallation

To uninstall the tensor9 CLI:
sudo rm /usr/local/bin/tensor9
rm -rf ~/.tensor9

Installation locations

The tensor9 CLI installs files to:
  • /usr/local/bin/tensor9: The main CLI executable
  • ~/.tensor9/: Configuration and cache directory

Platform support

The tensor9 CLI is supported on:
  • Linux (x86_64)
  • macOS (Intel and Apple Silicon)
Windows users can use the CLI through WSL (Windows Subsystem for Linux).

Verifying Java installation

The tensor9 CLI requires Java 17 or later. Check your Java version:
java -version
If Java is not installed or the version is too old, install Java 17+:

macOS (using Homebrew)

brew install openjdk@17

Ubuntu/Debian

sudo apt update
sudo apt install openjdk-17-jdk

CentOS/RHEL

sudo yum install java-17-openjdk

Environment variables

The tensor9 CLI uses these environment variables:
VariableDescriptionRequired
T9_API_KEYYour Tensor9 API keyYes (for most commands)

Common installation issues

Problem: sudo tensor9 install fails with permission errors.Solution: Ensure you have sudo privileges. If you can’t use sudo, install to a local directory:
mkdir -p ~/bin
cp tensor9 ~/bin/
chmod +x ~/bin/tensor9
export PATH="$HOME/bin:$PATH"
Add the export PATH line to your shell profile for persistence.
Problem: Error message about Java not being found.Solution: Install Java 17 or later following the platform-specific instructions above, then verify:
java -version
Problem: tensor9: command not found after installation.Solution: Ensure /usr/local/bin is in your PATH:
echo $PATH
If not, add it to your shell profile:
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
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 env
  4. For persistence, add to your shell profile

What’s next?

After installing the CLI:
  1. Set up your control plane: Follow the Quick Start guide
  2. Learn common workflows: See Common Workflows for typical tasks
  3. Reference documentation: Check the 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 [email protected]