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

# Secrets & Variables

> Provide your repositories with environment variables, encrypted secrets, and test data for accurate automated testing.

Ito supports three types of per-repository context that are injected into the test environment when running automated QA on your pull requests.

| Type          | Description                    | Example use case                      |
| ------------- | ------------------------------ | ------------------------------------- |
| **Variables** | Plain environment variables    | Base URL, feature flags               |
| **Secrets**   | Encrypted credentials          | API keys, passwords                   |
| **Seed data** | Test data not in your codebase | Test user credentials, sample records |

## Variables

Variables are plain-text environment variables made available to the test environment. Use them for non-sensitive configuration your tests need.

<Steps>
  <Step title="Open Settings">
    Navigate to **Settings → Context & Secrets**.
  </Step>

  <Step title="Select a repository">
    Choose the repository you want to configure from the dropdown.
  </Step>

  <Step title="Add a variable">
    Click **Add Variable**, enter a name (e.g. `BASE_URL`) and value, then save.
  </Step>
</Steps>

<Note>
  Variable names are automatically uppercased. Use `SNAKE_CASE` naming for consistency.
</Note>

## Secrets

Secrets work like variables but are encrypted before being stored. Your secret values are encrypted in your browser before they are sent — Ito never receives the plain-text value.

<Steps>
  <Step title="Open Settings">
    Navigate to **Settings → Context & Secrets** and select a repository.
  </Step>

  <Step title="Fetch the public key">
    Ito automatically fetches the current public key used to encrypt secrets.
  </Step>

  <Step title="Add a secret">
    Click **Add Secret**, enter a name (e.g. `STRIPE_SECRET_KEY`) and value. The value is encrypted locally before being saved.
  </Step>
</Steps>

<Warning>
  Secret values cannot be retrieved after saving — only their names are visible. If you need to change a value, update the secret.
</Warning>

## Seed Data

Seed data lets you provide structured test data that the AI agent can use during testing, such as test user accounts or sample records that don't exist in your repository's codebase.

Each seed data item has a **name**, a **value**, and an optional **description** explaining its purpose.

<Steps>
  <Step title="Open Settings">
    Navigate to **Settings → Context & Secrets** and select a repository.
  </Step>

  <Step title="Add a seed data item">
    Click **Add Seed Data**, fill in the name, value, and description, then save.
  </Step>
</Steps>

<Tip>
  Use seed data for test credentials (e.g., a staging account username and password) so the AI agent can log in and test authenticated flows.
</Tip>

<Warning>
  Never use production credentials as seed data. Always use dedicated test accounts on a staging or development environment.
</Warning>

## Managing existing items

You can edit or delete any variable, secret, or seed data item from the **Context & Secrets** settings page. Changes take effect on the next test run triggered against that repository.
