> For the complete documentation index, see [llms.txt](https://docs.testvibe.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.testvibe.com/account-settings/api-keys.md).

# CLI & API Keys

TestVibe API keys — they start with `tvb_` — authenticate tools that talk to TestVibe from outside the app. Manage them in **Settings → CLI & API keys**.

## What Uses An API Key

| Tool                 | What it does                                            |
| -------------------- | ------------------------------------------------------- |
| `testvibe` CLI       | Work with projects, tests, and runs from the terminal.  |
| MCP and AI tools     | Let AI assistants call the TestVibe API on your behalf. |
| `tvtunnel` agent     | Connects a device so cloud runs can reach private apps. |
| Load telemetry agent | Streams server metrics into load test results.          |

## Create A Key

1. Open **Settings**.
2. Select **CLI & API keys**.
3. Create a new key and give it a descriptive name — one key per tool or machine keeps revocation painless.
4. Copy the key and store it somewhere safe. Treat it like a password.

Revoke a key from the same panel when a machine is retired or a key may have leaked.

## Install The CLI

The **CLI & API keys** panel also shows the install commands for the [`testvibe`](https://www.npmjs.com/package/testvibe) CLI. The simplest is npm (Node 20+):

```bash
npm install -g testvibe
```

No npm? The panel's fallback commands download a single dependency-free file from your TestVibe server and add a `testvibe` command to `~/.testvibe/bin`:

```bash
# macOS / Linux (Node 20+)
curl -fsSL <your-testvibe-url>/api/v1/install.sh | sh
```

```powershell
# Windows PowerShell (Node 20+)
iwr -useb <your-testvibe-url>/api/v1/install.ps1 | iex
```

Then sign in with a key from this panel and pick a project:

```bash
testvibe login --server <your-testvibe-url> --key tvb_…
testvibe use <project>
```

## Not For Test Credentials

API keys authenticate tools against TestVibe. Values your tests need — logins, tokens, test data — belong in **Settings → Variables & Secrets** and are referenced from Gherkin as `{{var:NAME}}` / `{{secret:NAME}}`. See [Add API keys and secrets](/workspace/add-api-keys-and-secrets.md).

## Related Help

* [REST API reference](https://docs.testvibe.com/testvibe-api/welcome/readme) — the full API your keys authenticate against.
* [Add API keys and secrets](/workspace/add-api-keys-and-secrets.md)
* [Tunnel devices](/account-settings/tunnel-devices.md)
* [Server telemetry](/load-testing/server-telemetry.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.testvibe.com/account-settings/api-keys.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
