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

# Getting Started

> Reach a first successful Tensormesh CLI request against the serverless inference surface.

This page covers the shortest serverless-first path to a working request.

If `tm` is not already on your `PATH`, install the CLI first with
[Installation](/cli/guides/installation). The commands below assume `tm` is on
your `PATH`. If you are running from this repo checkout without activating a
shell that already exposes `tm`, use `./.venv/bin/tm`.

## Fastest Serverless Request

Choose this when you already have both:

* an inference API key
* a valid serverless model name for your target host

You do not need Control Plane login for this path:

```sh theme={null}
tm version
tm infer chat \
  --api-key YOUR_INFERENCE_API_KEY \
  --model YOUR_SERVERLESS_MODEL_NAME \
  --json '[{"role":"user","content":"Say hello."}]'
```

If you do not already know the model name to use, start with [`tm billing pricing serverless list`](/cli/reference/billing/pricing/serverless/list). That discovery command requires `tm auth login` for the same Tensormesh environment.

## Standard CLI Setup

When you want a guided local setup before sending requests:

```sh theme={null}
tm version
tm auth login
tm config init
tm auth status
tm config show --sources
tm infer doctor
tm auth whoami
```

Put your inference API key under `[overrides]` in `~/.config/tensormesh/config.toml` (or `$TM_CONFIG_HOME/config.toml` when that env var is set):

```toml theme={null}
[overrides]
gateway_api_key = "..."
```

When you are targeting a different Control Plane host, run the same explicit
`--controlplane-base` once so the active `config.toml` persists that host for
later Control Plane-assisted flows.

For automation or CI, add `--exit-status` to readiness checks so they fail the shell when required prerequisites are still missing:

```sh theme={null}
tm infer doctor --exit-status
tm auth status --exit-status
```

## Understand The Readiness Commands

Use the readiness commands like this:

* `tm auth status`: local Control Plane and inference credential presence
* `tm infer doctor`: local readiness for the next inference request
* `tm doctor`: broader local config and credential diagnosis across CLI setup
* `tm auth whoami`: live Control Plane auth check

`tm auth status`, `tm infer doctor`, and `tm doctor` are local checks. They do not prove that a live API call will succeed.

After the local checks look good, use `tm auth whoami` as the explicit live validation step for your current Control Plane login.

## What `tm init` Helps You Check

* whether the current config file exists
* whether Control Plane login is ready
* whether inference API key is present
* the exact next commands to finish setup

## Related Reference

* [`tm version`](/cli/reference/version)
* [`tm init`](/cli/reference/init)
* [`tm infer doctor`](/cli/reference/infer/doctor)
* [`tm auth status`](/cli/reference/auth/status)
* [`tm auth whoami`](/cli/reference/auth/whoami)
* [`tm config show`](/cli/reference/config/show)
* [`tm infer chat`](/cli/reference/infer/chat)
* [`tm billing pricing serverless list`](/cli/reference/billing/pricing/serverless/list)
