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

# term-llm integration guide

[term-llm](https://term-llm.com) is an open-source, terminal-first AI runtime written in Go. It turns natural language into executable shell commands, runs persistent chats with tools and MCP servers, edits files with model assistance, and supports agents, skills, sessions, jobs, and local automation. Follow the steps below to connect term-llm with a model hosted on SambaCloud.

## Prerequisites

Before you begin, ensure you have:

* A [SambaCloud](https://cloud.sambanova.ai/?utm_source=termllm\&utm_medium=external\&utm_campaign=cloud_signup) account and [API key](https://cloud.sambanova.ai/apis?utm_source=termllm\&utm_medium=external\&utm_campaign=cloud_signup)
* A POSIX shell on macOS, Linux, or WSL
* Go 1.22+ (only if you plan to build from source)

## Setup

<Steps>
  <Step title="Install term-llm">
    Install term-llm using the official installation script:

    ```bash theme={}
    curl -fsSL https://raw.githubusercontent.com/samsaffron/term-llm/main/install.sh | sh
    ```

    Or install it with Go:

    ```bash theme={}
    go install github.com/samsaffron/term-llm@latest
    ```

    If `term-llm --version` returns `command not found` (common on macOS), add the install directory to your `PATH`:

    ```bash theme={}
    export PATH="$HOME/.local/bin:$PATH"
    ```

    To persist this change, append the same line to `~/.zshrc` (default on macOS) or `~/.bashrc`, then restart your terminal or run `source ~/.zshrc`.
  </Step>

  <Step title="Configure your SambaNova API key">
    Export your SambaCloud API key:

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

    Alternatively, you can configure the API key directly in `~/.config/term-llm/config.yaml` under `providers.sambanova.api_key`.
  </Step>

  <Step title="Configure SambaNova as the default provider">
    Set SambaNova as your default provider and configure its models:

    ```bash theme={}
    term-llm config set default_provider sambanova
    term-llm config set providers.sambanova.model gpt-oss-120b
    term-llm config set providers.sambanova.fast_model Meta-Llama-3.3-70B-Instruct
    ```

    These commands create `~/.config/term-llm/config.yaml` if it doesn't exist yet, and edit it in place. Tab-complete a model ID with `term-llm config set providers.sambanova.model <TAB>`.

    Or edit `~/.config/term-llm/config.yaml` directly:

    ```yaml theme={}
    default_provider: sambanova

    providers:
      sambanova:
        model: gpt-oss-120b
        fast_model: Meta-Llama-3.3-70B-Instruct
    ```
  </Step>

  <Step title="Start using SambaNova models">
    Run prompts using your configured provider.

    Ask a question:

    ```bash theme={}
    term-llm ask "Explain RDUs"
    ```

    Translate natural language into a shell command:

    ```bash theme={}
    term-llm exec "Find all Go files modified today"
    ```

    Start an interactive session:

    ```bash theme={}
    term-llm chat
    ```

    To override the configured model for a single request:

    ```bash theme={}
    term-llm ask \
      --provider sambanova:Meta-Llama-3.3-70B-Instruct \
      "Summarize this repository"
    ```
  </Step>
</Steps>

## Available models

List all chat-capable SambaNova models along with their context windows and pricing information:

```bash theme={}
term-llm models --provider sambanova
```

term-llm includes a bundled pricing table synchronized with SambaNova's public pricing information.

## Video walkthrough

Follow the video below to install term-llm, configure SambaNova, and start using SambaCloud models.

<video src="https://mintcdn.com/sambanova-systems/FjYi4s0Yh0wdhmFE/videos/term-llm-setup.mp4?fit=max&auto=format&n=FjYi4s0Yh0wdhmFE&q=85&s=129cec3d998ce50691fc29c535ef044d" controls data-path="videos/term-llm-setup.mp4" />

## Troubleshooting

If `term-llm` isn't found after installation (common on macOS), add the install directory to your `PATH`:

```bash theme={}
export PATH="$HOME/.local/bin:$PATH"
```

To persist this change, append the same line to `~/.zshrc` (default on macOS) or `~/.bashrc`, then restart your terminal or run `source ~/.zshrc`.

If `SAMBANOVA_API_KEY` isn't being recognized, verify that it's set and doesn't include the literal angle brackets:

```bash theme={}
echo "${SAMBANOVA_API_KEY:0:10}..."
```

If the output is empty or incorrect, re-export your API key or generate a new one in the [SambaCloud portal](https://cloud.sambanova.ai/apis?utm_source=termllm\&utm_medium=external\&utm_campaign=cloud_signup).

If requests fail because the configured model isn't available, list the current SambaNova models:

```bash theme={}
term-llm models --provider sambanova
```

Then update the `model:` field in `~/.config/term-llm/config.yaml` to one of the listed model IDs.

If `~/.config/term-llm/config.yaml` doesn't exist, create the configuration directory first:

```bash theme={}
mkdir -p ~/.config/term-llm
```

## Additional resources

* [term-llm documentation](https://term-llm.com)
* [Providers and models reference](https://term-llm.com/reference/providers-and-models/)
* [Configuration reference](https://term-llm.com/reference/configuration/)
* [GitHub repository](https://github.com/samsaffron/term-llm)
* [Supported SambaCloud models](/docs/en/models/sambacloud-models)
